예제 #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         count = new Counter16(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text), Convert.ToInt32(textBox3.Text));
         setValuesOnForm();
         MessageBox.Show("Создал счетчик!");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString());
     }
 }
예제 #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            int min = rnd.Next(0, 100);
            int def = rnd.Next(0, 10000);
            int val = rnd.Next(min, min + def);

            try
            {
                count = new Counter16(min, min + def, val);
                setValuesOnForm();
                MessageBox.Show("Создал счетчик!");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
예제 #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     count = new Counter16();
     setValuesOnForm();
     MessageBox.Show("Создал счетчик!");
 }