示例#1
0
        private static string GetControlName(CpdInputControls control)
        {
            string toReturn = null;

            switch (control)
            {
            case CpdInputControls.Unknown:
                toReturn = "Unknown";
                break;

            case CpdInputControls.OsbButton1:
                toReturn = "Option Select Button 1";
                break;

            case CpdInputControls.OsbButton2:
                toReturn = "Option Select Button 2";
                break;

            case CpdInputControls.OsbButton3:
                toReturn = "Option Select Button 3";
                break;

            case CpdInputControls.OsbButton4:
                toReturn = "Option Select Button 4";
                break;

            case CpdInputControls.OsbButton5:
                toReturn = "Option Select Button 5";
                break;

            case CpdInputControls.OsbButton6:
                toReturn = "Option Select Button 6";
                break;

            case CpdInputControls.OsbButton7:
                toReturn = "Option Select Button 7";
                break;

            case CpdInputControls.OsbButton8:
                toReturn = "Option Select Button 8";
                break;

            case CpdInputControls.OsbButton9:
                toReturn = "Option Select Button 9";
                break;

            case CpdInputControls.OsbButton10:
                toReturn = "Option Select Button 10";
                break;

            case CpdInputControls.OsbButton11:
                toReturn = "Option Select Button 11";
                break;

            case CpdInputControls.OsbButton12:
                toReturn = "Option Select Button 12";
                break;

            case CpdInputControls.OsbButton13:
                toReturn = "Option Select Button 13";
                break;

            case CpdInputControls.OsbButton14:
                toReturn = "Option Select Button 14";
                break;

            case CpdInputControls.OsbButton15:
                toReturn = "Option Select Button 15";
                break;

            case CpdInputControls.OsbButton16:
                toReturn = "Option Select Button 16";
                break;

            case CpdInputControls.OsbButton17:
                toReturn = "Option Select Button 17";
                break;

            case CpdInputControls.OsbButton18:
                toReturn = "Option Select Button 18";
                break;

            case CpdInputControls.OsbButton19:
                toReturn = "Option Select Button 19";
                break;

            case CpdInputControls.OsbButton20:
                toReturn = "Option Select Button 20";
                break;

            case CpdInputControls.OsbButton21:
                toReturn = "Option Select Button 21";
                break;

            case CpdInputControls.OsbButton22:
                toReturn = "Option Select Button 22";
                break;

            case CpdInputControls.OsbButton23:
                toReturn = "Option Select Button 23";
                break;

            case CpdInputControls.OsbButton24:
                toReturn = "Option Select Button 24";
                break;

            case CpdInputControls.OsbButton25:
                toReturn = "Option Select Button 25";
                break;

            case CpdInputControls.OsbButton26:
                toReturn = "Option Select Button 26";
                break;

            case CpdInputControls.HsiModeControl:
                toReturn = "HSI Mode Selector";
                break;

            case CpdInputControls.HsiModeTcn:
                toReturn = "HSI Mode Selector - TCN";
                break;

            case CpdInputControls.HsiModeIlsTcn:
                toReturn = "HSI Mode Selector - ILS/TCN";
                break;

            case CpdInputControls.HsiModeNav:
                toReturn = "HSI Mode Selector - NAV";
                break;

            case CpdInputControls.HsiModeIlsNav:
                toReturn = "HSI Mode Selector - ILS/NAV";
                break;

            case CpdInputControls.ParameterAdjustKnob:
                toReturn = "Parameter Adjust Knob";
                break;

            case CpdInputControls.ParameterAdjustKnobIncrease:
                toReturn = "Parameter Adjust Knob - Increase";
                break;

            case CpdInputControls.ParameterAdjustKnobDecrease:
                toReturn = "Parameter Adjust Knob - Decrease";
                break;

            case CpdInputControls.FuelSelectControl:
                toReturn = "Fuel Quantity Selector";
                break;

            case CpdInputControls.FuelSelectTest:
                toReturn = "Fuel Quantity Selector - TEST";
                break;

            case CpdInputControls.FuelSelectNorm:
                toReturn = "Fuel Quantity Selector - NORM";
                break;

            case CpdInputControls.FuelSelectRsvr:
                toReturn = "Fuel Quantity Selector - RSVR";
                break;

            case CpdInputControls.FuelSelectIntWing:
                toReturn = "Fuel Quantity Selector - INT WING";
                break;

            case CpdInputControls.FuelSelectExtWing:
                toReturn = "Fuel Quantity Selector - EXT WING";
                break;

            case CpdInputControls.FuelSelectExtCtr:
                toReturn = "Fuel Quantity Selector - EXT CTR";
                break;

            case CpdInputControls.ExtFuelTransSwitch:
                toReturn = "External Fuel Transfer Mode Switch";
                break;

            case CpdInputControls.ExtFuelSwitchTransNorm:
                toReturn = "External Fuel Transfer Mode Switch - NORM";
                break;

            case CpdInputControls.ExtFuelSwitchTransWingFirst:
                toReturn = "External Fuel Transfer Mode Switch - WING FIRST";
                break;

            default:
                break;
            }
            return(toReturn);
        }
