private void PlayAudioTip(MTMessageType type) { switch (type) { case MTMessageType.chatClosed: //PlayAudio(""); break; case MTMessageType.saleClosed: //PlayAudio(""); break; case MTMessageType.aotherCloseChat: PlayAudio("Yindaoyu_#121a4_G_D"); break; case MTMessageType.aotherCloseSale: PlayAudio("Yindaoyu_#121a4_G_D"); break; case MTMessageType.anotherAway: PlayAudio("Yindaoyu_#121a4_G_D"); break; case MTMessageType.chatTimeout: PlayAudio("Yindaoyu_#121a3_G_D"); break; case MTMessageType.saleTimeout: PlayAudio("Yindaoyu_#121a3_G_D"); break; } }
public virtual void ConvertFromBytes(byte[] datas) { List <byte> result = new List <byte> (); result.AddRange(datas); MessageType = (MTMessageType)result[0]; LogonID = new Guid(result.GetRange(1, 16).ToArray()); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 10: if (field.Type == TType.I64) { SaleId = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.I32) { MessageType = (MTMessageType)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 10: if (field.Type == TType.I64) { SaleId = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.I32) { MessageType = (MTMessageType)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }