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();
        }
 public void setBatch(Batch b)
 {
     batch.setBatch(b.getBatch());
     batch.setColor(b.getColor());
     batch.setRepeat(b.getRepeat());
 }