Beispiel #1
0
        private void button_Save_Click(object sender, EventArgs e)
        {
            if (ValidatIpPort())
            {
                Program.wrx.XMLObj.LsM[0].IP_PORTNAME   = textBox_IP.Text.Trim();
                Program.wrx.XMLObj.LsM[0].PORT_BAUDRATE = int.Parse(textBox_Port.Text.Trim());
                Program.wrx.WriteXML();

                TcpControl.ReStart();
            }
            else
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("IP或端口设置有误!", "[提示]", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }