Пример #1
0
 public void Update0(CT2.CCommInfo cCommInfo)
 {
     Tool.mbTcpDriver.GetInfo(cCommInfo);
     if (cCommInfo.bIfIpFromCfg)
     {
         Device1.Text = "配置文件";
     }
     else
     {
         Device1.Text = "默认配置";
     }
     Device2.Text = cCommInfo.LocalIP;
     Device3.Text = cCommInfo.RemoteIP;
     Device4.Text = cCommInfo.Netmask;
     Device5.Text = cCommInfo.Gateway;
     Device6.Text = cCommInfo.MacAddress;
 }
Пример #2
0
 public void Updata(CT2.CCommInfo cCommInfo)
 {
     Tool.mbTcpDriver.GetInfo(cCommInfo);
     if (cCommInfo.bIfRtuFromCfg)
     {
         Device1.Text = "配置文件";
     }
     else
     {
         Device1.Text = "默认配置";
     }
     Device2.Text  = cCommInfo.RTUslaveAddress.ToString();
     Device3.Text  = cCommInfo.BaudRS232.ToString();
     Device4.Text  = cCommInfo.ParityRS232;
     Device5.Text  = cCommInfo.DatabitRS232.ToString();
     Device6.Text  = cCommInfo.StopbitRS232.ToString();
     Device7.Text  = cCommInfo.BaudRS485.ToString();
     Device8.Text  = cCommInfo.ParityRS485;
     Device9.Text  = cCommInfo.DatabitRS485.ToString();
     Device10.Text = cCommInfo.StopbitRS485.ToString();
 }