private void AbortGame(object sender, ResponseEventArgs e) { AbortGameResponse response = e.Response as AbortGameResponse; if (response != null) { if (response.IsSuccess) { _stateGame = StateGame.Finished; ShowGameResult(ClientManager.Instance.PlayerNickname, "Противник покинул игру"); } else { MessageBox.Show(response.Error); } } ClientManager.Instance.Callback.RemoveHandler <AbortGameResponse>(); }
public void AbortGame(AbortGameResponse response) { syncContext.Post(new SendOrPostCallback(OnBroadcast <AbortGameResponse>), response); }