Пример #1
0
        private void GameServiceProxy_OnGameEvent(object sender, OnGameEventArgs e)
        {
            ConsoleLog.Document += $"{e.UserName} wanna play with u.";
            Window gameWindow = GameWindowFactory.GetGameWindow(e.UserName);

            gameWindow.Show();
        }
Пример #2
0
 private void SendGameRequest()
 {
     if (ChosenContact != null)
     {
         GameResponse response = GameServiceProxy.Game(new GameRequest {
             UserOpponent = ChosenContact.UserName
         });
         if (response.IsSuccess == true) //contact accepted invetion
         {
             Window gameWindow = GameWindowFactory.GetGameWindow(chosenContact.UserName);
             gameWindow.Show();
         }
         ConsoleLog.Document = $" {response.IsSuccess} +\n {response.Message}";
     }
 }