コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: FlightNumberScreen.cs プロジェクト: mgladilov/Cas
        /// <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();
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        ///<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();
        }
コード例 #6
0
        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);
            }
        }
コード例 #7
0
 public FlightNumberPeriodControl(FlightNumberScreenType screenType)
 {
     _screenType = screenType;
     InitializeComponent();
 }
コード例 #8
0
ファイル: FlightNumberListView.cs プロジェクト: mgladilov/Cas
 public FlightNumberListView(FlightNumberScreenType screenType) : this()
 {
     _screenType         = screenType;
     EnableCustomSorting = false;
 }
コード例 #9
0
ファイル: FlightTrackListView.cs プロジェクト: mgladilov/Cas
 public FlightTrackListView(FlightNumberScreenType screenType) : this()
 {
     _screenType = screenType;
 }