Files
slz-4/SLZ_4/ConfigMes.cs

44 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SLZ_4
{
public partial class ConfigMes : Form
{
public MES_PARAM mesParam;
public ConfigMes()
{
InitializeComponent();
mesParam = new MES_PARAM();
}
public void SetConfig(ref MES_PARAM pParam)
{
mesParam = pParam;
uiTextUrl.Text = mesParam.sUrl;
uiTextPort.Text = mesParam.iPort.ToString();
uiCheckMesIn.Checked = mesParam.bCheckIn;
uiCheckMes.Checked = mesParam.bCheckOut;
}
private void uiButtonSet_Click(object sender, EventArgs e)
{
mesParam.sUrl = uiTextUrl.Text;
mesParam.iPort = int.Parse(uiTextPort.Text);
mesParam.bCheckIn = uiCheckMesIn.Checked;
mesParam.bCheckOut = uiCheckMes.Checked;
FormMain.form.UpdateMesConfig(ref mesParam);
MessageBox.Show("设置成功!");
Close();
}
}
}