コード例 #1
0
ファイル: ClientListManager.cs プロジェクト: wizir/Gold-Chat
 public void Execute()
 {
     prepareResponse();
     if (Received.strMessage == "Friends")
     {
         SendFriendsList sendFriends = new SendFriendsList(Client, Send);
         sendFriends.Execute();
     }
     else if (Received.strMessage == "ChannelsJoined")
     {
         SendChannelsListJoined sendJoined = new SendChannelsListJoined(Client, Send);
         sendJoined.Execute();
     }
     else if (Received.strMessage == "IgnoredUsers")
     {
         SendListOfIgnoredUsers sendListIgnoredUsers = new SendListOfIgnoredUsers(Client, Send);
         sendListIgnoredUsers.Execute();
     }
     else if (Received.strMessage == "Channel")
     {
         SendChannelList sendChannelList = new SendChannelList(ChannelsList, Send);
         sendChannelList.Execute();
     }
     else if (Received.strMessage == "ChannelUsers") //send user with enter to channel list of users
     {
         SendListOfUsersInChannel sendListOfUsersInChannel = new SendListOfUsersInChannel(ChannelsList, Send, Received);
         sendListOfUsersInChannel.Execute();
     }
     else
     {
         SendOnlineListOfClients sendOnlineUsers = new SendOnlineListOfClients(ListOfClientsOnline, Send);
         sendOnlineUsers.Execute();
     };
 }
コード例 #2
0
        public void Execute()
        {
            prepareResponse();
            if (Received.strMessage == "Friends")
            {
                SendFriendsList sendFriends = new SendFriendsList(Client, Send);
                sendFriends.Execute();
            }

            else if (Received.strMessage == "ChannelUsers")
            {
                SendListOfUsersInChannel sendListOfUsersInChannel = new SendListOfUsersInChannel(ChannelsList, Send, Received);
                sendListOfUsersInChannel.Execute();
            }
            else
            {
                SendOnlineListOfClients sendOnlineUsers = new SendOnlineListOfClients(ListOfClientsOnline, Send);
                sendOnlineUsers.Execute();
            }
        }