private void WaitForOtherPlayers() { MessageDlgUC dlg = new MessageDlgUC(null, delegate { app.StopMultiPlayerGameWF(); Console.WriteLine("user click on close button"); } , false, false); dlg.Message = "Wait for players...(15 seconds)"; ModalService.ShowModal(dlg); _PlayersBoard.Clear(); _PlayersKey.Clear(); app.StartMultiplayerGameWF(); }
void app_OnGameRequestReceived(GeniusTetrisPlayer player, string message) { _PlayersBoard.Clear(); _PlayersKey.Clear(); ClearAllPlayersBoard(); MessageDlgUC dlg = new MessageDlgUC(delegate { app.AcceptGameRequest(); }, delegate { app.RejectGameRequest(); }, true, true); dlg.Message = message; ModalService.ShowModal(dlg); }