private void button1_Click(object sender, EventArgs e) { byte hiAddr = Convert.ToByte(textBox1.Text, 16); byte loAddr = Convert.ToByte(textBox2.Text, 16); CmdFileManage ci = new CmdFileManage(); addrc = ci.GetExcuteCommonCmd(hiAddr, loAddr); richTextBox1.Text = DataChange.byteToHexStr(addrc); }
public void GetExcuteCommonCmdTest() { CmdFileManage cf = new CmdFileManage(); byte[] ret = cf.GetExcuteCommonCmd(0x00, 0x01); Assert.AreEqual(ret.Count(), 7); Assert.AreEqual(ret[6], 0xDE); Assert.AreEqual(ret[0], 0xAA); Assert.AreEqual(ret[1], 0x06); Assert.AreEqual(ret[2], 0x01); Assert.AreEqual(ret[3], 0xD8); }