public UHFRadio() : base("UHF Radio", new Size(625, 580)) { RotarySwitchPositionCollection positions = new RotarySwitchPositionCollection(); positions.Clear(); positions.Add(new RotarySwitchPosition(this, 1, "Off", 300d)); positions.Add(new RotarySwitchPosition(this, 2, "Main", 340d)); positions.Add(new RotarySwitchPosition(this, 3, "Both", 20d)); positions.Add(new RotarySwitchPosition(this, 4, "ADF", 60d)); AddRotarySwitch("Frequency Dial", new Point(81, 455), new Size(115, 115), "1", 1, positions, "Frequency Dial"); positions.Clear(); positions.Add(new RotarySwitchPosition(this, 1, "Manual", 315d)); positions.Add(new RotarySwitchPosition(this, 2, "Preset", 0d)); positions.Add(new RotarySwitchPosition(this, 3, "Guard", 45d)); AddRotarySwitch("Frequency Mode Dial", new Point(433, 455), new Size(115, 115), "1", 1, positions, "Frequency Mode Dial"); positions.Clear(); positions.Add(new RotarySwitchPosition(this, 1, "2", 225d)); positions.Add(new RotarySwitchPosition(this, 2, "3", 270d)); positions.Add(new RotarySwitchPosition(this, 3, "A", 315d)); AddRotarySwitch("100Mhz Selector", new Point(54, 328), new Size(75, 75), "3", 1, positions, "100Mhz Selector"); RotaryEncoder enc; enc = AddEncoder("10Mhz Selector", new Point(161, 329), new Size(75, 75), _imageLocation + "A-10C_UHF_Radio_Selector_Knob_3.png", 0.1d, 30d, _interfaceDeviceName, "10Mhz Selector", false); enc.InitialRotation = 15; enc = AddEncoder("1Mhz Selector", new Point(263, 329), new Size(75, 75), _imageLocation + "A-10C_UHF_Radio_Selector_Knob_3.png", 0.1d, 30d, _interfaceDeviceName, "1Mhz Selector", false); enc.InitialRotation = 90; enc = AddEncoder("0:1Mhz Selector", new Point(382, 329), new Size(75, 75), _imageLocation + "A-10C_UHF_Radio_Selector_Knob_3.png", 0.1d, 30d, _interfaceDeviceName, "0.1Mhz Selector", false); enc.InitialRotation = 60; enc = AddEncoder("0:025Mhz Selector", new Point(491, 329), new Size(75, 75), _imageLocation + "A-10C_UHF_Radio_Selector_Knob_3.png", 0.1d, 30d, _interfaceDeviceName, "0.025Mhz Selector", false); enc.InitialRotation = 45; enc = AddEncoder("Channel Selector", new Point(474, 110), new Size(100, 100), _imageLocation + "A-10C_UHF_Radio_Selector_Knob_2.png", 0.1d, 30d, _interfaceDeviceName, "Preset Channel Selector", false); enc.InitialRotation = 10; AddPot("Volume", new Point(274, 420), new Size(60, 60), _imageLocation + "A-10C_UHF_Radio_Volume_Knob.png", 0d, 300d, 0d, 1d, 0.5, 0.1, _interfaceDeviceName, "Volume", false, RotaryClickType.Radial, false); _channelDisplay = AddPart("Channel Display", new UHFChanDisplay(), new Point(298, 111), new Size(173, 100), _interfaceDeviceName, "Channel Display") as IConfigurableBackgroundImage; _frequencyDisplay = AddPart("Frequency Display", new UHFFreqDisplay(), new Point(161, 219), new Size(289, 98), _interfaceDeviceName, "Frequency Display") as IConfigurableBackgroundImage; AddThreeWayToggle("T/Tone Switch", new Point(222, 511), new Size(59, 59), "T/Tone Switch"); AddTwoWaySquelchToggle("Squelch Switch", new Point(354, 511), new Size(52, 61), "Squelch"); AddButton("Test Display Button", new Point(109, 242), new Size(45, 47), _imageLocation + "A-10C_UHF_Radio_Test_Button_Unpressed.png", _imageLocation + "A-10C_UHF_Radio_Test_Button_Pressed.png", "", _interfaceDeviceName, "Test Display Button", false); AddButton("Status Button", new Point(466, 245), new Size(45, 45), _imageLocation + "A-10C_UHF_Radio_Status_Button_Unpressed.png", _imageLocation + "A-10C_UHF_Radio_Status_Button_Pressed.png", "", _interfaceDeviceName, "Status Button", false); AddCover("Cover", new Point(23, 0), new Size(268, 233), "Cover"); // red load button is under the cover so needs to have special binding AddLoadButton("Load Button", 74, 175, new Size(36, 37), "Load Button"); }
public CMSP() : base("CMSP", new Size(666, 404)) { //AddPanel("Filters", new Point(0, 0), new Size(666, 404), _imageLocation + "A-10C_CMSP_Filter_Panel.png", _interfaceDeviceName, "Display Filters"); AddTextDisplay("Display Line 1 Text", 73, 35, new Size(430, 50), "Line 1 Display", "a1B2C3D4m5s6x7O8", " =[]]]]; =[]]]; =[]]; =][;"); // These substitutions are for blanks of different widths _bezel = AddPanel("Bezel", new Point(0, 0), new Size(666, 404), _imageLocation + PANEL_IMAGE, _interfaceDeviceName, "CMSP Bezel"); AddOSBButton("OSB 1", 86, 168, new Size(64, 64), "OSB 1"); AddOSBButton("OSB 2", 175, 168, new Size(64, 64), "OSB 2"); AddOSBButton("OSB 3", 275, 168, new Size(64, 64), "OSB 3"); AddOSBButton("OSB 4", 367, 168, new Size(64, 64), "OSB 4"); AddRTNButton("RTN", 546, 50, new Size(68, 67), "Return to Previous Rotary Menu"); AddRocker("Page Cycle", new Point(492, 38), new Size(51, 97), ThreeWayToggleSwitchPosition.Two, ThreeWayToggleSwitchType.MomOnMom, _interfaceDeviceName, "Page Cycle", false, _imageLocation + "A-10C_CMSP_NXT_Rocker_Up.png", _imageLocation + "A-10C_CMSP_NXT_Rocker_Middle.png", _imageLocation + "A-10C_CMSP_NXT_Rocker_Down.png", LinearClickType.Touch, false); AddThreeWayToggle("MWS Switch", new Point(93, 262), new Size(41, 139), "MWS"); AddThreeWayToggle("JMR Switch", new Point(186, 262), new Size(41, 139), "JMR"); AddThreeWayToggle("RWR Switch", new Point(278, 262), new Size(41, 139), "RWR"); AddThreeWayToggle("Disp Switch", new Point(374, 262), new Size(41, 139), "DISP"); AddTwoWayToggle("ECM Pod Jettison", 471, 139, new Size(53, 128), "ECM Pod Jettison"); AddPot("Brightness", new Point(550, 176), new Size(60, 60), "Brightness"); AddTextDisplay("Display MWS Text", 73, 87, new Size(101, 50), "Line 2 MWS Display", "amsx", _CMSPConversion); AddTextDisplay("Display JMR Text", 174, 87, new Size(101, 50), "Line 2 JMR Display", "amsx", _CMSPConversion); AddTextDisplay("Display RWR Text", 275, 87, new Size(101, 50), "Line 2 RWR Display", "amsx", _CMSPConversion); AddTextDisplay("Display Disp Text", 376, 87, new Size(101, 50), "Line 2 DISP Display", "amsx", _CMSPConversion); _positions.Add(new RotarySwitchPosition(this, 1, "OFF", 225d)); _positions.Add(new RotarySwitchPosition(this, 2, "STBY", 270d)); _positions.Add(new RotarySwitchPosition(this, 3, "MAN", 315d)); _positions.Add(new RotarySwitchPosition(this, 4, "SEMI", 0d)); _positions.Add(new RotarySwitchPosition(this, 5, "AUTO", 45d)); RotarySwitch knob = AddRotarySwitch("Mode Dial", new Point(478, 269), new Size(125, 125), _imageLocation + "A-10C_CMSP_Knob.png", 1, _positions, _interfaceDeviceName, "Mode Select Dial", false); knob.IsContinuous = false; }