/// <summary> /// Заполняет поля для редактирования директивы /// </summary> public void UpdateInformation(FlightNumber _currentDirective, List <SchedulePeriods> schedulePeriods, FlightNumberScreenType screenType) { if (_currentDirective == null) { return; } _screenType = screenType; UpdateControl(_screenType); //Выставление значений dictionaryComboBoxFlightNo.SelectedItem = _currentDirective.FlightNo; comboBoxAircraftCode.SelectedItem = _currentDirective.FlightAircraftCode; if (_screenType == FlightNumberScreenType.UnSchedule) { comboBoxFlightType.SelectedItem = _currentDirective.FlightType; } else { comboBoxFlightType.SelectedItem = FlightType.Schedule; } comboBoxFlightCategory.SelectedItem = _currentDirective.FlightCategory; dictComboBoxStationFrom.SelectedItem = _currentDirective.StationFrom; dictComboBoxStationTo.SelectedItem = _currentDirective.StationTo; textBoxHiddenRemarks.Text = _currentDirective.HiddenRemarks; textBoxDescription.Text = _currentDirective.Description; textBoxRemarks.Text = _currentDirective.Remarks; _flightNumberPeriodListControl.SchedulePeriods = schedulePeriods; _flightNumberPeriodListControl.UpdateControl(_currentDirective, _screenType); }
/// <summary> /// Создает страницу для отображения информации об одном планируемом рейсе /// </summary> /// <param name="flightNumber">рейс</param> /// <param name="screenType"></param> public FlightNumberScreen(FlightNumber flightNumber, FlightNumberScreenType screenType) : this() { if (flightNumber == null) { throw new ArgumentNullException("flightNumber", "Argument cannot be null"); } _currentDirective = flightNumber; _screenType = screenType; Initialize(); }
public void UpdateControl(FlightNumber flightNumber, FlightNumberScreenType screenType) { _flightNumber = flightNumber; _screenType = screenType; if (_flightNumber.FlightNumberPeriod.Count > 0) { flowLayoutPanelPerformances.Controls.Clear(); } foreach (var period in _flightNumber.FlightNumberPeriod) { AddPeriodControl(period); } }
public FlightTrackListScreen(Operator currentOperator, FlightNumberScreenType screenType) : this() { _screenType = screenType; if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Flights"; _filter = new CommonFilterCollection(typeof(ITripFilterParams)); UpdateInformation(); InitToolStripMenuItems(); InitListView(); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список неснижаемого запаса на складе ///</summary> ///<param name="currentOperator">Склад, которому принадлежат записи о неснижаемом запасе</param> ///<param name="screenType"></param> public FlightNumberListScreen(Operator currentOperator, FlightNumberScreenType screenType) : this() { if (currentOperator == null) { throw new ArgumentNullException("currentOperator"); } aircraftHeaderControl1.Operator = currentOperator; StatusTitle = "Flights"; statusControl.ShowStatus = false; labelTitle.Visible = false; _screenType = screenType; _filter = new CommonFilterCollection(typeof(IFlightFilterParams)); firstLoad = true; InitToolStripMenuItems(); InitListView(); UpdateInformation(); }
private void UpdateControl(FlightNumberScreenType screenType) { dictComboBoxStationFrom.Type = typeof(AirportsCodes); dictComboBoxStationTo.Type = typeof(AirportsCodes); dictionaryComboBoxFlightNo.Type = typeof(FlightNum); Program.MainDispatcher.ProcessControl(dictComboBoxStationFrom); Program.MainDispatcher.ProcessControl(dictComboBoxStationTo); Program.MainDispatcher.ProcessControl(dictionaryComboBoxFlightNo); var flType = new List <FlightType>(); if (screenType == FlightNumberScreenType.Schedule) { flType.AddRange(FlightType.Items.Where(f => f.ItemId == FlightType.Schedule.ItemId)); } else { flType.AddRange(FlightType.Items.Where(f => f.ItemId != FlightType.Schedule.ItemId)); } comboBoxFlightType.Items.Clear(); comboBoxFlightType.Items.AddRange(flType.ToArray()); comboBoxFlightCategory.Items.Clear(); foreach (object o in Enum.GetValues(typeof(FlightCategory))) { comboBoxFlightCategory.Items.Add(o); } comboBoxAircraftCode.Items.Clear(); foreach (object o in Enum.GetValues(typeof(FlightAircraftCode))) { comboBoxAircraftCode.Items.Add(o); } }
public FlightNumberPeriodControl(FlightNumberScreenType screenType) { _screenType = screenType; InitializeComponent(); }
public FlightNumberListView(FlightNumberScreenType screenType) : this() { _screenType = screenType; EnableCustomSorting = false; }
public FlightTrackListView(FlightNumberScreenType screenType) : this() { _screenType = screenType; }