コード例 #1
0
        private void updateCabStatus(SmartCab cab)
        {
            byte[]        command = cab.GenerateCommand();
            StringBuilder hex     = new StringBuilder(command.Length * 2);

            foreach (byte b in command)
            {
                hex.AppendFormat("{0:x2}", b);
            }
            networkMessage.Text = hex.ToString();
            networkMessage.Text = command[3].ToString() + '-' + Convert.ToString(command[4], 2).PadLeft(8, '0');
        }
コード例 #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     this.cab1 = new SmartCab(1);
 }