Esempio n. 1
0
 public void CloseDialog()
 {
     Replies.Clear();
     QuestionId = 0;
     Id = 0;
     using (BigEndianWriter writer = new BigEndianWriter())
     {
         LeaveDialogRequestMessage msg = new LeaveDialogRequestMessage();
         msg.Serialize(writer);
         MessagePackaging pack = new MessagePackaging(writer);
         pack.Pack((int)msg.ProtocolID);
         account.SocketManager.Send(pack.Writer.Content);
     }
 }
Esempio n. 2
0
        public void Init(AccountUC account)
        {
            LeaveDialogRequestMessage leaveDialogRequestMessage = new LeaveDialogRequestMessage();

            using (BigEndianWriter writer = new BigEndianWriter())
            {
                leaveDialogRequestMessage.Serialize(writer);

                MessagePackaging messagePackaging = new MessagePackaging(writer);

                messagePackaging.Pack((int)leaveDialogRequestMessage.ProtocolID);

                account.SocketManager.Send(messagePackaging.Writer.Content);
                account.LastPacketID.Clear();
            }
        }