private void SendTestCommand() { if (textBox4.Text == "") { textBox4.Text = "FFFF"; } if (textBox5.Text == "") { textBox5.Text = "FF"; } if (textBox13.Text == "") { textBox13.Text = "0006"; } if (textBox6.Text == "") { textBox6.Text = "01 01 00 00 00 00"; } UInt16 addr = (UInt16)Convert.ToInt16(textBox4.Text, 16); byte point = Convert.ToByte(textBox5.Text, 16); UInt16 cID = (UInt16)Convert.ToInt16(textBox13.Text, 16); byte[] data = ZigbeeCommon.HexStrtoB(textBox6.Text); ZigbeeApi.Instance.ReqSendCommand(addr, point, cID, data); }
private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (sp.IsOpen == false) { MessageBox.Show("串口未打开!", "提示"); } else { if (textBox14.Text != "") { byte[] key = ZigbeeCommon.HexStrtoB(textBox14.Text); if (key != null) { ZigbeeApi.Instance.ReqWritePreConfigKey(key); } } } }