Beispiel #1
0
        public void GameProcesstime()
        {
            ResultForm resultFormOnGameForm = new ResultForm();

            ScoreCountLabelOnGameForm.Text = Convert.ToString(score);


            do
            {
                if (operation == 1)
                {
                    Plus();
                    conditionwritetimemode();
                }
                else if (operation == 0)
                {
                    Minus();
                    conditionwritetimemode();
                }
                else if (operation == 2)
                {
                    Power();
                    conditionwritetimemode();
                }
                else if (operation == 3)
                {
                    Divide();
                    conditionwritetimemode();
                }
                if (timelimiter == false)
                {
                    break;
                }
            }while (timelimiter == false);

            if (timelimiter == false)
            {
                timer1.Enabled = false;
                MessageBox.Show("Время вышло!");
                resultFormOnGameForm.elapsedTimeSeconds  = s;
                resultFormOnGameForm.elspasedTimeMinutes = m;
                resultFormOnGameForm.scoreoonResultForm  = score;
                resultFormOnGameForm.numerOnResultForm   = numer;
                resultFormOnGameForm.gamemodenumber      = gamemode;
                resultFormOnGameForm.iongame             = i;

                resultFormOnGameForm.Show();
                this.Close();
            }
        }
Beispiel #2
0
        public void GameProcesstraining()
        {
            ResultForm resultFormOnGameForm = new ResultForm();

            ScoreCountLabelOnGameForm.Text = Convert.ToString(score);

            do
            {
                {
                    if (operation == 1)
                    {
                        Plus();
                        conditionwritetrainingmode();
                    }
                    else if (operation == 0)
                    {
                        Minus();
                        conditionwritetrainingmode();
                    }
                    else if (operation == 2)
                    {
                        Power();
                        conditionwritetrainingmode();
                    }
                    else if (operation == 3)
                    {
                        Divide();
                        conditionwritetrainingmode();
                    }
                }
            } while (i > numer);
            if (i == numer)
            {
                timer1.Enabled = false;
                MessageBox.Show("Игра окончена!");
                resultFormOnGameForm.elapsedTimeSeconds  = s;
                resultFormOnGameForm.elspasedTimeMinutes = m;
                resultFormOnGameForm.scoreoonResultForm  = score;
                resultFormOnGameForm.numerOnResultForm   = numer;
                resultFormOnGameForm.gamemodenumber      = gamemode;
                resultFormOnGameForm.Show();
                this.Close();
            }
        }