コード例 #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);
        }
コード例 #3
0
 public NetworkVariableServer(
     IVariableCache varCache, IBinaryObjectPipeReader source, IBinaryObjectPipeWriter destination) :
     base(source, destination)
 {
     this.varCache = varCache;
 }
コード例 #4
0
 public static BoundedDoubleItem FlapsElement(this IVariableCache vc) =>
コード例 #5
0
 public static LogrithmicStepDoubleItem SimulationRateElement(this IVariableCache variables) =>
コード例 #6
0
 public YokeConnection(IChYoke yoke, IVariableCache dataStore)
 {
     elevatorTrim       = dataStore.ElevatorTrimPosition();
     yoke.StateChanged += new OnChangeToTrue(() => yoke.VerticalWheelUp, WheelUp).Handler;
     yoke.StateChanged += new OnChangeToTrue(() => yoke.VerticalWheelDown, WheelDown).Handler;
 }