コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Pewpo/IIO11300
        private void btnDraw_Click(object sender, RoutedEventArgs e)
        {
            try
            {



                txtBox.Text = String.Empty;
                string Lines = txtboxNumber.Text;
                // From string to int
                 numVal = Int32.Parse(Lines);

                if (numVal >= 15)
                {
                    MessageBox.Show("Select 1-14 drawns.");
                }
                else
                {
                    BLWindow window = new BLWindow();
                    txtBox.AppendText(window.drawGame(cmbGame.Text, numVal).ToString());

                }



            }

            catch (Exception ex)
            {
                MessageBox.Show("Select number of drawns.");
            }
        }
コード例 #2
0
        private void btnDraw_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                txtBox.Text = String.Empty;
                string Lines = txtboxNumber.Text;
                // From string to int
                numVal = Int32.Parse(Lines);

                if (numVal >= 15)
                {
                    MessageBox.Show("Select 1-14 drawns.");
                }
                else
                {
                    BLWindow window = new BLWindow();
                    txtBox.AppendText(window.drawGame(cmbGame.Text, numVal).ToString());
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show("Select number of drawns.");
            }
        }