예제 #1
0
        /// <summary>
        /// EventListener für den Spiel starten Buntton
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSpielStarten_Click(object sender, EventArgs e)
        {
            if (!_gameRunning)
            {
                btnOptionen.Enabled          = false;
                btnRanglisteAnzeigen.Enabled = false;

                _playTime           = 0;
                _lastButton         = 0;
                txtPunktestand.Text = "0";
                _fieldEditScore.ReSetNameAndScore();

                SetOptions();

                BuildButtonField();

                ResetField();

                btnSpielStarten.Text = "Spiel Beenden";

                tmr.Start();
            }
            else
            {
                StopGame();
                btnSpielStarten.Text = "Spiel Starten";
                _gameRunning         = false;
            }
        }
예제 #2
0
 /// <summary>
 /// Setzt das Spiel zurück und startet es neu
 /// </summary>
 /// <param name="sender">Der Start Button</param>
 /// <param name="e">Die Event Argumente</param>
 private void BtnStart_Click(object sender, EventArgs e)
 {
     if (tmrGame.Enabled)
     {
         tmrGame.Stop();
     }
     _playerScore     = 0;
     txtScore.Text    = _playerScore.ToString();
     _currentPlayTime = 0;
     if (_lastFlippedButtonIndex < _boxList.Count)
     {
         _boxList[_lastFlippedButtonIndex].BackColor = _boxColor;
     }
     _lastFlippedButtonIndex = 0;
     _editScoreForm.ReSetNameAndScore();
     tmrGame.Start();
 }
예제 #3
0
        private void BtnStart_Click(object sender, EventArgs e)
        {
            btnOptions.Enabled   = false;
            btnScoreList.Enabled = false;

            _timePlayed      = 0;
            _indexLastOpened = 0;
            lblPoints.Text   = "0 P.";
            lblTime.Text     = _playTime + " Sek.";
            _editScore.ReSetNameAndScore();

            ResetField();

            btnStart.Text = "Spiel neustarten";

            tmrGame.Start();
        }