Exemplo n.º 1
0
        private void comboBoxSwitch_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            comboBoxRight.Enabled = (comboBoxSwitch.SelectedIndex != 0);

            // Then we make sure to initialize things properly
            if (comboBoxSwitch.SelectedIndex == 0 || comboBoxSwitch.SelectedIndex == 1)
            {
                CurrentSection.Switch = null;

                if (comboBoxSwitch.SelectedIndex == 1 && CurrentSection.RightSection == null)
                {
                    CurrentSection.RightSection = Project.Sections[0];
                }
                else
                {
                    comboBoxRight.SelectedIndex = -1;
                }
            }
            else
            {
                DetectorItem item = (DetectorItem)comboBoxSwitch.SelectedItem;
                CurrentSection.Switch = item.GetFullID();

                CurrentSection.LeftSection  = (CurrentSection.LeftSection == null) ? Project.Sections[0] : CurrentSection.LeftSection;
                CurrentSection.RightSection = (CurrentSection.RightSection == null) ? Project.Sections[0] : CurrentSection.RightSection;
            }
        }
Exemplo n.º 2
0
        private void comboBoxDetector_SelectedIndexChanged(object sender, EventArgs e)
        {
            DetectorItem item = (DetectorItem)comboBoxDetector.SelectedItem;

            Section.Detector = item.GetFullID();
        }