public MfdMenuPage CreatePrimaryMenuPage() { var thisPage = new MfdMenuPage(_mfdManager); var buttons = new List <OptionSelectButton>(); var tacticalAwarenessDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 16, "TAD", false); tacticalAwarenessDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); buttons.Add(tacticalAwarenessDisplayPageSelectButton); var targetingPodPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 17, "TGP", false); targetingPodPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTargetingPodPage(); buttons.Add(targetingPodPageSelectButton); var headDownDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 18, "HDD", false); headDownDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToInstrumentsPage(); buttons.Add(headDownDisplayPageSelectButton); thisPage.OptionSelectButtons = buttons; thisPage.Name = "Primary Page"; return(thisPage); }
public OptionSelectButton CreateNightModeButton(MfdMenuPage mfdMenuPage) { var nightModeButton = _optionSelectButtonFactory.CreateOptionSelectButton(mfdMenuPage, 6, "NGT", false); nightModeButton.FunctionName = "NightMode"; nightModeButton.Pressed += (s, e) => _mfdManager.NightMode = true; nightModeButton.LabelLocation = new Point(-10000, -10000); nightModeButton.LabelSize = new Size(0, 0); return(nightModeButton); }
public OptionSelectButton BuildBrightnessDecreaseButton(MfdMenuPage mfdMenuPage) { var brightnessDecreaseButton = _optionSelectButtonFactory.CreateOptionSelectButton(mfdMenuPage, 19, "DIM", false); brightnessDecreaseButton.FunctionName = "DecreaseBrightness"; brightnessDecreaseButton.Pressed += brightnessDecreaseButton_Pressed; brightnessDecreaseButton.LabelSize = new Size(0, 0); brightnessDecreaseButton.LabelLocation = new Point(-10000, -10000); return(brightnessDecreaseButton); }
public OptionSelectButton BuildDayModeButton(MfdMenuPage mfdMenuPage) { var dayModeButton = _optionSelectButtonFactory.CreateOptionSelectButton(mfdMenuPage, 26, "DAY", false); dayModeButton.FunctionName = "DayMode"; dayModeButton.Pressed += (s, e) => _mfdManager.NightMode = false; dayModeButton.LabelSize = new Size(0, 0); dayModeButton.LabelLocation = new Point(-10000, -10000); return(dayModeButton); }
public OptionSelectButton CreateOptionSelectButton(MfdMenuPage page, float positionNum, string labelText, bool invertLabelText, int?triangleLegLengthPixels) { var button = new OptionSelectButton(page) { PositionNumber = positionNum, LabelText = labelText, InvertLabelText = invertLabelText }; var boundingRectangle = _osbLabelSizeCalculator.CalculateOSBLabelBitmapRectangle(positionNum); button.LabelLocation = boundingRectangle.Location; button.LabelSize = boundingRectangle.Size; if (triangleLegLengthPixels.HasValue) { button.TriangleLegLength = triangleLegLengthPixels.Value; } if (positionNum >= 1 && positionNum <= 5) { //TOP button.TextVAlignment = VAlignment.Top; button.TextHAlignment = HAlignment.Center; } else if (positionNum >= 6 && positionNum <= 13) { //RIGHT button.TextVAlignment = VAlignment.Center; button.TextHAlignment = HAlignment.Right; } else if (positionNum >= 14 && positionNum <= 18) { //BOTTOM button.TextVAlignment = VAlignment.Bottom; button.TextHAlignment = HAlignment.Center; } else if (positionNum >= 19 && positionNum <= 26) { //LEFT button.TextVAlignment = VAlignment.Center; button.TextHAlignment = HAlignment.Left; } if (labelText.Trim() == "^") { button.TextVAlignment = VAlignment.Center; } else if (labelText.Trim() == @"\/") { button.TextVAlignment = VAlignment.Center; } return(button); }
public MfdMenuPage BuildTargetingPodMenuPage() { var thisPage = new MfdMenuPage(_mfdManager); var buttons = new List <OptionSelectButton>(); var leftMfdSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 2, "LMFD", false); leftMfdSelectButton.FunctionName = "SetLMFDActiveOnTGP"; leftMfdSelectButton.Pressed += (s, e) => _mfdManager.SetLMFDActiveOnTGP(); buttons.Add(leftMfdSelectButton); var rightMfdSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 4, "RMFD", false); rightMfdSelectButton.FunctionName = "SetRMFDActiveOnTGP"; rightMfdSelectButton.Pressed += (s, e) => _mfdManager.SetRMFDActiveOnTGP(); buttons.Add(rightMfdSelectButton); var tacticalAwarenessDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 16, "TAD", false); tacticalAwarenessDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); buttons.Add(tacticalAwarenessDisplayPageSelectButton); var targetingPodPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 17, "TGP", true); targetingPodPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTargetingPodPage(); buttons.Add(targetingPodPageSelectButton); var headDownDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 18, "HDD", false); headDownDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToInstrumentsPage(); buttons.Add(headDownDisplayPageSelectButton); thisPage.OptionSelectButtons = buttons; thisPage.Name = "Targeting Pod Page"; return(thisPage); }
public MfdMenuPage BuildInstrumentsDisplayMenuPage() { var thisPage = new MfdMenuPage(_mfdManager); var buttons = new List <OptionSelectButton>(); const int triangleLegLengthPixels = 25; var altimeterModeButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 3, "PNEU", false); altimeterModeButton.FunctionName = "ToggleAltimeterModeElecPneu"; altimeterModeButton.Pressed += pneuElecButton_Press; var altitudeIndexUpButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 7, "^", false, triangleLegLengthPixels); altitudeIndexUpButton.FunctionName = "AltitudeIndexIncrease"; altitudeIndexUpButton.Pressed += altitudeIndexUpButton_Press; var altitudeIndexLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 7.5f, "ALT", false); var altitudeIndexDownButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 8, @"\/", false, triangleLegLengthPixels); altitudeIndexDownButton.FunctionName = "AltitudeIndexDecrease"; altitudeIndexDownButton.Pressed += altitudeIndexDownButton_Press; var barometricPressureUpButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 9, "^", false, triangleLegLengthPixels); barometricPressureUpButton.FunctionName = "BarometricPressureSettingIncrease"; barometricPressureUpButton.Pressed += barometricPressureUpButton_Press; var barometricPressureLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 9.5f, "BARO", false); var barometricPressureDownButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 10, @"\/", false, triangleLegLengthPixels); barometricPressureDownButton.FunctionName = "BarometricPressureSettingDecrease"; barometricPressureDownButton.Pressed += barometricPressureDownButton_Press; var courseSelectUpButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 11, "^", false, triangleLegLengthPixels); courseSelectUpButton.FunctionName = "CourseSelectIncrease"; courseSelectUpButton.Pressed += courseSelectUpButton_Press; var courseSelectLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 11.5f, "CRS", false); var courseSelectDownButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 12, @"\/", false, triangleLegLengthPixels); courseSelectDownButton.FunctionName = "CourseSelectDecrease"; courseSelectDownButton.Pressed += courseSelectDownButton_Press; var tacticalAwarenessDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 16, "TAD", false); tacticalAwarenessDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); var targetingPodPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 17, "TGP", false); targetingPodPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTargetingPodPage(); var headDownDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 18, "HDD", true); headDownDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToInstrumentsPage(); var headingSelectDownButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 20, @"\/", false, triangleLegLengthPixels); headingSelectDownButton.FunctionName = "HeadingSelectDecrease"; headingSelectDownButton.Pressed += headingSelectDownButton_Press; var headingSelectLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 20.5f, "HDG", false); var headingSelectUpButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 21, "^", false, triangleLegLengthPixels); headingSelectUpButton.FunctionName = "HeadingSelectIncrease"; headingSelectUpButton.Pressed += headingSelectUpButton_Press; var lowAltitudeThresholdSelectDownButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 22, @"\/", false, triangleLegLengthPixels); lowAltitudeThresholdSelectDownButton.FunctionName = "LowAltitudeWarningThresholdDecrease"; lowAltitudeThresholdSelectDownButton.Pressed += lowAltitudeThresholdSelectDownButton_Press; var lowAltitudeThresholdLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 22.5f, "ALOW", false); var lowAltitudeThresholdSelectUpButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 23, "^", false, triangleLegLengthPixels); lowAltitudeThresholdSelectUpButton.Pressed += lowAltitudeThresholdSelectUpButton_Press; lowAltitudeThresholdSelectUpButton.FunctionName = "LowAltitudeWarningThresholdIncrease"; var airspeedIndexSelectDownButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 24, @"\/", false, triangleLegLengthPixels); airspeedIndexSelectDownButton.FunctionName = "AirspeedIndexDecrease"; airspeedIndexSelectDownButton.Pressed += airspeedIndexSelectDownButton_Press; var airspeedIndexLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 24.5f, "ASPD", false); var airspeedIndexSelectUpButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 25, @"^", false, triangleLegLengthPixels); airspeedIndexSelectUpButton.FunctionName = "AirspeedIndexIncrease"; airspeedIndexSelectUpButton.Pressed += airspeedIndexSelectUpButton_Press; buttons.Add(altimeterModeButton); buttons.Add(altitudeIndexUpButton); buttons.Add(altitudeIndexLabel); buttons.Add(altitudeIndexDownButton); buttons.Add(barometricPressureUpButton); buttons.Add(barometricPressureLabel); buttons.Add(barometricPressureDownButton); buttons.Add(courseSelectUpButton); buttons.Add(courseSelectLabel); buttons.Add(courseSelectDownButton); buttons.Add(tacticalAwarenessDisplayPageSelectButton); buttons.Add(targetingPodPageSelectButton); buttons.Add(headDownDisplayPageSelectButton); buttons.Add(headingSelectDownButton); buttons.Add(headingSelectLabel); buttons.Add(headingSelectUpButton); buttons.Add(lowAltitudeThresholdSelectDownButton); buttons.Add(lowAltitudeThresholdLabel); buttons.Add(lowAltitudeThresholdSelectUpButton); buttons.Add(airspeedIndexSelectDownButton); buttons.Add(airspeedIndexLabel); buttons.Add(airspeedIndexSelectUpButton); thisPage.OptionSelectButtons = buttons; thisPage.Name = "Instruments Display Page"; return(thisPage); }
public MfdMenuPage BuildChartsMenuPage() { var thisPage = new MfdMenuPage(_mfdManager); var buttons = new List <OptionSelectButton>(); var chartPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 2, "CHARTS", true); chartPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToChartsPage(); buttons.Add(chartPageSelectButton); var checklistPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 3, "CHKLST", false); checklistPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToChecklistsPage(); buttons.Add(checklistPageSelectButton); var mapPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 4, "MAP", false); mapPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); buttons.Add(mapPageSelectButton); var prevChartPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 7, @"^", false); prevChartPageSelectButton.Pressed += (s, e) => _mfdManager.PrevChartPage(); buttons.Add(prevChartPageSelectButton); var chartPageLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 7.5f, "P\nA\nG\nE", false); buttons.Add(chartPageLabel); var nextChartPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 8, @"\/", false); nextChartPageSelectButton.Pressed += (s, e) => _mfdManager.NextChartPage(); buttons.Add(nextChartPageSelectButton); var tacticalAwarenessDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 16, "TAD", true); tacticalAwarenessDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); buttons.Add(tacticalAwarenessDisplayPageSelectButton); var targetingPodPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 17, "TGP", false); targetingPodPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTargetingPodPage(); buttons.Add(targetingPodPageSelectButton); var headDownDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 18, "HDD", false); headDownDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToInstrumentsPage(); buttons.Add(headDownDisplayPageSelectButton); var nextChartFileSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 24, @"\/", false); nextChartFileSelectButton.Pressed += (s, e) => _mfdManager.NextChartFile(); buttons.Add(nextChartFileSelectButton); var chartListLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 24.5f, "L\nI\nS\nT", false); buttons.Add(chartListLabel); var previousChartFileSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 25, "^", false); previousChartFileSelectButton.Pressed += (s, e) => _mfdManager.PrevChartFile(); buttons.Add(previousChartFileSelectButton); thisPage.OptionSelectButtons = buttons; thisPage.Name = "Charts Page"; return(thisPage); }
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); }
public MfdMenuPage BuildTADMenuPage() { var thisPage = new MfdMenuPage(_mfdManager); var buttons = new List <OptionSelectButton>(); var chartPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 2, "CHARTS", false); chartPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToChartsPage(); buttons.Add(chartPageSelectButton); var checklistPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 3, "CHKLST", false); checklistPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToChecklistsPage(); buttons.Add(checklistPageSelectButton); var mapOnOffButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 4, "MAP", true); mapOnOffButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); buttons.Add(mapOnOffButton); var scaleIncreaseButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 7, "^", false); scaleIncreaseButton.Pressed += (s, e) => _mfdManager.MapZoomIn(); buttons.Add(scaleIncreaseButton); var scaleLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 7.5f, "ZOOM", false); buttons.Add(scaleLabel); var scaleDecreaseButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 8, @"\/", false); scaleDecreaseButton.Pressed += (s, e) => _mfdManager.MapZoomOut(); buttons.Add(scaleDecreaseButton); var mapRotationModeLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 9, _mfdManager.GetMapRotationModeText(_mfdManager.MapRotationMode), false); mapRotationModeLabel.FunctionName = "MapRotationModeLabel"; mapRotationModeLabel.Pressed += (s, e) => { _mfdManager.MapRotationMode++; if ((int)_mfdManager.MapRotationMode > 1) { _mfdManager.MapRotationMode = 0; } }; buttons.Add(mapRotationModeLabel); var tacticalAwarenessDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 16, "TAD", true); tacticalAwarenessDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTADPage(); buttons.Add(tacticalAwarenessDisplayPageSelectButton); var targetingPodPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 17, "TGP", false); targetingPodPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToTargetingPodPage(); buttons.Add(targetingPodPageSelectButton); var headDownDisplayPageSelectButton = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 18, "HDD", false); headDownDisplayPageSelectButton.Pressed += (s, e) => _mfdManager.SwitchToInstrumentsPage(); buttons.Add(headDownDisplayPageSelectButton); var mapRangeIncrease = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 25, @"^", false); mapRangeIncrease.Pressed += (s, e) => _mfdManager.IncreaseMapRange(); buttons.Add(mapRangeIncrease); var mapRangeDecrease = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 24, @"\/", false); mapRangeDecrease.Pressed += (s, e) => _mfdManager.DecreaseMapRange(); buttons.Add(mapRangeDecrease); var mapRangeLabel = _optionSelectButtonFactory.CreateOptionSelectButton(thisPage, 24.5f, _mfdManager.MapRangeRingsRadiusInNauticalMiles.ToString(), false); mapRangeLabel.FunctionName = "MapRangeLabel"; buttons.Add(mapRangeLabel); thisPage.OptionSelectButtons = buttons; thisPage.Name = "TAD Page"; return(thisPage); }
public OptionSelectButton CreateOptionSelectButton(MfdMenuPage page, float positionNum, string labelText, bool invertLabelText) { return(CreateOptionSelectButton(page, positionNum, labelText, invertLabelText, null)); }