예제 #1
0
        public FlightDisplayViewModel(IVariableCache store)
        {
            ElevatorTrim = new SliderModel(store.ElevatorTrimElement()).WithLabel("Elevator");

            Flaps = new ConstrainedSliderModel(store.FlapsElement(), Orientation.Vertical, true)
                    .WithLabel("Flaps");
            ParkingBreak    = new ToggleButtonModel("Parking Break", store.ParkingBreakElement());
            GearRetractable = store.IsGearRetractable();
            GearDown        = new ToggleButtonModel("Landing Gear", store.GearDownElement());

            SimulationRate = new DoubleUpDownDisplayModel(store.SimulationRateElement())
                             .WithLabel("Time Factor", Dock.Left);

            AutoPilotActive    = new ToggleButtonModel("Auto Pilot Active", store.AutopilotElement());
            AutoPilotAvialable = store.AutopilotAvailable();
            HeadingBug         = new DoubleUpDownDisplayModel(store.AutopilotHeadingElement());
            AltitudeBug        = new DoubleUpDownDisplayModel(store.AutopilotAltitudeLockElement());
            VSIBug             = new DoubleUpDownDisplayModel(store.AutopilotVerticalSpeedElement());
            AirspeedBug        = new DoubleUpDownDisplayModel(store.AutopilotAirSpeedElement());

            AltitudeHold = new ToggleButtonModel("Alt Hold", store.AutopilotAltitudeHoldElement());
            VSIHold      = new ToggleButtonModel("VSI Hold", store.AutopilotVsiHoldElement());
            AirspeedHold = new ToggleButtonModel("Airspeed Hold", store.AutopilotAirspeedHoldElement());

            WingLeveler = new ToggleButtonModel("Wings Level", store.AutopilotWingLevelerElement());
            HeadingMode = new ToggleButtonModel("Hdg Lock", store.AutopilotHeadingLockElement());
            NavMode     = new ToggleButtonModel("Nav Lock", store.AutopilotNav1LockElement());
        }
예제 #2
0
        public LandingModel(IVariableCache variables)
        {
            ElevatorTrim    = variables.ElevatorTrimElement();
            Flaps           = variables.FlapsElement();
            GearRetractable = variables.IsGearRetractable();
            InnerAssignModel(variables);

            RegisterPropertyChangeForwarding(ElevatorTrim, Flaps, GearRetractable);
        }