示例#2
0
 public void HandleInputControlEvent(CpdInputControls eventSource, MfdInputControl control)
 {
     _inputControlEventHandler.HandleInputControlEvent(eventSource, control);
 }
        public MfdInputControl GetControl(MfdMenuPage page, CpdInputControls control)
        {
            MfdInputControl toReturn = null;

            switch (control)
            {
            case CpdInputControls.Unknown:
                break;

            case CpdInputControls.OsbButton1:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(1);
                }
                break;

            case CpdInputControls.OsbButton2:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(2);
                }
                break;

            case CpdInputControls.OsbButton3:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(3);
                }
                break;

            case CpdInputControls.OsbButton4:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(4);
                }
                break;

            case CpdInputControls.OsbButton5:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(5);
                }
                break;

            case CpdInputControls.OsbButton6:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(6);
                }
                break;

            case CpdInputControls.OsbButton7:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(7);
                }
                break;

            case CpdInputControls.OsbButton8:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(8);
                }
                break;

            case CpdInputControls.OsbButton9:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(9);
                }
                break;

            case CpdInputControls.OsbButton10:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(10);
                }
                break;

            case CpdInputControls.OsbButton11:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(11);
                }
                break;

            case CpdInputControls.OsbButton12:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(12);
                }
                break;

            case CpdInputControls.OsbButton13:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(13);
                }
                break;

            case CpdInputControls.OsbButton14:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(14);
                }
                break;

            case CpdInputControls.OsbButton15:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(15);
                }
                break;

            case CpdInputControls.OsbButton16:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(16);
                }
                break;

            case CpdInputControls.OsbButton17:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(17);
                }
                break;

            case CpdInputControls.OsbButton18:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(18);
                }
                break;

            case CpdInputControls.OsbButton19:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(19);
                }
                break;

            case CpdInputControls.OsbButton20:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(20);
                }
                break;

            case CpdInputControls.OsbButton21:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(21);
                }
                break;

            case CpdInputControls.OsbButton22:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(22);
                }
                break;

            case CpdInputControls.OsbButton23:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(23);
                }
                break;

            case CpdInputControls.OsbButton24:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(24);
                }
                break;

            case CpdInputControls.OsbButton25:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(25);
                }
                break;

            case CpdInputControls.OsbButton26:
                if (page != null)
                {
                    toReturn = page.FindOptionSelectButtonByPositionNumber(26);
                }
                break;

            case CpdInputControls.HsiModeControl:
                toReturn = _mfdManager.HsiModeSelectorSwitch;
                break;

            case CpdInputControls.HsiModeTcn:
                toReturn = _mfdManager.HsiModeSelectorSwitch.GetPositionByName("TCN");
                break;

            case CpdInputControls.HsiModeIlsTcn:
                toReturn = _mfdManager.HsiModeSelectorSwitch.GetPositionByName("ILS/TCN");
                break;

            case CpdInputControls.HsiModeNav:
                toReturn = _mfdManager.HsiModeSelectorSwitch.GetPositionByName("NAV");
                break;

            case CpdInputControls.HsiModeIlsNav:
                toReturn = _mfdManager.HsiModeSelectorSwitch.GetPositionByName("ILS/NAV");
                break;

            case CpdInputControls.ParameterAdjustKnob:
                toReturn = _mfdManager.ParamAdjustKnob;
                break;

            case CpdInputControls.ParameterAdjustKnobIncrease:
                toReturn = _mfdManager.ParamAdjustKnob.ClockwiseMomentaryInputControl;
                break;

            case CpdInputControls.ParameterAdjustKnobDecrease:
                toReturn = _mfdManager.ParamAdjustKnob.CounterclockwiseMomentaryInputControl;
                break;

            case CpdInputControls.FuelSelectControl:
                toReturn = _mfdManager.FuelSelectSwitch;
                break;

            case CpdInputControls.FuelSelectTest:
                toReturn = _mfdManager.FuelSelectSwitch.GetPositionByName("TEST");
                break;

            case CpdInputControls.FuelSelectNorm:
                toReturn = _mfdManager.FuelSelectSwitch.GetPositionByName("NORM");
                break;

            case CpdInputControls.FuelSelectRsvr:
                toReturn = _mfdManager.FuelSelectSwitch.GetPositionByName("RSVR");
                break;

            case CpdInputControls.FuelSelectIntWing:
                toReturn = _mfdManager.FuelSelectSwitch.GetPositionByName("INT WING");
                break;

            case CpdInputControls.FuelSelectExtWing:
                toReturn = _mfdManager.FuelSelectSwitch.GetPositionByName("EXT WING");
                break;

            case CpdInputControls.FuelSelectExtCtr:
                toReturn = _mfdManager.FuelSelectSwitch.GetPositionByName("EXT CTR");
                break;

            case CpdInputControls.ExtFuelTransSwitch:
                toReturn = _mfdManager.ExtFuelTransSwitch;
                break;

            case CpdInputControls.ExtFuelSwitchTransNorm:
                toReturn = _mfdManager.ExtFuelTransSwitch.GetPositionByName("NORM");
                break;

            case CpdInputControls.ExtFuelSwitchTransWingFirst:
                toReturn = _mfdManager.ExtFuelTransSwitch.GetPositionByName("WING FIRST");
                break;

            default:
                break;
            }
            return(toReturn);
        }
