protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(ErrCode); stream.WriteString(QrCode, 150); stream.WriteString(ProductImage, 150); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt32(ProductNum); stream.WriteByteArray(DeviceID); stream.WriteInt16(DeviceType); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); ErrCode = stream.ReadInt16(); QrCode = stream.ReadString(150); ProductImage = stream.ReadString(150); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); TransID = stream.ReadInt16(); BoxNum = stream.ReadInt16(); Amount = stream.ReadInt16(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(TransID); stream.WriteInt16(Coins); stream.WriteByte((byte)CoinType); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); TransID = stream.ReadInt16(); Coins = stream.ReadInt16(); CoinType = stream.ReadByte(); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); CoinsPerTimes = stream.ReadByte(); WinCoins = stream.ReadInt16(); WinTicket = stream.ReadInt16(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteByte((byte)CoinsPerTimes); stream.WriteInt16(WinCoins); stream.WriteInt16(WinTicket); }
protected virtual void ReadData(MsgDataStream stream) { stream.ReadByteArray(2); ADR = stream.ReadInt16(); stream.ReadInt16(); //PID stream.ReadInt16(); //len }
public Byte[] GetMsgData() { if (_MsgData != null) { return(_MsgData); } System.IO.MemoryStream mem = new System.IO.MemoryStream(); MsgDataStream msgstm = new MsgDataStream(mem); WriteData(msgstm); msgstm.WriteByteArray(new byte[] { 0, 0, 0xFE, 0x73 }); _MsgData = mem.ToArray(); mem.Close(); int datalen = _MsgData.Length - 12; _MsgData[6] = (byte)((datalen >> 8) & 0xFF); _MsgData[7] = (byte)((datalen) & 0xFF); byte sum = _MsgData[0]; byte xor = _MsgData[0]; for (int i = 1; i < _MsgData.Length - 4; i++) { sum = (byte)(sum + _MsgData[i]); xor = (byte)(xor ^ _MsgData[i]); } _MsgData[datalen + 8] = sum; _MsgData[datalen + 9] = xor; return(_MsgData); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); ProductNum = stream.ReadInt32(); DeviceID = stream.ReadByteArray(16); DeviceType = stream.ReadInt16(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(TransID); stream.WriteInt16(BoxNum); stream.WriteInt16(Amount); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(ErrCode); stream.WriteInt16(ItemID); stream.WriteInt32(Value); stream.WriteInt32(MaxValue); stream.WriteInt32(MinValue); byte[] bts = Utility.UnicodeToGB2312ToByte(ItemName, 32); stream.WriteByteArray(bts); if (ItemDiscribe == null) { stream.WriteByte(0); } else { byte[] bts2 = System.Text.Encoding.Unicode.GetBytes(ItemDiscribe); var gb2312 = Encoding.GetEncoding("GB2312"); byte[] bts3 = Encoding.Convert(Encoding.Unicode, gb2312, bts2); stream.WriteByte((byte)bts3.Length); stream.WriteByteArray(bts3); } }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); BoxNum = stream.ReadInt16(); Price = stream.ReadInt32(); OrderNum = stream.ReadHex(16); TimeOut = stream.ReadByte(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(ErrCode); stream.WriteInt16(ItemID); stream.WriteInt32(ItemValue); stream.WriteByte(Display); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(BoxNum); stream.WriteInt32(Price); stream.WriteHex(OrderNum); stream.WriteByte(TimeOut); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(State); stream.WriteInt16(RemainCoin); stream.WriteInt16(RemainSec); stream.WriteInt16(ErrCode); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); State = stream.ReadInt16(); RemainCoin = stream.ReadInt16(); RemainSec = stream.ReadInt16(); ErrCode = stream.ReadInt16(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(TransID); stream.WriteInt32(OutGift); stream.WriteByte((byte)GiftType); stream.WriteByte((byte)GiftPort); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); TransID = stream.ReadInt16(); OutGift = stream.ReadInt32(); GiftType = stream.ReadByte(); GiftPort = stream.ReadByte(); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); ErrCode = stream.ReadInt16(); ItemID = stream.ReadInt16(); ItemValue = stream.ReadInt32(); Display = stream.ReadByte(); }
protected virtual void WriteData(MsgDataStream stream) { stream.WriteByte(0xEF); stream.WriteByte(0x37); stream.WriteInt16(ADR); stream.WriteInt16(PID); stream.WriteInt16(0);//len }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); ErrCode = stream.ReadInt16(); PCoins = stream.ReadInt32(); ECoins = stream.ReadInt32(); PGifts = stream.ReadInt32(); PTickets = stream.ReadInt32(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(ErrCode); stream.WriteInt32(PCoins); stream.WriteInt32(ECoins); stream.WriteInt32(PGifts); stream.WriteInt32(PTickets); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); TransID = stream.ReadInt16(); BoxNum = stream.ReadInt16(); Price = stream.ReadInt16(); Cost = stream.ReadInt16(); Name = stream.ReadString(64); Url = stream.ReadString(200); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteByte((byte)CoinsPerTimes); stream.WriteByte((byte)GameSec); stream.WriteByte((byte)LowPower); stream.WriteByte((byte)HightPower); stream.WriteInt16(WinCoins); stream.WriteInt16(WinGifts); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(TransID); stream.WriteInt16(BoxNum); stream.WriteInt16(Price); stream.WriteInt16(Cost); stream.WriteString(Name, 64); stream.WriteString(Url, 200); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); CoinsPerTimes = stream.ReadByte(); GameSec = stream.ReadByte(); LowPower = stream.ReadByte(); HightPower = stream.ReadByte(); WinCoins = stream.ReadInt16(); WinGifts = stream.ReadInt16(); }
protected override void WriteData(MsgDataStream stream) { base.WriteData(stream); stream.WriteInt16(TransID); stream.WriteByte((byte)WinList.Count); byte[] list = new byte[WinList.Count]; for (int i = 0; i < WinList.Count; i++) { list[i] = (byte)WinList[i]; } stream.WriteByteArray(list); }
protected override void ReadData(MsgDataStream stream) { base.ReadData(stream); ErrCode = stream.ReadInt16(); int MenuItemscount = stream.ReadByte(); MenuItems = new int[MenuItemscount]; for (int i = 0; i < MenuItemscount; i++) { MenuItems[i] = stream.ReadInt16(); } }