Example #1
0
File: Chat.cs Project: tsviet/Chat
 private void SendFile(Message responce)
 {
     if (responce.other != null)
     {
         Server.AddFile(Server.GetActiveRoom(), responce.other, responce.message[0]);
         Server.GetMessageList().Add("File " + responce.other + " added! Click on it to download!");
         IPC(Command.OK);
     }
     else
     {
         IPC(Command.OK, new List <string>()
         {
             Server.GetFile(Server.GetActiveRoom(), responce.message[0])
         });
     }
 }
Example #2
0
File: Chat.cs Project: tsviet/Chat
        private void RefreshCurrentRoom(Message responce)
        {
            if (Server.ServerExist())
            {
                List <string> res = new List <string>();

                foreach (var m in Server.GetMessageList())
                {
                    res.Add(m);
                }
                IPC(Command.OK, res);
            }
            else
            {
                IPC(Command.Error);
            }
        }
Example #3
0
File: Chat.cs Project: tsviet/Chat
 private void SendMessage(Message responce)
 {
     Server.SetActiveChatRoom(responce.other);
     Server.GetMessageList(responce.other).Add(responce.message[0]);
     IPC(Command.OK);
 }