예제 #1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            int noOfPlayers     = 0;
            int timeForOneRound = 730;

            try
            {
                noOfPlayers = Convert.ToInt16(nlblNumberOfPlayers.Value);
            }
            catch
            {
                MessageBox.Show("Warning: Value for Number-of-Players is not valid!");
            }

            if (Convert.ToInt16(nlblTimeForOneRound.Value) > 0)
            {
                try
                {
                    timeForOneRound = Convert.ToInt16(nlblTimeForOneRound.Value);
                }
                catch
                {
                    MessageBox.Show("Warning: Value for Time-per-round is not valid! ");
                }
            }

            if (noOfPlayers < 20)
            {
                MessageBox.Show("Sorry, min players for this game is 20. Thanks");
            }
            else
            {
                ChurchGamePage2 Page2 = new ChurchGamePage2(noOfPlayers, timeForOneRound);
                Page2.Show();
                this.Hide();
                //   this.Close();
            }
        }
예제 #2
0
        /*  private void btnSlower2_Click(object sender, EventArgs e)
         * {
         *    timerElapse.Interval = 2000;
         *    timerCheck.Interval = 2000;
         *    timerCountDown.Interval = 2000;
         * }*/

        /*private void btnOpenAudioFile_Click(object sender, EventArgs e)
         * {
         *  OpenFileDialog open1 = new OpenFileDialog();
         *  if (open1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         *  {
         *      audioFilePath = open1.FileName;
         *
         *      MessageBox.Show("Audio Has been successfully enterd into the system, Thanks.");
         *  }
         * }*/

        void fileExitMenuItem_Click(object sender, ChurchGamePage2 e)
        {
            // Close this window
            this.Close();
        }