/// <summary> /// Получает ответ от сервера, правильно ли раставлины корабли /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ResultSendReady(object sender, ResponseEventArgs e) { SendReadyResponse response = e.Response as SendReadyResponse; if (response != null) { if (response.IsSuccess) { ClientManager.Instance.Callback.RemoveHandler <SendReadyResponse>(); } else { _stateGame = StateGame.PreparationGame; SetEnableControls(_stateGame); messageTextBlock.Text = "Не правильно раставлены корабли"; } } }
public void SendReadyCallback(SendReadyResponse response) { syncContext.Post(new SendOrPostCallback(OnBroadcast <SendReadyResponse>), response); }