Пример #1
0
 private void SaveControls(IControlSave cs)
 {
     foreach (Control c in groupBox1.Controls)
     {
         SaveLoad.saveControl(cs, c);
     }
     foreach (Control c in groupBox2.Controls)
     {
         SaveLoad.saveControl(cs, c);
     }
     cs.SaveTextBox(labelDirectory.Name, labelDirectory.Text);
 }
Пример #2
0
 public static void saveControl(IControlSave cs, Control c)
 {
     if (c is TextBox)
     {
         cs.SaveTextBox(c.Name, c.Text);
     }
     else if (c is ComboBox)
     {
         cs.SaveComboBox(c.Name, c.Text);
     }
     else if (c is CheckBox)
     {
         cs.SaveCheckBox(c.Name, (c as CheckBox).Checked);
     }
 }
Пример #3
0
 public static void saveControl(IControlSave cs, Control c)
 {
     if (c is TextBox)
     {
         cs.SaveTextBox(c.Name, c.Text);
     }
     else if (c is ComboBox)
     {
         cs.SaveComboBox(c.Name, c.Text);
     }
     else if (c is CheckBox)
     {
         cs.SaveCheckBox(c.Name, (c as CheckBox).Checked);
     }
 }
Пример #4
0
 private void SaveControls(IControlSave cs)
 {
     foreach (Control c in groupBox1.Controls)
     {
         SaveLoad.saveControl(cs, c);
     }
     foreach (Control c in groupBox2.Controls)
     {
         SaveLoad.saveControl(cs, c);
     }
     cs.SaveTextBox(labelDirectory.Name, labelDirectory.Text);
 }