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.GetReadOnePageCmd(hiAddr, loAddr); richTextBox1.Text = DataChange.byteToHexStr(addrc); }
public void GetReadOnePageCmdTest() { CmdFileManage cf = new CmdFileManage(); byte[] ret = cf.GetReadOnePageCmd(0x00, 0x00); Assert.AreEqual(ret.Count(), 7); Assert.AreEqual(ret[6], 0xD2); Assert.AreEqual(ret[0], 0xAA); Assert.AreEqual(ret[1], 0x06); Assert.AreEqual(ret[2], 0x01); Assert.AreEqual(ret[3], 0xD5); }