コード例 #1
0
ファイル: ClientBan.cs プロジェクト: wizir/Gold-Chat
        private void sendMessageToUsers()
        {
            SendMessageToAll sendToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline);

            sendToAll.Send.strMessage2 = "User: "******" banned for: " + BanReason + " untill: " + BanTime;
            sendToAll.ResponseToAll();
        }
コード例 #2
0
        public override void Response()
        {
            SendMessageToAll sendToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline);

            sendToAll.ResponseToAll();

            OnClientSendMessage(Send.strMessage);
        }
コード例 #3
0
 private void ResponseToAll()
 {
     if (Send.strMessage == "You are succesfully Log in") // клиент успешно залогинился и все юзеры получают сообщение
     {
         Send.strMessage = "<<<" + Received.strName + " has joined the room>>>";
         SendMessageToAll sendMsgToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline);
         sendMsgToAll.ResponseToAll();
     }
 }
コード例 #4
0
ファイル: ClientLogin.cs プロジェクト: wizir/Gold-Chat
 private void ResponseToAll()
 {
     if (Send.strMessage == "You are succesfully Log in") // Client succesfully login and rest of online users will got this msg below
     {
         Send.strMessage = "<<<" + Received.strName + " has joined the room>>>";
         SendMessageToAll sendMsgToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline);
         sendMsgToAll.ResponseToAll();
     }
 }
コード例 #5
0
ファイル: ClientKick.cs プロジェクト: wizir/Gold-Chat
 public override void Response()
 {
     if (isKicked)
     {
         SendMessageToAll sendToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline); // Ignored users wont get this msg
         sendToAll.ResponseToAll();
         KickeUser.cSocket.Close();
     }
     else
     {
         base.Response();
     }
 }
コード例 #6
0
 public override void Response()
 {
     if (Received.strMessage2 == null)
     {
         SendMessageToAll sendToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline);
         sendToAll.ResponseToAll();
     }
     else
     {
         string channelName = Received.strMessage2;
         SendMessageToChannel sendToChannel = new SendMessageToChannel(Send, ListOfClientsOnline, channelName);
         sendToChannel.ResponseToChannel();
         OnClientChannelMessage(Send.strMessage, Received.strName + ": " + Received.strMessage + " On:" + channelName);
     }
 }
コード例 #7
0
        public override void Response()
        {
            if (!isUserJoinAfterCreate)
            {
                Send.strMessage2 = "You are joinet to channel " + ChannelName + ".";
                Send.strMessage3 = "ChannelJoined";
                base.Response();
            }
            else
            {
                Send.strMessage  = ChannelName;
                Send.strMessage2 = "CreatedChannel";

                SendMessageToAll sendToAll = new SendMessageToAll(Client, Send, ListOfClientsOnline); // Ignored users wont get new channel list
                sendToAll.ResponseToAll();
            }
            OnClientJoinChannel(ChannelName, Client.strName);
        }
コード例 #8
0
 public static void AddGameToServerListener(SendMessageToAll allUser)
 {
     _sendMessageEveryBody += allUser;
 }