Esempio n. 1
0
        private void Transmit_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length == 0)
            {
                return;
            }

            string asa = textBox1.Text.Replace(" ", string.Empty);

            byte[] send = new byte[asa.Length / 2];
            for (int a = 0; a < asa.Length; a += 2)
            {
                try
                {
                    send[a / 2] = Convert.ToByte(asa.Substring(a, 2), 16);
                }
                catch (Exception err)
                {
                    MessageBox.Show(err.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            PortA.Transmit(send);
        }
 public virtual void Trasmit_Data()
 {
     code[0] = dout.Addres; ML.Transmit(code);
 }