示例#1
0
        private void linkLabelInstrumentRatings_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var newInstrumentRating = new SpecialistInstrumentRating();

            _license.SpecialistInstrumentRatings.Add(newInstrumentRating);
            AddInstrumentRatingControl(newInstrumentRating);
        }
        public void UpdateControl(SpecialistInstrumentRating instrumentRating)
        {
            _instrumentRating = instrumentRating;

            comboBoxIcao.Items.Clear();
            comboBoxMCDH.Items.Clear();
            comboBoxMV.Items.Clear();
            comboBoxRVR.Items.Clear();
            comboBoxToRVR.Items.Clear();

            foreach (var o in LicenseIcao.Items)
            {
                comboBoxIcao.Items.Add(o);
            }

            var ints = new object[] { 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000 };

            comboBoxMCDH.Items.AddRange(new object[] { 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 });
            comboBoxMV.Items.AddRange(ints);
            comboBoxRVR.Items.AddRange(ints);
            comboBoxToRVR.Items.AddRange(ints);

            comboBoxIcao.SelectedItem  = _instrumentRating.Icao;
            comboBoxMCDH.SelectedItem  = _instrumentRating.MC;
            comboBoxMV.SelectedItem    = _instrumentRating.MV;
            comboBoxRVR.SelectedItem   = _instrumentRating.RVR;
            comboBoxToRVR.SelectedItem = _instrumentRating.TORVR;
            dateTimePickerIssue.Value  = _instrumentRating.IssueDate;
        }
示例#3
0
        private void AddInstrumentRatingControl(SpecialistInstrumentRating instrumentRating)
        {
            var control = new EmployeeLicenseInstrumentRatingControl();

            control.UpdateControl(instrumentRating);
            control.Deleted += InstrumentRatingControl_Deleted;

            flowLayoutPanelInstrumentRatings.Controls.Remove(linkLabelInstrumentRatings);
            flowLayoutPanelInstrumentRatings.Controls.Add(control);
            flowLayoutPanelInstrumentRatings.Controls.Add(linkLabelInstrumentRatings);
            flowLayoutPanelInstrumentRatings.Height += 60;
        }