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); }
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); } }
public static void Send(ChatAudienceTypeE audienceType, ChatMessageTypeE messageType, ChatTypeE chatType, int id, string message, int gameID) { SocketClient.ChatMessage(audienceType, messageType, chatType, id, message, gameID); }
public static void Write(ChatTypeE receiverType, ChatMessageTypeE type, ChatTypeE chatType, MsgE message, int gameId) { ChatClient.Instance.WriteLine(receiverType, type, chatType, message, gameId); }
// 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); }