Example #1
0
        private void textBox3_TextChanged(object sender, EventArgs e)
        {
            string hexStr = (sender as TextBox).Text.Trim().Replace(" ", "");

            byte[] data = Byter.HexToBytes(hexStr); // 解析16进制数据为byte

            Byter byter = new Byter(data);          // 数据转码

            textBox4.Text = checkBox1.Checked ? byter.ToString() : byter.ToString2();
        }
Example #2
0
        /// <summary>
        /// 获取Field对应数据的所有Byter解析信息
        /// </summary>
        /// <param name="fieldName"></param>
        /// <returns></returns>
        public string GetField_ByterStr(string fieldName)
        {
            byte[] data  = GetFieldBytes(fieldName); // 获取field对应数据
            Byter  byter = new Byter(data);          // 对数据进行解析

            if (fieldName.StartsWith("@Ex_"))
            {
                return(byter.ToString2());
            }
            return(byter.ToString());
        }
Example #3
0
        public string Test(string filedName)
        {
            byte[] data  = GetFieldBytes(filedName);
            Byter  byter = new Byter(data);

            //byte[] B = new byte[] { 0x02, 0xB0 };
            //string B_Str = Byter.ToHexStr(B);
            //string LEB128_B_Str = Byter.To_LEB128_HexStr(B);
            //long L = Byter.To_LEB128_Long(B);

            return(byter.ToString());
        }