Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                int bt;
                Int32.TryParse(txtBatch.Text, out bt);
                Color c = Color.FromName(comboBox1.SelectedItem.ToString());
                Batch b = new Batch(bt, c);
                b.setRepeat(chkRepeat.Checked);
                bList.Add(b);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            txtBatch.Text           = "";
            comboBox1.SelectedIndex = -1;
            updateTable();
        }
Пример #2
0
 public void setBatch(Batch b)
 {
     batch.setBatch(b.getBatch());
     batch.setColor(b.getColor());
     batch.setRepeat(b.getRepeat());
 }