Beispiel #1
0
 protected void btnDraw_Click(object sender, EventArgs e)
 {
     JAMK.IT.IIO11300.Lotto lotto = new JAMK.IT.IIO11300.Lotto(ddlType.SelectedItem.Text);
     try
     {
         int lines = int.Parse(txtLines.Text);
         lblOutput.Text = lotto.DrawNumbers(lines);
     }
     catch (Exception ex)
     {
         lblOutput.Text = ex.Message;
     }
 }
        private void btnDraw_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                string type = cbGame.SelectedValue.ToString();
                int drawns = int.Parse(tbDrawns.Text);

                Lotto lotto = new Lotto(type);
                tbNumbers.Text = lotto.DrawNumbers(drawns);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #3
0
        private void btnDraw_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                string type   = cbGame.SelectedValue.ToString();
                int    drawns = int.Parse(tbDrawns.Text);

                Lotto lotto = new Lotto(type);
                tbNumbers.Text = lotto.DrawNumbers(drawns);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }