Exemple #1
0
        private void comboBoxBolids_SelectedIndexChanged(object sender, EventArgs e)
        {
            HandlerFromFields handler = HandlersRepository.ListOfHandlers[comboBoxBolids.SelectedIndex];

            ChangeFieldAccordingWithHandler(handler);
            changeModFlag = false;
        }
Exemple #2
0
 private void ChangeFieldAccordingWithHandler(HandlerFromFields handler)
 {
     for (int i = 0; i < handler.LabelNames.Length; i++)
     {
         labelsForBolids[i].Text     = handler.LabelNames[i];
         labelsForBolids[i].Visible  = true;
         textboxForBolids[i].Visible = true;
     }
     for (int i = handler.LabelNames.Length; i < labelsForBolids.Length; i++)
     {
         labelsForBolids[i].Text     = "";
         labelsForBolids[i].Visible  = false;
         textboxForBolids[i].Visible = false;
     }
 }
Exemple #3
0
        public void comboBoxObjects_SelectedIndexChanged(object sender, EventArgs e)
        {
            List <string> fields = new List <string>();

            currentBolid         = (Bolid)comboBoxObjects.SelectedItem;
            currentComboboxIndex = comboBoxObjects.SelectedIndex;
            int index = GetIndexOfHandler(currentBolid);

            comboBoxBolids.SelectedIndex = index;
            editingCreator = EditingCreatorRepository.ListOfEditingCreators[comboBoxBolids.SelectedIndex];
            editingCreator.FactoryMethod(currentBolid, fields);
            HandlerFromFields handler = HandlersRepository.ListOfHandlers[comboBoxBolids.SelectedIndex];

            ChangeFieldAccordingWithHandler(handler);
            FillFields(fields);
            changeModFlag = true;
            //bolidsRepository.Bolid.RemoveAt(currentComboboxIndex);
        }