private void StopAllTimers() { waitForOtherPlayerTimer.Stop(); isConnectedTimer.Stop(); CheckIfSomeoneJoinedToGameTimer.Stop(); CheckIfSomeoneSetUpAnewGame.Stop(); }
private void WaitForOtherPlayerTimer_Tick(object sender, EventArgs e) { if (_isConnectedToServer) { _waitingTime -= 1; createGameButton.Text = "Oczekiwanie na przeciwnika (" + _waitingTime.ToString() + "s" + ")"; if (_waitingTime == 0) { _thisStationSetUpANewGame = false; waitForOtherPlayerTimer.Stop(); _waitingTime = 10; playerNameTextBox.Enabled = true; DeletePlayersFromWaitingRoom(); CheckIfSomeoneJoinedToGameTimer.Stop(); waitForOtherPlayerTimer.Stop(); EnableButtons(true); createGameButton.Text = "Stwórz grę"; } } }