public Callback(UpdatePlayerGrid grid, UpdatePlayerScore score, GameMessageDelegate msg, ChatMessageDelegate chat) { m_curDispatch = Dispatcher.CurrentDispatcher; m_updateGrid += grid; m_updateScore += score; m_gameMessage += msg; m_chatMessage += chat; }
public Callback(UpdatePlayerGrid grid, UpdatePlayerScore score, GameMessageDelegate msg, ChatMessageDelegate chat) { m_curDispatch = Dispatcher.CurrentDispatcher; m_updateGrid += grid; m_updateScore += score; m_gameMessage += msg; m_chatMessage += chat; }
/// <summary> /// Get a Chat message, and send it to the interface /// </summary> /// <param name="Visibility">Visibility of the message (public/private)</param> /// <param name="FromUserName">The user that send this message</param> /// <param name="Message">The message itself</param> public void ReceiveChatMessage(string Visibility, string FromUserName, string Message) { string chatline = FromUserName + ": (" + Visibility + ") " + Message; Console.WriteLine("Chat: " + FromUserName + ": (" + Visibility + ") " + Message); ChatMessageDelegate cmd = new ChatMessageDelegate(_Interface.ChatMessage); _Interface.Invoke(cmd, new Object[] { chatline }); }