Пример #1
0
        public void GetEraseBlockCmdTest()
        {
            CmdFileManage cf = new CmdFileManage();

            byte[] ret = cf.GetEraseBlockCmd(0x00, 0x00);
            Assert.AreEqual(ret.Count(), 7);
            Assert.AreEqual(ret[6], 0xD6);
        }
Пример #2
0
        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.GetEraseBlockCmd(hiAddr, loAddr);
            richTextBox1.Text = DataChange.byteToHexStr(addrc);
        }