// 開始ボタンを押したときの処理
        private void StartBtn_Click(object sender, EventArgs e)
        {
            // 出題数を変更する
            if (RB10.Checked)
            {
                mondaiMax = 10;
            }
            if (RB20.Checked)
            {
                mondaiMax = 20;
            }
            if (RB30.Checked)
            {
                mondaiMax = 30;
            }

            // 計算タイプを変更する
            if (RBtasu.Checked)
            {
                type    = 1;
                typeStr = " + ";
            }
            if (RBhiku.Checked)
            {
                type    = 2;
                typeStr = " - ";
            }
            if (RBkakeru.Checked)
            {
                type    = 3;
                typeStr = " × ";
            }
            if (RBwaru.Checked)
            {
                type    = 4;
                typeStr = " ÷ ";
            }

            mondaiCnt     = 0;          // 問題数のカウント初期化
            seikaiCnt     = 0;          // 正解数のカウント初期化
            InBox.Enabled = true;       // InBoxを有効に。フォーカスより前はないとフォーカスできない
            MondaiSakusei();
            InBox.Focus();              // 解答欄へフォーカスを移す
            OutBox.Text   = "";
            StartBtn.Text = "リセット";

            sw.Reset();                 // 計測初期化
            OutBoxFinishTime.Text = ""; // FinishTimeLbl の初期化
            sw.Start();                 // 計測開始
            timer1.Enabled  = true;     // 経過時間表示の繰り返し処理開始
            timer1.Interval = 500;      // 0.5秒ごとに処理を行う
        }//StartBtn_Click
Beispiel #2
0
        private void StartBtn_Click(object sender, EventArgs e)
        {
            //問題を変更する
            if (RB10.Checked)
            {
                mondaiMax = 10;
            }
            if (RB20.Checked)
            {
                mondaiMax = 20;
            }
            if (RB30.Checked)
            {
                mondaiMax = 30;
            }

            //計算タイプを変更
            if (RBtasu.Checked)
            {
                type    = 1;
                typeStr = " + ";
            }
            if (RBhiku.Checked)
            {
                type    = 2;
                typeStr = " - ";
            }
            if (RBkake.Checked)
            {
                type    = 3;
                typeStr = " × ";
            }
            //if (RBwaru.Checked)
            //{
            //    type = 4;
            //    typeStr = " ÷ ";
            //}

            mondaiCnt = 0;
            seikaiCnt = 0;
            Mondaisakusei();
            InBox.Enabled = true;
            InBox.Focus();   //解答欄へフォーカスを移す
        }
Beispiel #3
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            if (RB10.Checked)
            {
                mondaiMax = 10;
            }
            if (RB20.Checked)
            {
                mondaiMax = 20;
            }
            if (RB30.Checked)
            {
                mondaiMax = 30;
            }

            if (RBtasu.Checked)
            {
                type    = 1;
                TypeStr = " + ";
            }
            if (RBhiku.Checked)
            {
                type    = 2;
                TypeStr = " - ";
            }
            if (RBkakeru.Checked)
            {
                type    = 3;
                TypeStr = " × ";
            }
            if (RBwaru.Checked)
            {
                type    = 4;
                TypeStr = " ÷ ";
            }
            mondaiCnt = 0;
            seikaiCnt = 0;
            MondaiSakusei();
            InBox.Enabled = true;
            InBox.Focus();
            StartButton.Text = "リセット";
        }
Beispiel #4
0
        /**
         * ドリル開始メソッド
         * */
        private void StartBtn_Click(object sender, EventArgs e)
        {
            //問題数の作成
            if (ten_questions.Checked)
            {
                MondaiMax = 10;
            }
            if (twenty_questions.Checked)
            {
                MondaiMax = 20;
            }
            if (thirty_questions.Checked)
            {
                MondaiMax = 30;
            }

            //成績変数の初期化
            MondaiCnt  = 0;
            seisekiCnt = 0;
            MondaiSakusei();
            //回答受付
            InBox.Enabled = true;
            InBox.Focus();
        }