Beispiel #1
0
 private void button22_Click(object sender, EventArgs e)
 {
     // short写入
     try
     {
         DemoUtils.WriteResultRender(xGBCnet.Write(textBox8.Text, short.Parse(textBox7.Text)), textBox8.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
 public bool Write(string address, dynamic value)
 {
     if (value is bool)
     {
         xGBCnet.WriteCoil(address, value);
     }
     else
     {
         xGBCnet.Write(address, value);
     }
     return(true);
 }