public static void ChatMessage(ChatAudienceTypeE audienceType, ChatMessageTypeE messageType, ChatTypeE chatType, int id, string message, int gameID)
        {
            Kv kv = new Kv();

            kv.Set("MethodName", (int)MethodNameE.ChatMessage);
            kv.Set(StdKv.CurrentUserID, Ap.CurrentUserID);
            kv.Set("AudienceType", (int)audienceType);
            kv.Set("MessageType", (int)messageType);
            kv.Set("ChatType", (int)chatType);
            kv.Set("Id", id);
            kv.Set("Message", message);
            kv.Set("GameID", gameID);
            SocketClient.Instance.InvokeAsync(kv.DataTable);
        }
示例#2
0
        private void WriteLine(ChatTypeE receiverType, ChatMessageTypeE type, ChatTypeE chatType, string message, int gameId)
        {
            if (receiverType != chatType)
            {
                return;
            }

            if (ChatMessageReceived != null)
            {
                ChatMessageEventArgs e = new ChatMessageEventArgs();

                e.Type     = type;
                e.Message  = message;
                e.ChatType = chatType;
                e.GameID   = gameId;

                ChatMessageReceived(this, e);
            }
        }
示例#3
0
 public static void Send(ChatAudienceTypeE audienceType, ChatMessageTypeE messageType, ChatTypeE chatType, int id, string message, int gameID)
 {
     SocketClient.ChatMessage(audienceType, messageType, chatType, id, message, gameID);
 }
示例#4
0
 public static void Write(ChatTypeE receiverType, ChatMessageTypeE type, ChatTypeE chatType, MsgE message, int gameId)
 {
     ChatClient.Instance.WriteLine(receiverType, type, chatType, message, gameId);
 }
示例#5
0
 // write on your chat window
 private void WriteLine(ChatTypeE receiverType, ChatMessageTypeE type, ChatTypeE chatType, MsgE message, int gameId)
 {
     Write(receiverType, type, chatType, Msg.GetMsg(message), gameId);
 }