Beispiel #1
0
 private void RenullControl()
 {
     isOld = false;
     panelTech.Controls.Clear();
     ftuc.Dispose();
     ftuc = new FreeTechnologyUserControl();
     panelTech.Controls.Add(ftuc);
 }
Beispiel #2
0
 //конструктор для редактируемой технологии
 public FreeTechUserControl(Technology tech, int index, DataGridViewRow DGVR)
 {
     InitializeComponent();
     isOld                     = true;
     this.index                = index;
     this.DGVR                 = DGVR;
     buttonMake.Text           = "Сохранить изменения";
     textBoxName.Text          = tech.name;
     textBoxAct.Text           = tech.act;
     textBoxDetNum.Text        = tech.num;
     Globals.TxtBoxEngine.Text = tech.engine;
     Globals.TxtBoxShifr.Text  = tech.shifr;
     ftuc = new FreeTechnologyUserControl(tech);
     panelTech.Controls.Add(ftuc);
 }
 private void comboBoxDet_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBoxDet.SelectedIndex != -1)
     {
         BaseTechnology technology = numberToBaseTech[comboBoxDet.SelectedItem.ToString()];
         ftuc = new FreeTechnologyUserControl(technology);
         panelTech.Controls.Clear();
         panelTech.Controls.Add(ftuc);
         textBoxName.Text     = technology.name;
         buttonDelete.Enabled = true;
     }
     else
     {
         buttonDelete.Enabled = false;
     }
 }
Beispiel #4
0
        FreeTechnologyUserControl ftuc;     // юзерконтрол с технологией

        //конструктор для вновь создаваемой технологии
        public FreeTechUserControl()
        {
            InitializeComponent();
            ftuc = new FreeTechnologyUserControl();
            panelTech.Controls.Add(ftuc);
        }