void EditOutputSetToolStripMenuItem1Click(object sender, EventArgs e)
 {
     if (dataGridView3.CurrentRow != null)
     {
         DigitalOutputSet dose           = (DigitalOutputSet)dataGridView3.CurrentRow.Tag;
         AddEditDigitalOutputSetDialog d = new AddEditDigitalOutputSetDialog(Configuration, dose);
         if (d.ShowDialog(this) == DialogResult.OK)
         {
             ShowDigitalOutputSets();
         }
     }
 }
        void AddOutputSetToolStripMenuItemClick(object sender, EventArgs e)
        {
            AddEditDigitalOutputSetDialog d = new AddEditDigitalOutputSetDialog(Configuration, null);

            if (d.ShowDialog(this) == DialogResult.OK)
            {
                List <DigitalOutput> doses = new List <DigitalOutput>(Configuration.DigitalOutputs);
                doses.Add(d.DigitalOutputSet);
                Configuration.DigitalOutputs = doses.ToArray();
                ShowDigitalOutputSets();
            }
        }