示例#4
0
        public void HandleInputControlEvent(CpdInputControls eventSource, MfdInputControl control)
        {
            OptionSelectButton button;

            switch (eventSource)
            {
            case CpdInputControls.OsbButton1:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton2:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton3:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton4:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton5:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton6:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton7:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton8:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton9:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton10:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton11:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton12:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton13:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton14:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton15:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton16:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton17:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton18:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton19:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton20:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton21:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton22:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton23:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton24:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton25:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.OsbButton26:
                button = control as OptionSelectButton;
                _optionSelectButtonPressHandler.HandleOptionSelectButtonPress(button);
                break;

            case CpdInputControls.HsiModeTcn:
                _setHsiModeTcnEventHandler.SetHsiModeTcn();
                break;

            case CpdInputControls.HsiModeIlsTcn:
                _setHsiModePlsTcnEventHandler.SetHsiModePlsTcn();
                break;

            case CpdInputControls.HsiModeNav:
                _setHsiModeNavEventHandler.SetHsiModeNav();
                break;

            case CpdInputControls.HsiModeIlsNav:
                _setHsiModePlsNavEventHandler.SetHsiModePlsNav();
                break;

            case CpdInputControls.ParameterAdjustKnobIncrease:
                break;

            case CpdInputControls.ParameterAdjustKnobDecrease:
                break;

            case CpdInputControls.FuelSelectTest:
                _setFuelSelectTestEventHandler.SetFuelSelectTest();
                break;

            case CpdInputControls.FuelSelectNorm:
                _setFuelSelectNormEventHandler.SetFuelSelectNorm();
                break;

            case CpdInputControls.FuelSelectRsvr:
                _setFuelSelectRsvrEventHandler.SetFuelSelectRsvr();
                break;

            case CpdInputControls.FuelSelectIntWing:
                _setFuelSelectIntWingEventHandler.SetFuelSelectIntWing();
                break;

            case CpdInputControls.FuelSelectExtWing:
                _setFuelSelectExtWingEventHandler.SetFuelSelectExtWing();
                break;

            case CpdInputControls.FuelSelectExtCtr:
                _setFuelSelectExtCtrEventHandler.SetFuelSelectExtCtr();
                break;

            case CpdInputControls.ExtFuelSwitchTransNorm:
                _setExtFuelSwitchTransNormEventHandler.SetExtFuelSwitchTransNorm();
                break;

            case CpdInputControls.ExtFuelSwitchTransWingFirst:
                _setExtFuelSwitchTransWingFirstEventHandler.SetExtFuelSwitchTransWingFirst();
                break;
            }
        }