Example #1
0
        private void button26_Click(object sender, EventArgs e)
        {
            OperateResult <byte[]> read = melsec_net.ReadFromCoreServer(Communication.BasicFramework.SoftBasic.HexStringToBytes(textBox13.Text));

            if (read.IsSuccess)
            {
                textBox11.Text = "Result:" + Communication.BasicFramework.SoftBasic.ByteToHexString(read.Content);
            }
            else
            {
                MessageBox.Show("Read Failed:" + read.ToMessageShowString( ));
            }
        }
 private void button26_Click(object sender, EventArgs e)
 {
     try
     {
         OperateResult <byte[]> read = melsec_net.ReadFromCoreServer(HslCommunication.BasicFramework.SoftBasic.HexStringToBytes(textBox13.Text));
         if (read.IsSuccess)
         {
             textBox11.Text = "结果:" + HslCommunication.BasicFramework.SoftBasic.ByteToHexString(read.Content);
         }
         else
         {
             MessageBox.Show("读取失败:" + read.ToMessageShowString( ));
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("读取失败:" + ex.Message);
     }
 }