Exemplo n.º 1
0
 private void del_comboBox_and_numericUpDown_from_form(comboBox_and_numericUpDown cb_and_nud)
 {
     last_h   -= delta_size;
     this.Size = new Size(this.Size.Width, this.Size.Height - delta_size);
     this.Controls.Remove(cb_and_nud.cb);
     this.Controls.Remove(cb_and_nud.nud);
 }
Exemplo n.º 2
0
 public void push_comboBox_and_numericUpDown(comboBox_and_numericUpDown cb_and_nud)
 {
     if (list != null)
     {
         list.Add(cb_and_nud);
         add_comboBox_and_numericUpDown_to_form(cb_and_nud);
     }
 }
Exemplo n.º 3
0
 private void add_comboBox_and_numericUpDown_to_form(comboBox_and_numericUpDown cb_and_nud)
 {
     cb_and_nud.cb.Location  = new Point(shift_for_comboBox, last_h);
     cb_and_nud.nud.Location = new Point(shift_for_numericUpDown, last_h);
     last_h   += delta_size;
     this.Size = new Size(this.Size.Width, this.Size.Height + delta_size);
     this.Controls.Add(cb_and_nud.cb);
     this.Controls.Add(cb_and_nud.nud);
 }
Exemplo n.º 4
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     if (list != null)
     {
         while (list.Count != numericUpDown1.Value)
         {
             if (list.Count < numericUpDown1.Value)
             {
                 comboBox_and_numericUpDown cb_and_nud = new comboBox_and_numericUpDown();
                 push_comboBox_and_numericUpDown(cb_and_nud);
             }
             else
             {
                 pop_comboBox_and_numericUpDown();
             }
         }
     }
 }