Пример #1
0
        public void Init(
            AcConfigManager aircrafts,
            List <PerfTable> tables,
            AirportManager airports,
            Func <AircraftRequest> acRequestGetter)
        {
            airportInfoControl.Init();

            // Create the reference to the UI controls.
            InitializeElements();

            // Set default values for the controls.
            InitializeControls();

            SetWeatherBtnHandlers();

            requestBtn.SetToolTip("Use aircraft and weights calculated from 'Fuel' page.");

            // Automatically update weather
            airportInfoControl.IcaoChanged += (s, e) => wxSetter.GetMetarAndFillWeather();

            this.aircrafts = aircrafts;
            this.tables    = tables;
            UpdateAircraftList();
            this.Airports        = airports;
            this.acRequestGetter = acRequestGetter;
        }
Пример #2
0
        private void InitControls()
        {
            airportInfoControl.Init();

            // Create the reference to the UI controls.
            InitializeElements();

            // Set default values for the controls.
            InitializeControls();

            SetWeatherBtnHandlers();
            requestBtn.SetToolTip("Use aircraft and weights calculated from 'Fuel' page.");

            // Automatically update weather
            airportInfoControl.IcaoChanged      += (s, e) => wxSetter.GetMetarAndFillWeather();
            wtUnitComboBox.SelectedIndexChanged += WeightUnitChanged;
        }