Example #1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            int maxValue, maxDraw;

            if (int.TryParse(this.tbMaxValue.Text, out maxValue) &&
                int.TryParse(this.tbMaxDrawn.Text, out maxDraw))
            {
                game = new Lottery(maxValue, maxDraw);

                this.btnNext.Enabled = true;

                this.btnAll.Enabled = true;
            }
            else
            {
                MessageBox.Show("Enter integers");
            }
        }