Example #1
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 1; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[0] = Helper.CreateLabel(39, 0, 42, 1, "======= ALTITUDES =======");

            // Altitude vs. Orbital Speed
            screenCharts[0]             = Helper.CreatePlot(0, 1, 120, 30, -1, -1, 0, -1);
            screenCharts[0].fixedXwidth = 600;
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(2, Color.FromArgb(200, 0, 169, 51));
            screenCharts[0].setSeriesColor(3, Color.FromArgb(200, 0, 51, 204));
            screenCharts[0].setSeriesColor(4, Color.FromArgb(200, 204, 51, 0));
        }
Example #2
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 3; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                      // Initialize Inputs
            }
            screenInputs[0]              = Helper.CreateInput(10, 0, 10, 1); // Every page must have an input to capture keypresses on Unix
            screenInputs[0].Text         = maxHDOT.ToString();
            screenInputs[0].TextChanged += (sender, e) => this.setmaxHDOT(sender, e);

            screenLabels[0] = Helper.CreateLabel(39, 0, 42, 1, "======= H / HDOT =======");
            screenLabels[1] = Helper.CreateLabel(0, 0, 10, 1, "MAX HDOT:");

            screenCharts[0] = Helper.CreatePlot(0, 1, 120, 30, -100, 1200, 0, -1);
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 0, 0));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 251, 0, 0));
            screenCharts[0].setSeriesColor(2, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(3, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(4, Color.FromArgb(200, 0, 169, 51));
            screenCharts[0].setSeriesColor(5, Color.FromArgb(200, 0, 51, 204));
            screenCharts[0].setSeriesColor(6, Color.FromArgb(200, 204, 51, 0));


            calcApoMax();
        }
Example #3
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 4; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-1, -1, 1, 1);             // Every page must have an input to capture keypresses on Unix
            //screenInputs[0].Text = maxHDOT.ToString();
            //screenInputs[0].TextChanged += (sender, e) => this.setmaxHDOT(sender, e);

            screenLabels[0] = Helper.CreateLabel(30, 0, 60, 1, "======= FLIGHT PATH ANGLE / INERTIAL VELOCITY =======");

            screenCharts[0] = Helper.CreatePlot(0, 1, 120, 30, 0, 3000, -4, 60);
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 0, 0));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 251, 0, 0));
            screenCharts[0].setSeriesColor(2, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(3, Color.FromArgb(200, 0, 251, 0));
            screenCharts[0].setSeriesColor(4, Color.FromArgb(100, 0, 251, 0));
            screenCharts[0].setSeriesColor(5, Color.FromArgb(100, 0, 251, 0));
            screenCharts[0].setSeriesColor(6, Color.FromArgb(100, 0, 251, 0));
            screenCharts[0].setSeriesColor(7, Color.FromArgb(100, 0, 251, 0));
        }
Example #4
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 3; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                    // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);            // Every page must have an input to capture keypresses on Unix

            screenLabels[0] = Helper.CreateLabel(39, 0, 42, 1, "======= TERRAIN / TIME =======");


            // Altitude vs. Time Graph
            screenCharts[0]             = Helper.CreatePlot(0, 1, 120, 30, -1, -1, -100, 3000);
            screenCharts[0].fixedXwidth = 600;
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 0, 251, 0));
        }
Example #5
0
 public override void makeElements()
 {
     for (int i = 0; i < 100; i++)
     {
         screenLabels.Add(null);                                       // Initialize Labels
     }
     screenLabels[10] = Helper.CreateLabel(1, 4, 30, 1, "N20");
 }
Example #6
0
        public override void makeElements()
        {
            for (int i = 0; i < 8; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 2; i++)
            {
                screenButtons.Add(null);                                     // Initialize Buttons
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[4]      = Helper.CreateLabel(0, 0, 60, 35);        // Help text
            screenLabels[4].Text = "╥─── HELP ───\n"
                                   + "║\n"
                                   + "║  To switch between the different screens,\n"
                                   + "║  hold down [CTRL] and type inn the number,\n"
                                   + "║  then release [CTRL].\n"
                                   + "║\n"
                                   + "║     0 - HELP\n"
                                   + "║     1 - ASCENT\n"
                                   + "║     2 - BOOSTER\n"
                                   + "║     3 - CONSUMABLES\n"
                                   + "║     4 - ORBIT VIEW\n"
                                   + "║     5 - ORBIT DATA\n"
                                   + "║     6 - ELECTRICAL SYSTEMS\n"
                                   + "║     7 - TEMPERATURE / ABLATORS / RADIATORS\n"
                                   + "║     8 - MAP VIEW\n"
                                   + "║    12 - DATA STORAGE (PySSSMQ)\n"
                                   + "║    13 - FUTURE ORBITS\n"
                                   + "║    50 - TERRAIN GRAPH\n"
                                   + "║    51 - ALTITUDE / INERTIAL VELOCITY - GRAPH\n"
                                   + "║    52 - ATTITUDE - GRAPHS (R,P,Y)\n"
                                   + "║    53 - TIME TO APOPASIS / INERTIAL VELOCITY - GRAPH\n"
                                   + "║    54 - ALTITUDE / RANGE - GRAPH\n"
                                   + "║    55 - ALTITUDE / VERTICAL SPEED (H / HDOT) - GRAPH\n"
                                   + "║    56 - FLIGHT PATH ANGLE / INERTIAL VELOCITY - GRAPH\n"
                                   + "║   101 - FDAI\n"
                                   + "║   102 - DSKY\n"
                                   + "║\n"
                                   + "║   201-215 - STATUS REPORT (Requires PySSSMQ connection)\n"
                                   + "║   220 - STATUS PANEL (Requires PySSSMQ connection)\n"
                                   + "║\n"
                                   + "║\n"
                                   + "║     9 - FONT/ALIGNMENT TEST\n"
                                   + "║    99 - CRT FONT/ALIGNMENT TEST\n";

            screenLabels[5] = Helper.CreateLabel(0, 0, 60, 2, "──────────────────── CONNECTION DETAILS ────────────────────");             // Connection Header}

            screenLabels[7].Text = "";
        }
Example #7
0
        public override void makeElements()
        {
            for (int i = 0; i < 100; i++)
            {
                screenLabels.Add(null);                                       // Initialize Labels
            }
            for (int i = 0; i < 5; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            for (int i = 0; i < 5; i++)
            {
                screenButtons.Add(null);                                     // Initialize Buttons
            }
            screenLabels[0] = Helper.CreateCRTLabel(0, 0, 7, 1, "SCR " + form.screenType.ToString());
            screenLabels[1] = Helper.CreateCRTLabel(30, 0, 30, 1, "DEBUG", 4);
            screenLabels[2] = Helper.CreateCRTLabel(0, 1.5, 12, 1, "LT: XX:XX:XX");
            screenLabels[3] = Helper.CreateCRTLabel(29, 1.5, 14, 1, "MET: XXX:XX:XX");

            // AUTOPILOT STATUS/TOGGLE BUTTONS
            screenButtons[0] = Helper.CreateButton(0, 3, 10, 2, "AUTOPILOT", false, MocrButton.style.THIN_BORDER_LIGHT);
            screenButtons[0].setLightColor(MocrButton.color.RED);
            screenButtons[0].MouseClick += toggleAutopilot;

            screenButtons[1] = Helper.CreateButton(11, 3, 10, 2, "SAS", false, MocrButton.style.THIN_BORDER_LIGHT);
            screenButtons[1].setLightColor(MocrButton.color.AMBER);
            screenButtons[1].MouseClick += toggleSAS;

            screenButtons[2] = Helper.CreateButton(22, 3, 10, 2, "RCS", false, MocrButton.style.THIN_BORDER_LIGHT);
            screenButtons[2].setLightColor(MocrButton.color.AMBER);
            screenButtons[2].MouseClick += toggleRCS;

            screenLabels[4] = Helper.CreateLabel(0, 6, 22, 1, "DIRECTION UNIT VECTOR");
            screenLabels[5] = Helper.CreateLabel(0, 7, 3, 1, "Dx:");
            screenLabels[6] = Helper.CreateLabel(0, 8, 3, 1, "Dy:");
            screenLabels[7] = Helper.CreateLabel(0, 9, 3, 1, "Dz:");
            screenLabels[8] = Helper.CreateLabel(0, 10, 3, 1, " R:");
            screenInputs[0] = Helper.CreateInput(3, 7, 8, 1);
            screenInputs[1] = Helper.CreateInput(3, 8, 8, 1);
            screenInputs[2] = Helper.CreateInput(3, 9, 8, 1);
            screenInputs[3] = Helper.CreateInput(3, 10, 8, 1);

            screenButtons[3]             = Helper.CreateButton(0, 12, 15, 1, "SET INER DIR", false, MocrButton.style.PUSH);
            screenButtons[3].MouseClick += setINER;

            screenButtons[4]             = Helper.CreateButton(16, 12, 15, 1, "SET SURF DIR", false, MocrButton.style.PUSH);
            screenButtons[4].MouseClick += setSURF;

            screenLabels[9] = Helper.CreateLabel(0, 14, 30, 5, "SURF:\nX: UP\nY: NORTH\nZ: EAST");

            screenLabels[10] = Helper.CreateLabel(30, 14, 50, 5, "");
        }
Example #8
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 4; i++)
            {
                screenButtons.Add(null);                                     // Initialize Buttons
            }
            for (int i = 0; i < 4; i++)
            {
                screenScrews.Add(null);                                     // Initialize Screws
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[0]      = Helper.CreateLabel(39, 73, 189, 29, positionCode + " STATUS REPORT", true, true);
            screenLabels[0].type = CustomLabel.LabelType.ENGRAVED;

            screenButtons[0]             = Helper.CreateButton(39, 105, 63, 77, "", true);
            screenButtons[0].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[0].setLightColor(MocrButton.color.RED);
            screenButtons[0].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[1]             = Helper.CreateButton(102, 105, 63, 77, "", true);
            screenButtons[1].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[1].setLightColor(MocrButton.color.AMBER);
            screenButtons[1].Click += (sender, e) => clickButton(sender, e, screenButtons[1]);

            screenButtons[2]             = Helper.CreateButton(165, 105, 63, 77, "", true);
            screenButtons[2].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[2].setLightColor(MocrButton.color.GREEN);
            screenButtons[2].Click += (sender, e) => clickButton(sender, e, screenButtons[2]);

            screenButtons[3]             = Helper.CreateButton(98, 14, 70, 56, "ABORT\nREQ'D", true);
            screenButtons[3].Font        = form.smallFontB;
            screenButtons[3].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[3].setLightColor(MocrButton.color.RED);

            screenScrews[0] = Helper.CreateScrew(4, 36, true);
            screenScrews[1] = Helper.CreateScrew(234, 36, true);
            screenScrews[2] = Helper.CreateScrew(4, 134, true);
            screenScrews[3] = Helper.CreateScrew(234, 134, true);

            form.dataStorage.Pull();
            Thread.Sleep(1000);
            setButtonColor(positionCode + "S");
        }
Example #9
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            for (int i = 0; i < 2; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 5; i++)
            {
                screenIndicators.Add(null);                                     // Initialize Indicators
            }
            for (int i = 0; i < 5; i++)
            {
                screenButtons.Add(null);                                    // Initialize Buttons
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            // FDAI
            screenFDAI          = new FDAI();
            screenFDAI.Font     = form.buttonFont;
            screenFDAI.Location = new Point(100, 0);
            screenFDAI.Size     = new Size(form.ClientSize.Width - 100, form.ClientSize.Height);
            form.Controls.Add(screenFDAI);

            // MODE BUTTONS/INDICATORS
            screenLabels[0]         = Helper.CreateLabel(2.5, 0, 4, 1, "MODE");
            screenIndicators[0]     = Helper.CreateIndicator(0, 1, 5, 1, "SURF");
            screenButtons[0]        = Helper.CreateButton(5, 1, 4, 1, "");
            screenButtons[0].Click += (sender, e) => setMode(FDAIMode.SURF);
            screenIndicators[1]     = Helper.CreateIndicator(0, 2, 5, 1, "INER");
            screenButtons[1]        = Helper.CreateButton(5, 2, 4, 1, "");
            screenButtons[1].Click += (sender, e) => setMode(FDAIMode.INER);

            // RATE BUTTONS/INDICATORS
            screenLabels[1]         = Helper.CreateLabel(0, 4, 9, 1, "E|R SCALE");
            screenIndicators[2]     = Helper.CreateIndicator(0, 5, 5, 1, "5|1");
            screenButtons[2]        = Helper.CreateButton(5, 5, 4, 1, "");
            screenButtons[2].Click += (sender, e) => setScale(5, 1);
            screenIndicators[3]     = Helper.CreateIndicator(0, 6, 5, 1, "5|5");
            screenButtons[3]        = Helper.CreateButton(5, 6, 4, 1, "");
            screenButtons[3].Click += (sender, e) => setScale(5, 5);
            screenIndicators[4]     = Helper.CreateIndicator(0, 7, 5, 1, "15|10");
            screenButtons[4]        = Helper.CreateButton(5, 7, 4, 1, "");
            screenButtons[4].Click += (sender, e) => setScale(15, 10);

            // Load PySSSMQ-DATA
            loadPySSSMQData();
        }
Example #10
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenMaps.Add(null);                                     // Initialize Map
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            for (int i = 0; i < 70; i++)
            {
                screenIndicators.Add(null);                                      // Initialize Indicators
            }
            for (int i = 0; i < 80; i++)
            {
                screenButtons.Add(null);                                      // Initialize Buttons
            }
            for (int i = 0; i < 1; i++)
            {
                screenLabels.Add(null);                                                                // Initialize Labels
            }
            screenInputs[0]              = Helper.CreateInput(7, 29, 6, 1, HorizontalAlignment.Right); // Every page must have an input to capture keypresses on Unix
            screenInputs[0].Text         = taillength.ToString();
            screenInputs[0].TextChanged += (sender, e) => updateTailLength(sender, e);

            screenLabels[0] = Helper.CreateLabel(7, 28, 6, 1, "LENGTH");

            screenMaps[0]          = Helper.CreateMap(0, 0, 120, 28);
            screenMaps[0].bodyName = "Kerbin";

            screenButtons[0]        = Helper.CreateButton(1, 29, 5, 1, "TAIL");
            screenButtons[0].Font   = form.buttonFont;
            screenButtons[0].Click += (sender, e) => this.toggleTail(sender, e);

            screenButtons[1]        = Helper.CreateButton(14, 29, 5, 1, "FADE");
            screenButtons[1].Font   = form.buttonFont;
            screenButtons[1].Click += (sender, e) => this.toggleFade(sender, e);

            screenIndicators[0] = Helper.CreateIndicator(1, 28, 5, 1, "");
            screenIndicators[1] = Helper.CreateIndicator(14, 28, 5, 1, "");
        }
Example #11
0
        public override void makeElements()
        {
            for (int i = 0; i < 6; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[0]      = Helper.CreateLabel(0, 1, 20, 28);
            screenLabels[0].Text = "DATA STORAGE\nNO DATA";

            screenLabels[1] = Helper.CreateLabel(20, 1, 20, 28);
            screenLabels[2] = Helper.CreateLabel(40, 1, 20, 28);
            screenLabels[3] = Helper.CreateLabel(60, 1, 20, 28);
            screenLabels[4] = Helper.CreateLabel(80, 1, 20, 28);
            screenLabels[5] = Helper.CreateLabel(100, 1, 20, 28);
        }
Example #12
0
        public override void makeElements()
        {
            for (int i = 0; i < 7; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[0]      = Helper.CreateLabel(0, 0, 118, 1);        // Connection Status
            screenLabels[0].Text = "STREAMS:";

            screenLabels[1] = Helper.CreateLabel(0, 1, 20, 28, "NO DATA");
            screenLabels[2] = Helper.CreateLabel(20, 1, 20, 28);
            screenLabels[3] = Helper.CreateLabel(40, 1, 20, 28);
            screenLabels[4] = Helper.CreateLabel(60, 1, 20, 28);
            screenLabels[5] = Helper.CreateLabel(80, 1, 20, 28);
            screenLabels[6] = Helper.CreateLabel(100, 1, 20, 28);
        }
Example #13
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 1; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[0] = Helper.CreateLabel(0, 0, 120, 1, Helper.prtlen("======= TIME TO APOAPSIS / INERTIAL VELOCITY =======", 120, Helper.Align.CENTER));

            // Altitude vs. Orbital Speed
            screenCharts[0] = Helper.CreatePlot(0, 1, 120, 30, 0, 3000, 0, -1);
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 0, 0));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 251, 251, 251));
        }
Example #14
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 3; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            for (int i = 0; i < 1; i++)
            {
                screenButtons.Add(null);                                      // Initialize Buttons
            }
            screenInputs[0]              = Helper.CreateInput(109, 0, 10, 1); // Every page must have an input to capture keypresses on Unix
            screenInputs[0].Text         = range.ToString();
            screenInputs[0].TextChanged += (sender, e) => this.setRange(sender, e);

            screenButtons[0]        = Helper.CreateButton(0, 0, 12, 1, "SET ORIGIN");
            screenButtons[0].Font   = form.buttonFont;
            screenButtons[0].Click += (sender, e) => this.setOrigin(sender, e);

            screenLabels[0] = Helper.CreateLabel(39, 0, 42, 1, "======= ALTITUDE/RANGE FROM ORIGIN =======");
            screenLabels[1] = Helper.CreateLabel(13, 0, 42, 1, "ORIGIN NOT SET");
            screenLabels[2] = Helper.CreateLabel(93, 0, 16, 1, "INSERTION RANGE");

            // Altitude vs. Orbital Speed
            screenCharts[0] = Helper.CreatePlot(0, 1, 120, 30, 0, -1, 0, -1);
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 0, 0));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 0, 251, 0));
            screenCharts[0].setSeriesColor(2, Color.FromArgb(100, 0, 251, 0));
            screenCharts[0].setSeriesColor(3, Color.FromArgb(100, 251, 251, 251));
        }
Example #15
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenLabels.Add(null);                                     // Initialize Labels
            }
            for (int i = 0; i < 15; i++)
            {
                screenButtons.Add(null);                                      // Initialize Buttons
            }
            for (int i = 0; i < 4; i++)
            {
                screenScrews.Add(null);                                     // Initialize Screws
            }
            for (int i = 0; i < 3; i++)
            {
                screenEventIndicators.Add(null);                                     // Initialize EventIndicators
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix


            screenLabels[0]      = Helper.CreateLabel(162, 50, 208, 29, "COMPUTER PHASE", true, true);
            screenLabels[0].type = CustomLabel.LabelType.ENGRAVED;

            screenButtons[0]             = Helper.CreateButton(56, 112, 70, 56, "NO EVENT", true);
            screenButtons[0].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[0].setLightColor(MocrButton.color.RED);
            screenButtons[0].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenEventIndicators[0]               = Helper.createEventIndicator(126, 112, false, true);
            screenEventIndicators[0].upperText     = "RTCC ON";
            screenEventIndicators[0].lowerText     = "LES ABORT";
            screenEventIndicators[0].upperOffColor = EventIndicator.color.OFF;
            screenEventIndicators[0].upperOnColor  = EventIndicator.color.WHITE_LIT;
            screenEventIndicators[0].lowerOffColor = EventIndicator.color.OFF;
            screenEventIndicators[0].lowerOnColor  = EventIndicator.color.GREEN_LIT;

            screenButtons[1]             = Helper.CreateButton(196, 112, 70, 56, "EVENT", true);
            screenButtons[1].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[1].setLightColor(MocrButton.color.AMBER);
            screenButtons[1].Click += (sender, e) => clickButton(sender, e, screenButtons[1]);

            screenButtons[2]             = Helper.CreateButton(266, 112, 70, 56, "", true);
            screenButtons[2].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[2].setLightColor(MocrButton.color.BLANK);
            screenButtons[2].Click += (sender, e) => clickButton(sender, e, screenButtons[2]);

            screenEventIndicators[1]               = Helper.createEventIndicator(336, 112, false, true);
            screenEventIndicators[1].upperText     = "";
            screenEventIndicators[1].lowerText     = "";
            screenEventIndicators[1].upperOffColor = EventIndicator.color.OFF;
            screenEventIndicators[1].upperOnColor  = EventIndicator.color.OFF;
            screenEventIndicators[1].lowerOffColor = EventIndicator.color.OFF;
            screenEventIndicators[1].lowerOnColor  = EventIndicator.color.OFF;

            screenButtons[3]             = Helper.CreateButton(406, 112, 70, 56, "", true);
            screenButtons[3].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[3].setLightColor(MocrButton.color.BLANK);
            screenButtons[3].Click += (sender, e) => clickButton(sender, e, screenButtons[2]);

            // ROW TWO
            screenButtons[4]             = Helper.CreateButton(56, 168, 70, 56, "ABORT", true);
            screenButtons[4].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[4].setLightColor(MocrButton.color.BLANK);
            screenButtons[4].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[5]             = Helper.CreateButton(126, 168, 70, 56, "HOLD", true);
            screenButtons[5].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[5].setLightColor(MocrButton.color.BLANK);
            screenButtons[5].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[6]             = Helper.CreateButton(196, 168, 70, 56, "ORBIT", true);
            screenButtons[6].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[6].setLightColor(MocrButton.color.BLANK);
            screenButtons[6].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[7]             = Helper.CreateButton(266, 168, 70, 56, "ZERO LIFT", true);
            screenButtons[7].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[7].setLightColor(MocrButton.color.BLANK);
            screenButtons[7].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[8]             = Helper.CreateButton(336, 168, 70, 56, "HALF LIFT", true);
            screenButtons[8].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[8].setLightColor(MocrButton.color.BLANK);
            screenButtons[8].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[9]             = Helper.CreateButton(406, 168, 70, 56, "MAX LIFT", true);
            screenButtons[9].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[9].setLightColor(MocrButton.color.BLANK);
            screenButtons[9].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            // ROW THREE
            screenButtons[10]             = Helper.CreateButton(56, 224, 70, 56, "NO EVENT", true);
            screenButtons[10].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[10].setLightColor(MocrButton.color.RED);
            screenButtons[10].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenEventIndicators[2]               = Helper.createEventIndicator(126, 224, false, true);
            screenEventIndicators[2].upperText     = "RTCC\nTHRUST ON";
            screenEventIndicators[2].lowerText     = "SPS\nIGNITION";
            screenEventIndicators[2].upperOffColor = EventIndicator.color.OFF;
            screenEventIndicators[2].upperOnColor  = EventIndicator.color.WHITE_LIT;
            screenEventIndicators[2].lowerOffColor = EventIndicator.color.OFF;
            screenEventIndicators[2].lowerOnColor  = EventIndicator.color.GREEN_LIT;

            screenButtons[11]             = Helper.CreateButton(196, 224, 70, 56, "EVENT", true);
            screenButtons[11].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[11].setLightColor(MocrButton.color.AMBER);
            screenButtons[11].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[12]             = Helper.CreateButton(266, 224, 70, 56, "S-IVB ENG\nIGN", true);
            screenButtons[12].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[12].setLightColor(MocrButton.color.GREEN);
            screenButtons[12].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[13]             = Helper.CreateButton(336, 224, 70, 56, "SPS\nIGNITION", true);
            screenButtons[13].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[13].setLightColor(MocrButton.color.GREEN);
            screenButtons[13].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);

            screenButtons[14]             = Helper.CreateButton(406, 224, 70, 56, "LM\nIGNITION", true);
            screenButtons[14].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[14].setLightColor(MocrButton.color.GREEN);
            screenButtons[14].Click += (sender, e) => clickButton(sender, e, screenButtons[0]);



            screenScrews[0] = Helper.CreateScrew(4, 71, true);
            screenScrews[1] = Helper.CreateScrew(500, 71, true);
            screenScrews[2] = Helper.CreateScrew(4, 295, true);
            screenScrews[3] = Helper.CreateScrew(500, 295, true);
        }
Example #16
0
        public override void makeElements()
        {
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            for (int i = 0; i < 60; i++)
            {
                screenLabels.Add(null);                                      // Initialize Labels
            }
            for (int i = 0; i < 10; i++)
            {
                screenInputs.Add(null);                                      // Initialize Inputs
            }
            for (int i = 0; i < 10; i++)
            {
                screenButtons.Add(null);                                      // Initialize Buttons
            }
            for (int i = 0; i < 1; i++)
            {
                screenDropdowns.Add(null);                                     // Initialize Dropdowns
            }
            for (int i = 0; i < 1; i++)
            {
                screenCharts.Add(null);                                     // Initialize Chart
            }
            //screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2); // Every page must have an input to capture keypresses on Unix

            screenLabels[0] = Helper.CreateLabel(39, 0, 42, 1, "============ FLIGHT DYNAMICS =============");

            screenLabels[1] = Helper.CreateLabel(16, 1, 13);            // Local Time
            screenLabels[2] = Helper.CreateLabel(0, 1, 14);             // MET Time
            screenLabels[3] = Helper.CreateLabel(32, 1, 15);            // UT Time

            // BURN DATA LABLES
            screenLabels[4]  = Helper.CreateLabel(0, 2, 120, 1, "── CURRENT ORBITS DATA ──┬─────────── BURN DATA ───────────┬────────────────────");
            screenLabels[5]  = Helper.CreateLabel(25, 3, 1, 1, "│");
            screenLabels[25] = Helper.CreateLabel(42, 3, 15, 1, "HRS   MIN   SEC");
            screenLabels[6]  = Helper.CreateLabel(25, 4, 1, 1, "│");
            screenLabels[26] = Helper.CreateLabel(36, 4, 4, 1, "TIG:");
            screenLabels[7]  = Helper.CreateLabel(25, 6, 32, 1, "│    [+]          [-]     ΔV M/S");
            screenLabels[8]  = Helper.CreateLabel(25, 7, 25, 1, "│  PROGRADE / RETROGRADE:");
            screenLabels[9]  = Helper.CreateLabel(25, 8, 25, 1, "│ RADIAL IN / RADIAL OUT:");
            screenLabels[10] = Helper.CreateLabel(25, 9, 25, 1, "│    NORMAL / ANTINORMAL:");

            screenLabels[11] = Helper.CreateLabel(25, 5, 11, 1, "│ ItCount: ");
            screenLabels[12] = Helper.CreateLabel(59, 3, 1, 1, "│");
            screenLabels[13] = Helper.CreateLabel(59, 4, 1, 1, "│");
            screenLabels[14] = Helper.CreateLabel(59, 5, 1, 1, "│");
            screenLabels[15] = Helper.CreateLabel(59, 6, 1, 1, "│");
            screenLabels[16] = Helper.CreateLabel(59, 7, 1, 1, "│");
            screenLabels[17] = Helper.CreateLabel(59, 8, 1, 1, "│");
            screenLabels[18] = Helper.CreateLabel(59, 9, 1, 1, "│");
            screenLabels[19] = Helper.CreateLabel(25, 10, 37, 1, "├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┴─┐");

            // BURN DATA INPUTS
            screenInputs[0]           = Helper.CreateInput(41, 4, 5, 1);   // HRS
            screenInputs[0].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[0].Text      = "000";
            screenInputs[1]           = Helper.CreateInput(47, 4, 5, 1);   // MIN
            screenInputs[1].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[1].Text      = "00";
            screenInputs[2]           = Helper.CreateInput(53, 4, 5, 1);   // SEC
            screenInputs[2].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[2].Text      = "00.0";

            screenInputs[3]           = Helper.CreateInput(51, 7, 7, 1);   // Z
            screenInputs[3].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[3].Text      = "0.0";
            screenInputs[4]           = Helper.CreateInput(51, 8, 7, 1);   // X
            screenInputs[4].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[4].Text      = "0.0";
            screenInputs[5]           = Helper.CreateInput(51, 9, 7, 1);   // Y
            screenInputs[5].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[5].Text      = "0.0";

            // DEBUG BURN VALUES
            screenLabels[20] = Helper.CreateLabel(25, 11, 35, 1, "");
            screenLabels[21] = Helper.CreateLabel(25, 12, 35, 1, "");
            screenLabels[22] = Helper.CreateLabel(25, 13, 35, 1, "");

            // ZOOM LABEL
            screenLabels[23] = Helper.CreateLabel(62, 1, 12, 1, "ZOOM: ");

            // ZOOM BUTTONS
            screenButtons[0]        = Helper.CreateButton(74, 1, 5, 1, "-5");
            screenButtons[0].Font   = form.buttonFont;
            screenButtons[0].Click += (sender, e) => changeZoom(sender, e, -5f);
            screenButtons[1]        = Helper.CreateButton(80, 1, 5, 1, "-1");
            screenButtons[1].Font   = form.buttonFont;
            screenButtons[1].Click += (sender, e) => changeZoom(sender, e, -1f);
            screenButtons[2]        = Helper.CreateButton(86, 1, 5, 1, "-.1");
            screenButtons[2].Font   = form.buttonFont;
            screenButtons[2].Click += (sender, e) => changeZoom(sender, e, -0.1f);
            screenButtons[3]        = Helper.CreateButton(92, 1, 5, 1, "+.1");
            screenButtons[3].Font   = form.buttonFont;
            screenButtons[3].Click += (sender, e) => changeZoom(sender, e, 0.1f);
            screenButtons[4]        = Helper.CreateButton(98, 1, 5, 1, "+1");
            screenButtons[4].Font   = form.buttonFont;
            screenButtons[4].Click += (sender, e) => changeZoom(sender, e, 1f);
            screenButtons[5]        = Helper.CreateButton(104, 1, 5, 1, "+5");
            screenButtons[5].Font   = form.buttonFont;
            screenButtons[5].Click += (sender, e) => changeZoom(sender, e, 5f);


            // ORBIT(S) INFO
            screenLabels[30] = Helper.CreateLabel(1, 4, 24, 1, "NEXT PERIAPSE: ");
            screenLabels[31] = Helper.CreateLabel(1, 5, 24, 1, "NEXT APOAPSE: ");

            screenLabels[32] = Helper.CreateLabel(1, 7, 24, 18, "");

            // TARGET
            screenLabels[40] = Helper.CreateLabel(25, 14, 37, 1, "├───────────── TARGET ──────────────┤");
            screenLabels[41] = Helper.CreateLabel(25, 15, 17, 1, "│ SELECT TARGET: ");
            screenLabels[42] = Helper.CreateLabel(61, 15, 1, 1, "│");
            screenLabels[43] = Helper.CreateLabel(25, 16, 37, 1, "│        ── BODY DISTANCE ──        │");
            screenLabels[44] = Helper.CreateLabel(25, 17, 37, 1, "│      VESSEL     MUN      DELTA    │");
            screenLabels[45] = Helper.CreateLabel(25, 18, 37, 1, "│ X:  20000000  20000000  20000000  │");
            screenLabels[46] = Helper.CreateLabel(25, 19, 37, 1, "│ Y:  20000000  20000000  20000000  │");
            screenLabels[47] = Helper.CreateLabel(25, 20, 37, 1, "│ Z:  20000000  20000000  20000000  │");
            screenLabels[48] = Helper.CreateLabel(25, 21, 37, 1, "│                                   │");
            screenLabels[49] = Helper.CreateLabel(25, 22, 37, 1, "│CURRENT TOTAL DISTANCE:  20000000  │");
            screenLabels[50] = Helper.CreateLabel(25, 23, 37, 1, "│                                   │");
            screenLabels[51] = Helper.CreateLabel(25, 24, 37, 1, "│      ── CLOSEST APPROACH ──       │");
            screenLabels[52] = Helper.CreateLabel(25, 25, 37, 1, "┘ MET:  000:00:00  DIST:  20000000  │");
            screenLabels[53] = Helper.CreateLabel(0, 25, 25, 1, "─────────────────────────");

            // Target dropdown
            screenDropdowns[0] = Helper.CreateDropdown(41, 15, 20, 1);
            screenDropdowns[0].DisplayMember = "Name";

            screenButtons[8]             = Helper.CreateButton(26, 3, 10, 1, "ITERATE 5");
            screenButtons[8].Font        = form.buttonFont;
            screenButtons[8].buttonStyle = MocrButton.style.THIN_BORDER_LIGHT;
            screenButtons[8].Click      += (sender, e) => iterateDistances(sender, e, 5);
            screenButtons[9]             = Helper.CreateButton(26, 4, 10, 1, "ITERATE 1");
            screenButtons[9].Font        = form.buttonFont;
            screenButtons[9].buttonStyle = MocrButton.style.THIN_BORDER_LIGHT;
            screenButtons[9].Click      += (sender, e) => iterateDistances(sender, e, 1);

            screenInputs[6]           = Helper.CreateInput(36, 5, 10, 1);   // Iteration Count
            screenInputs[6].TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            screenInputs[6].Text      = "30000";

            IList <CelestialBody> sats = body.Satellites;

            foreach (CelestialBody sat in sats)
            {
                screenDropdowns[0].Items.Add(sat);
            }

            // OrbitGraph
            screenOrbit = Helper.CreateOrbit(62, 3, 58, 23);
            IList <CelestialBody> bodySatellites = body.Satellites;

            //screenOrbit.setBody(body, bodyRadius, bodyName, bodySatellites);

            // Closest approach chart
            screenCharts[0] = Helper.CreatePlot(0, 26, 62, 14);
            screenCharts[0].setSeriesColor(0, Color.FromArgb(255, 0, 0, 255));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(255, 0, 255, 0));

            // Plane chart (Z-diff from target)
            screenCharts[1] = Helper.CreatePlot(62, 26, 58, 14, 0, -1, -200000, 200000);
            screenCharts[1].setSeriesColor(0, Color.FromArgb(255, 0, 0, 255));
            screenCharts[1].setSeriesColor(1, Color.FromArgb(255, 0, 255, 0));
        }
Example #17
0
        public override void makeElements()
        {
            for (int i = 0; i < 100; i++)
            {
                screenLabels.Add(null);                                       // Initialize Labels
            }
            for (int i = 0; i < 70; i++)
            {
                screenIndicators.Add(null);                                      // Initialize Indicators
            }
            for (int i = 0; i < 80; i++)
            {
                screenButtons.Add(null);                                      // Initialize Buttons
            }
            for (int i = 0; i < 6; i++)
            {
                screenSegDisps.Add(null);                                     // Initialize 7-Segment Displays
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix


            // BUTTONS
            screenButtons[0]             = Helper.CreateButton(12, 300, 46, 46, "VERB", true);
            screenButtons[0].MouseDown  += verbPress;
            screenButtons[1]             = Helper.CreateButton(12, 350, 46, 46, "NOUN", true);
            screenButtons[1].MouseDown  += nounPress;
            screenButtons[2]             = Helper.CreateButton(62, 275, 46, 46, "+", true);
            screenButtons[2].MouseDown  += (sender, e) => keyPress(sender, e, "PLUS");
            screenButtons[3]             = Helper.CreateButton(62, 325, 46, 46, "-", true);
            screenButtons[3].MouseDown  += (sender, e) => keyPress(sender, e, "MINUS");
            screenButtons[4]             = Helper.CreateButton(62, 375, 46, 46, "0", true);
            screenButtons[4].MouseDown  += (sender, e) => numPress(sender, e, 0);
            screenButtons[5]             = Helper.CreateButton(112, 275, 46, 46, "7", true);
            screenButtons[5].MouseDown  += (sender, e) => numPress(sender, e, 7);
            screenButtons[6]             = Helper.CreateButton(112, 325, 46, 46, "4", true);
            screenButtons[6].MouseDown  += (sender, e) => numPress(sender, e, 4);
            screenButtons[7]             = Helper.CreateButton(112, 375, 46, 46, "1", true);
            screenButtons[7].MouseDown  += (sender, e) => numPress(sender, e, 1);
            screenButtons[8]             = Helper.CreateButton(162, 275, 46, 46, "8", true);
            screenButtons[8].MouseDown  += (sender, e) => numPress(sender, e, 8);
            screenButtons[9]             = Helper.CreateButton(162, 325, 46, 46, "5", true);
            screenButtons[9].MouseDown  += (sender, e) => numPress(sender, e, 5);
            screenButtons[10]            = Helper.CreateButton(162, 375, 46, 46, "2", true);
            screenButtons[10].MouseDown += (sender, e) => numPress(sender, e, 2);
            screenButtons[11]            = Helper.CreateButton(212, 275, 46, 46, "9", true);
            screenButtons[11].MouseDown += (sender, e) => numPress(sender, e, 9);
            screenButtons[12]            = Helper.CreateButton(212, 325, 46, 46, "6", true);
            screenButtons[12].MouseDown += (sender, e) => numPress(sender, e, 6);
            screenButtons[13]            = Helper.CreateButton(212, 375, 46, 46, "3", true);
            screenButtons[13].MouseDown += (sender, e) => numPress(sender, e, 3);
            screenButtons[14]            = Helper.CreateButton(262, 275, 46, 46, "CLR", true);
            screenButtons[14].MouseDown += (sender, e) => keyPress(sender, e, "CLR");
            screenButtons[15]            = Helper.CreateButton(262, 325, 46, 46, "PRO", true);
            screenButtons[15].MouseDown += (sender, e) => keyPress(sender, e, "PRO");
            screenButtons[16]            = Helper.CreateButton(262, 375, 46, 46, "KEY\nREL", true);
            screenButtons[16].MouseDown += (sender, e) => keyPress(sender, e, "KEYREL");
            screenButtons[17]            = Helper.CreateButton(312, 300, 46, 46, "ENTR", true);
            screenButtons[17].MouseDown += entrPress;
            screenButtons[18]            = Helper.CreateButton(312, 350, 46, 46, "RSET", true);
            screenButtons[18].MouseDown += (sender, e) => keyPress(sender, e, "RSET");

            // 7-SEG DISPLAYS
            screenSegDisps[0]       = Helper.CreateSegDisp(202, 132, 148, 36, 5, true, "R1", true);
            screenSegDisps[0].style = SegDisp.SegDispStyle.NO_BORDER;
            screenSegDisps[1]       = Helper.CreateSegDisp(202, 174, 148, 36, 5, true, "R2", true);
            screenSegDisps[1].style = SegDisp.SegDispStyle.NO_BORDER;
            screenSegDisps[2]       = Helper.CreateSegDisp(202, 216, 148, 36, 5, true, "R3", true);
            screenSegDisps[2].style = SegDisp.SegDispStyle.NO_BORDER;

            screenSegDisps[3]       = Helper.CreateSegDisp(214, 84, 49, 36, 2, false, "V", true);
            screenSegDisps[3].style = SegDisp.SegDispStyle.NO_BORDER;
            screenSegDisps[4]       = Helper.CreateSegDisp(300, 84, 49, 36, 2, false, "N", true);
            screenSegDisps[4].style = SegDisp.SegDispStyle.NO_BORDER;

            screenSegDisps[5]       = Helper.CreateSegDisp(300, 32, 49, 36, 2, false, "P", true);
            screenSegDisps[5].style = SegDisp.SegDispStyle.NO_BORDER;

            // 7-SEG LABELS
            screenLabels[1]           = Helper.CreateLabel(300, 18, 49, 13, "PROG", false, true);
            screenLabels[1].Font      = form.smallFontB;
            screenLabels[1].align     = CustomLabel.Alignment.CENTER;
            screenLabels[1].BackColor = Color.FromArgb(255, 0, 200, 0);
            screenLabels[1].ForeColor = Color.FromArgb(255, 0, 0, 0);
            screenLabels[1].setlineOffset(3);
            screenLabels[2]           = Helper.CreateLabel(214, 70, 49, 13, "VERB", false, true);
            screenLabels[2].Font      = form.smallFontB;
            screenLabels[2].align     = CustomLabel.Alignment.CENTER;
            screenLabels[2].BackColor = Color.FromArgb(255, 0, 200, 0);
            screenLabels[2].ForeColor = Color.FromArgb(255, 0, 0, 0);
            screenLabels[2].setlineOffset(3);
            screenLabels[3]           = Helper.CreateLabel(300, 70, 49, 13, "NOUN", false, true);
            screenLabels[3].Font      = form.smallFontB;
            screenLabels[3].align     = CustomLabel.Alignment.CENTER;
            screenLabels[3].BackColor = Color.FromArgb(255, 0, 200, 0);
            screenLabels[3].ForeColor = Color.FromArgb(255, 0, 0, 0);
            screenLabels[3].setlineOffset(3);

            // DSKY INDICATORS
            screenIndicators[50]      = Helper.CreateIndicator(25, 18, 70, 30, "UPLINK\nACTY", true);
            screenIndicators[50].Font = form.smallFont;
            screenIndicators[51]      = Helper.CreateIndicator(25, 52, 70, 30, "NO ATT", true);
            screenIndicators[51].Font = form.buttonFont;
            screenIndicators[52]      = Helper.CreateIndicator(25, 86, 70, 30, "STBY", true);
            screenIndicators[52].Font = form.buttonFont;
            screenIndicators[53]      = Helper.CreateIndicator(25, 120, 70, 30, "KEY REL", true);
            screenIndicators[53].Font = form.buttonFont;
            screenIndicators[54]      = Helper.CreateIndicator(25, 154, 70, 30, "OPR ERR", true);
            screenIndicators[54].Font = form.buttonFont;
            screenIndicators[55]      = Helper.CreateIndicator(25, 188, 70, 30, "", true);
            screenIndicators[55].Font = form.buttonFont;
            screenIndicators[56]      = Helper.CreateIndicator(25, 222, 70, 30, "", true);
            screenIndicators[56].Font = form.buttonFont;

            screenIndicators[57]      = Helper.CreateIndicator(101, 18, 70, 30, "TEMP", true);
            screenIndicators[57].Font = form.smallFont;
            screenIndicators[58]      = Helper.CreateIndicator(101, 52, 70, 30, "GIMBAL\nLOCK", true);
            screenIndicators[58].Font = form.buttonFont;
            screenIndicators[59]      = Helper.CreateIndicator(101, 86, 70, 30, "PROG", true);
            screenIndicators[59].Font = form.buttonFont;
            screenIndicators[60]      = Helper.CreateIndicator(101, 120, 70, 30, "RESTART", true);
            screenIndicators[60].Font = form.buttonFont;
            screenIndicators[61]      = Helper.CreateIndicator(101, 154, 70, 30, "TRACKER", true);
            screenIndicators[61].Font = form.buttonFont;
            screenIndicators[62]      = Helper.CreateIndicator(101, 188, 70, 30, "ALT", true);
            screenIndicators[62].Font = form.buttonFont;
            screenIndicators[63]      = Helper.CreateIndicator(101, 222, 70, 30, "VEL", true);
            screenIndicators[63].Font = form.buttonFont;

            screenIndicators[64]      = Helper.CreateIndicator(214, 18, 49, 49, "COMP\nACTY", true);
            screenIndicators[64].Font = form.buttonFont;

            // Backplate (Custom control-class that can go into labels)
            screenLabels[0] = new DSKYBackplate();
            form.Controls.Add(screenLabels[0]);
            screenLabels[0].Location = new System.Drawing.Point(0, 0);
            screenLabels[0].Size     = new System.Drawing.Size(width, height);
        }
Example #18
0
        public override void makeElements()
        {
            for (int i = 0; i < 4; i++)
            {
                screenScrews.Add(null);                                     // Initialize Screws
            }
            for (int i = 0; i < 20; i++)
            {
                screenLabels.Add(null);                                      // Initialize Labels
            }
            for (int i = 0; i < 60; i++)
            {
                screenButtons.Add(null);                                      // Initialize Buttons
            }
            for (int i = 0; i < 40; i++)
            {
                screenDigits.Add(null);                                      // Initialize Digits
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                     // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);             // Every page must have an input to capture keypresses on Unix

            screenLabels[0]      = Helper.CreateLabel(39, 8, 454, 29, "MANEUVER NODE CONFIGURATION", true, true);
            screenLabels[0].type = CustomLabel.LabelType.ENGRAVED;

            string[] digits = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", " " };
            string[] signs  = new string[] { " ", "+", "-" };


            // NODE SELECT
            screenLabels[1] = Helper.CreateLabel(64, 45, 50, 19, "┌NODE┐", true, true);

            screenDigits[0] = Helper.CreateConsoleDigit(80, 64, digits, true);
            screenDigits[0].setDigID(10);

            screenButtons[0]        = Helper.CreateButton(78, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[0].Click += (sender, e) => nextNode();
            screenButtons[1]        = Helper.CreateButton(78, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[1].Click += (sender, e) => prevNode();

            // MET
            screenLabels[2] = Helper.CreateLabel(233, 45, 235, 19, "┌───── MET OF NODE ──────┐", true, true);
            screenLabels[3] = Helper.CreateLabel(326, 80, 9, 19, ":", true, true);
            screenLabels[4] = Helper.CreateLabel(393, 80, 9, 19, ":", true, true);

            screenDigits[1] = Helper.CreateConsoleDigit(244, 64, digits, true);
            screenDigits[1].setDigID(10);
            screenDigits[2] = Helper.CreateConsoleDigit(271, 64, digits, true);
            screenDigits[2].setDigID(10);
            screenDigits[3] = Helper.CreateConsoleDigit(298, 64, digits, true);
            screenDigits[3].setDigID(10);

            screenDigits[4] = Helper.CreateConsoleDigit(338, 64, digits, true);
            screenDigits[4].setDigID(10);
            screenDigits[5] = Helper.CreateConsoleDigit(365, 64, digits, true);
            screenDigits[5].setDigID(10);

            screenDigits[6] = Helper.CreateConsoleDigit(405, 64, digits, true);
            screenDigits[6].setDigID(10);
            screenDigits[7] = Helper.CreateConsoleDigit(432, 64, digits, true);
            screenDigits[7].setDigID(10);

            screenButtons[2]            = Helper.CreateButton(241, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[2].MouseDown += (sender, e) => changeMET(360000);
            screenButtons[3]            = Helper.CreateButton(241, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[3].MouseDown += (sender, e) => changeMET(-360000);

            screenButtons[4]            = Helper.CreateButton(268, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[4].MouseDown += (sender, e) => changeMET(36000);
            screenButtons[5]            = Helper.CreateButton(268, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[5].MouseDown += (sender, e) => changeMET(-36000);

            screenButtons[6]            = Helper.CreateButton(295, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[6].MouseDown += (sender, e) => changeMET(3600);
            screenButtons[7]            = Helper.CreateButton(295, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[7].MouseDown += (sender, e) => changeMET(-3600);

            screenButtons[8]            = Helper.CreateButton(335, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[8].MouseDown += (sender, e) => changeMET(600);
            screenButtons[9]            = Helper.CreateButton(335, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[9].MouseDown += (sender, e) => changeMET(-600);

            screenButtons[10]            = Helper.CreateButton(362, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[10].MouseDown += (sender, e) => changeMET(60);
            screenButtons[11]            = Helper.CreateButton(362, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[11].MouseDown += (sender, e) => changeMET(-60);

            screenButtons[12]            = Helper.CreateButton(402, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[12].MouseDown += (sender, e) => changeMET(10);
            screenButtons[13]            = Helper.CreateButton(402, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[13].MouseDown += (sender, e) => changeMET(-10);

            screenButtons[14]            = Helper.CreateButton(429, 102, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[14].MouseDown += (sender, e) => changeMET(1);
            screenButtons[15]            = Helper.CreateButton(429, 129, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[15].MouseDown += (sender, e) => changeMET(-1);


            // PRO/RETRO
            screenLabels[5] = Helper.CreateLabel(64, 161, 200, 19, "┌──── PRO/RETRO ─────┐", true, true);
            screenLabels[6] = Helper.CreateLabel(214, 202, 9, 19, ".", true, true);

            screenDigits[8] = Helper.CreateConsoleDigit(78, 180, signs, true);
            screenDigits[8].setDigID(10);
            screenDigits[9] = Helper.CreateConsoleDigit(105, 180, digits, true);
            screenDigits[9].setDigID(10);
            screenDigits[10] = Helper.CreateConsoleDigit(132, 180, digits, true);
            screenDigits[10].setDigID(10);
            screenDigits[11] = Helper.CreateConsoleDigit(159, 180, digits, true);
            screenDigits[11].setDigID(10);
            screenDigits[12] = Helper.CreateConsoleDigit(186, 180, digits, true);
            screenDigits[12].setDigID(10);
            screenDigits[13] = Helper.CreateConsoleDigit(226, 180, digits, true);
            screenDigits[13].setDigID(10);

            screenButtons[16]            = Helper.CreateButton(102, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[16].MouseDown += (sender, e) => changeV(1000, "PRO");
            screenButtons[17]            = Helper.CreateButton(102, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[17].MouseDown += (sender, e) => changeV(-1000, "PRO");
            screenButtons[18]            = Helper.CreateButton(129, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[18].MouseDown += (sender, e) => changeV(100, "PRO");
            screenButtons[19]            = Helper.CreateButton(129, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[19].MouseDown += (sender, e) => changeV(-100, "PRO");
            screenButtons[20]            = Helper.CreateButton(156, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[20].MouseDown += (sender, e) => changeV(10, "PRO");
            screenButtons[21]            = Helper.CreateButton(156, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[21].MouseDown += (sender, e) => changeV(-10, "PRO");
            screenButtons[22]            = Helper.CreateButton(183, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[22].MouseDown += (sender, e) => changeV(1, "PRO");
            screenButtons[23]            = Helper.CreateButton(183, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[23].MouseDown += (sender, e) => changeV(-1, "PRO");
            screenButtons[24]            = Helper.CreateButton(223, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[24].MouseDown += (sender, e) => changeV(0.1, "PRO");
            screenButtons[25]            = Helper.CreateButton(223, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[25].MouseDown += (sender, e) => changeV(-0.1, "PRO");



            // RAD/ANTIRAD
            screenLabels[7] = Helper.CreateLabel(268, 161, 200, 19, "┌─── RAD/ANTIRAD ────┐", true, true);
            screenLabels[8] = Helper.CreateLabel(418, 202, 9, 19, ".", true, true);

            screenDigits[14] = Helper.CreateConsoleDigit(282, 180, signs, true);
            screenDigits[14].setDigID(10);
            screenDigits[15] = Helper.CreateConsoleDigit(309, 180, digits, true);
            screenDigits[15].setDigID(10);
            screenDigits[16] = Helper.CreateConsoleDigit(336, 180, digits, true);
            screenDigits[16].setDigID(10);
            screenDigits[17] = Helper.CreateConsoleDigit(363, 180, digits, true);
            screenDigits[17].setDigID(10);
            screenDigits[18] = Helper.CreateConsoleDigit(390, 180, digits, true);
            screenDigits[18].setDigID(10);
            screenDigits[19] = Helper.CreateConsoleDigit(430, 180, digits, true);
            screenDigits[19].setDigID(10);

            screenButtons[26]            = Helper.CreateButton(306, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[26].MouseDown += (sender, e) => changeV(1000, "RAD");
            screenButtons[27]            = Helper.CreateButton(306, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[27].MouseDown += (sender, e) => changeV(-1000, "RAD");
            screenButtons[28]            = Helper.CreateButton(333, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[28].MouseDown += (sender, e) => changeV(100, "RAD");
            screenButtons[29]            = Helper.CreateButton(333, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[29].MouseDown += (sender, e) => changeV(-100, "RAD");
            screenButtons[30]            = Helper.CreateButton(360, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[30].MouseDown += (sender, e) => changeV(10, "RAD");
            screenButtons[31]            = Helper.CreateButton(360, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[31].MouseDown += (sender, e) => changeV(-10, "RAD");
            screenButtons[32]            = Helper.CreateButton(387, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[32].MouseDown += (sender, e) => changeV(1, "RAD");
            screenButtons[33]            = Helper.CreateButton(387, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[33].MouseDown += (sender, e) => changeV(-1, "RAD");
            screenButtons[34]            = Helper.CreateButton(427, 218, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[34].MouseDown += (sender, e) => changeV(0.1, "RAD");
            screenButtons[35]            = Helper.CreateButton(427, 245, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[35].MouseDown += (sender, e) => changeV(-0.1, "RAD");


            // NORMAL/ANTINORM
            screenLabels[9]  = Helper.CreateLabel(268, 276, 200, 19, "┌── NORN/ANTINORM ───┐", true, true);
            screenLabels[10] = Helper.CreateLabel(418, 317, 9, 19, ".", true, true);

            screenDigits[20] = Helper.CreateConsoleDigit(282, 295, signs, true);
            screenDigits[20].setDigID(10);
            screenDigits[21] = Helper.CreateConsoleDigit(309, 295, digits, true);
            screenDigits[21].setDigID(10);
            screenDigits[22] = Helper.CreateConsoleDigit(336, 295, digits, true);
            screenDigits[22].setDigID(10);
            screenDigits[23] = Helper.CreateConsoleDigit(363, 295, digits, true);
            screenDigits[23].setDigID(10);
            screenDigits[24] = Helper.CreateConsoleDigit(390, 295, digits, true);
            screenDigits[24].setDigID(10);
            screenDigits[25] = Helper.CreateConsoleDigit(430, 295, digits, true);
            screenDigits[25].setDigID(10);

            screenButtons[36]            = Helper.CreateButton(306, 333, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[36].MouseDown += (sender, e) => changeV(1000, "NORM");
            screenButtons[37]            = Helper.CreateButton(306, 360, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[37].MouseDown += (sender, e) => changeV(-1000, "NORM");
            screenButtons[38]            = Helper.CreateButton(333, 333, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[38].MouseDown += (sender, e) => changeV(100, "NORM");
            screenButtons[39]            = Helper.CreateButton(333, 360, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[39].MouseDown += (sender, e) => changeV(-100, "NORM");
            screenButtons[40]            = Helper.CreateButton(360, 333, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[40].MouseDown += (sender, e) => changeV(10, "NORM");
            screenButtons[41]            = Helper.CreateButton(360, 360, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[41].MouseDown += (sender, e) => changeV(-10, "NORM");
            screenButtons[42]            = Helper.CreateButton(387, 333, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[42].MouseDown += (sender, e) => changeV(1, "NORM");
            screenButtons[43]            = Helper.CreateButton(387, 360, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[43].MouseDown += (sender, e) => changeV(-1, "NORM");
            screenButtons[44]            = Helper.CreateButton(427, 333, 28, 28, "+", true, MocrButton.style.TINY_PUSH);
            screenButtons[44].MouseDown += (sender, e) => changeV(0.1, "NORM");
            screenButtons[45]            = Helper.CreateButton(427, 360, 28, 28, "-", true, MocrButton.style.TINY_PUSH);
            screenButtons[45].MouseDown += (sender, e) => changeV(-0.1, "NORM");


            // ADD/DELETE NODE
            screenButtons[50]             = Helper.CreateButton(130, 65, 84, 38, "ADD NODE", true);
            screenButtons[50].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[50].Click      += (sender, e) => addNode(600);
            screenButtons[51]             = Helper.CreateButton(130, 105, 84, 38, "REM NODE", true);
            screenButtons[51].buttonStyle = MocrButton.style.LIGHT;
            screenButtons[51].Click      += (sender, e) => remNode();


            // SELECT TARGET

            /*
             * string[] targets = getTargetList(true);
             * screenDigits[28] = Helper.CreateConsoleDigit(78, 333, targets, true);
             * screenDigits[28].setDigID(0);
             * screenButtons[50] = Helper.CreateButton(223, 333, 28, 28, "+", true, Helper.ButtonType.TINY_PUSH);
             * screenButtons[50].MouseDown += (sender, e) => changeTarget(1);
             * screenButtons[51] = Helper.CreateButton(223, 360, 28, 28, "-", true, Helper.ButtonType.TINY_PUSH);
             * screenButtons[51].MouseDown += (sender, e) => changeTarget(-1);
             * /**/


            screenScrews[0] = Helper.CreateScrew(4, 71, true);
            screenScrews[1] = Helper.CreateScrew(500, 71, true);
            screenScrews[2] = Helper.CreateScrew(4, 295, true);
            screenScrews[3] = Helper.CreateScrew(500, 295, true);
        }
Example #19
0
        public override void makeElements()
        {
            for (int i = 0; i < 100; i++)
            {
                screenLabels.Add(null);                                       // Initialize Labels
            }
            for (int i = 0; i < 12; i++)
            {
                screenIndicators.Add(null);                                                                                                              // Initialize Indicators
            }
            screenLabels[0]  = Helper.CreateLabel(16, 1, 13);                                                                                            // Local Time
            screenLabels[1]  = Helper.CreateLabel(0, 1, 14);                                                                                             // MET Time
            screenLabels[2]  = Helper.CreateLabel(39, 0, 42, 1, "============ ASCENSION MODULE ============");                                           // Screen Title
            screenLabels[3]  = Helper.CreateLabel(84, 0, 39, 1, "├───────────── STATUS ─────────────┤");                                                 // Status Headline
            screenLabels[4]  = Helper.CreateLabel(84, 1, 1, 1, "│");
            screenLabels[5]  = Helper.CreateLabel(0, 2, 85, 1, "────────────────── ORBIT ──────────────────┬─────────────── POSITION ───────────────┤"); // Obrit/Position headline
            screenLabels[6]  = Helper.CreateLabel(0, 3, 44, 1, "                 CUR       TGT       DTA   │");                                          // Orbit subheadlines
            screenLabels[7]  = Helper.CreateLabel(43, 4, 1, 1, "│");
            screenLabels[8]  = Helper.CreateLabel(43, 5, 1, 1, "│");
            screenLabels[9]  = Helper.CreateLabel(43, 6, 1, 1, "│");
            screenLabels[10] = Helper.CreateLabel(43, 7, 1, 1, "│");
            screenLabels[11] = Helper.CreateLabel(43, 8, 1, 1, "│");
            screenLabels[12] = Helper.CreateLabel(43, 9, 1, 1, "│");
            screenLabels[13] = Helper.CreateLabel(43, 10, 1, 1, "│");
            screenLabels[14] = Helper.CreateLabel(43, 11, 1, 1, "│");
            screenLabels[15] = Helper.CreateLabel(43, 12, 1, 1, "│");
            screenLabels[16] = Helper.CreateLabel(84, 3, 1, 1, "│");
            screenLabels[17] = Helper.CreateLabel(84, 4, 1, 1, "│");
            screenLabels[18] = Helper.CreateLabel(84, 5, 1, 1, "│");
            screenLabels[19] = Helper.CreateLabel(84, 6, 1, 1, "│");
            screenLabels[20] = Helper.CreateLabel(84, 7, 36, 1, "│┌─────────── SUPPLIES ────────────┐");
            screenLabels[21] = Helper.CreateLabel(84, 8, 1, 1, "│");
            screenLabels[22] = Helper.CreateLabel(84, 9, 1, 1, "│");
            screenLabels[23] = Helper.CreateLabel(84, 10, 1, 1, "│");
            screenLabels[24] = Helper.CreateLabel(84, 11, 1, 1, "│");
            screenLabels[25] = Helper.CreateLabel(84, 12, 1, 1, "│");
            screenLabels[26] = Helper.CreateLabel(43, 13, 1, 1, "│");
            screenLabels[27] = Helper.CreateLabel(43, 14, 1, 1, "│");
            screenLabels[28] = Helper.CreateLabel(84, 13, 1, 1, "│");
            screenLabels[29] = Helper.CreateLabel(84, 14, 1, 1, "│");

            // Orbit data
            screenLabels[30] = Helper.CreateLabel(2, 4, 20, 1, "      Alt: ");             // Altitude
            screenLabels[31] = Helper.CreateLabel(2, 5, 20, 1, " Apoapsis: ");             // Apoapsis
            screenLabels[32] = Helper.CreateLabel(2, 6, 20, 1, "Periapsis: ");             // Periapasis
            screenLabels[33] = Helper.CreateLabel(2, 7, 20, 1, "      TtA: ");             // Time to Apoapsis
            screenLabels[34] = Helper.CreateLabel(2, 8, 20, 1, "      TtP: ");             // Time to Periapsis
            screenLabels[35] = Helper.CreateLabel(2, 9, 20, 1, "      Inc: ");             // Inclination
            screenLabels[36] = Helper.CreateLabel(2, 10, 20, 1, "      Ecc: ");            // Eccentricity
            screenLabels[37] = Helper.CreateLabel(2, 12, 20, 1, " Orb. Vel: ");            // Orbit Velocity
            screenLabels[38] = Helper.CreateLabel(2, 13, 20, 1, " Sur. Vel: ");            // Surface Velocity

            // Position data
            screenLabels[40] = Helper.CreateLabel(44, 4, 20, 1, "  Body: ");           // Sphere of Influence
            screenLabels[41] = Helper.CreateLabel(44, 5, 20, 1, "   Lat: ");           // Latitude
            screenLabels[42] = Helper.CreateLabel(44, 6, 20, 1, "   Lon: ");           // Longitude
            screenLabels[43] = Helper.CreateLabel(44, 9, 39, 1, " Atm.Den: ");         // Atmosphere Density AND Radar Alt
            screenLabels[44] = Helper.CreateLabel(44, 10, 20, 1, " Atm.Pre: ");        // Atmosphere Pressure
            screenLabels[45] = Helper.CreateLabel(44, 11, 20, 1, " Dyn.Pre: ");        // Dynamic Pressure
            screenLabels[46] = Helper.CreateLabel(64, 5, 19, 1, "R: ");                // Roll
            screenLabels[47] = Helper.CreateLabel(64, 6, 19, 1, "P: ");                // Pitch
            screenLabels[48] = Helper.CreateLabel(64, 7, 19, 1, "Y: ");                // Yaw
            screenLabels[49] = Helper.CreateLabel(64, 4, 19, 1, "     SURF     ORBT"); // RPY Headlines

            // Supplies
            screenLabels[50] = Helper.CreateLabel(85, 8, 35, 1, "                     ");                // Supply line 1
            screenLabels[51] = Helper.CreateLabel(85, 9, 35, 1, "                     ");                // Supply line 2
            screenLabels[52] = Helper.CreateLabel(85, 10, 35, 1, "                     ");               // Supply line 3
            screenLabels[53] = Helper.CreateLabel(85, 11, 35, 1, "                     ");               // Supply line 4
            screenLabels[54] = Helper.CreateLabel(85, 12, 35, 1, "                     ");               // Supply line 5
            screenLabels[55] = Helper.CreateLabel(85, 13, 35, 1, "                     ");               // Supply line 5
            screenLabels[58] = Helper.CreateLabel(85, 14, 35, 1, "└─────────────────────────────────┘"); // Supply line 6

            // Orbit Targets and Deltas
            screenLabels[60] = Helper.CreateLabel(24, 10, 8, 1, "");            // Target Eccentricity
            screenLabels[61] = Helper.CreateLabel(24, 12, 8, 1, "");            // Target Orbital Velocity

            screenLabels[65] = Helper.CreateLabel(34, 5, 8, 1, "");             // Delta Apoapsis
            screenLabels[66] = Helper.CreateLabel(34, 6, 8, 1, "");             // Delta Periapsis
            screenLabels[67] = Helper.CreateLabel(34, 10, 8, 1, "");            // Delta Eccentricity
            screenLabels[68] = Helper.CreateLabel(34, 12, 8, 1, "");            // Delta Orbital Velocty

            // Status
            screenIndicators[0]  = Helper.CreateIndicator(86, 1, 10, 1, "SAS");
            screenIndicators[1]  = Helper.CreateIndicator(97, 1, 10, 1, "RCS");
            screenIndicators[2]  = Helper.CreateIndicator(108, 1, 10, 1, "GEAR");
            screenIndicators[3]  = Helper.CreateIndicator(86, 2, 10, 1, "BRAKES");
            screenIndicators[4]  = Helper.CreateIndicator(97, 2, 10, 1, "LIGHTS");
            screenIndicators[5]  = Helper.CreateIndicator(108, 2, 10, 1, "ABORT");
            screenIndicators[6]  = Helper.CreateIndicator(86, 4, 10, 1, "POWER HI");
            screenIndicators[7]  = Helper.CreateIndicator(97, 4, 10, 1, "G HIGH");
            screenIndicators[8]  = Helper.CreateIndicator(108, 4, 10, 1, "LOX LOW");
            screenIndicators[9]  = Helper.CreateIndicator(86, 5, 10, 1, "POWER LOW");
            screenIndicators[10] = Helper.CreateIndicator(97, 5, 10, 1, "MONO LOW");
            screenIndicators[11] = Helper.CreateIndicator(108, 5, 10, 1, "FUEL LOW");

            // Get target apo/peri from PySSSMQ if they exsists there. If they don't write them in.
            string tgtapo  = form.dataStorage.getData("TGTAPO");
            string tgtperi = form.dataStorage.getData("TGTPERI");

            if (tgtapo == "")
            {
                tgtapo = "120000";
                form.dataStorage.setData("TGTAPO", tgtapo);
            }

            if (tgtperi == "")
            {
                tgtperi = "120000";
                form.dataStorage.setData("TGTPERI", tgtperi);
            }

            for (int i = 0; i < 5; i++)
            {
                screenInputs.Add(null);                                                                // Initialize Inputs
            }
            screenInputs[0]              = Helper.CreateInput(24, 5, 8, 1, HorizontalAlignment.Right); // Target Apoapsis
            screenInputs[0].Text         = tgtapo;
            screenInputs[0].TextChanged += (sender, e) => updateApo(sender, e, screenInputs[0].Text);
            screenInputs[1]              = Helper.CreateInput(24, 6, 8, 1, HorizontalAlignment.Right); // Target Periapsis
            screenInputs[1].Text         = tgtperi;
            screenInputs[1].TextChanged += (sender, e) => updatePeri(sender, e, screenInputs[1].Text);


            for (int i = 0; i < 2; i++)
            {
                screenCharts.Add(null);                                     // Initialize Charts
            }
            // Altitude vs. Time Graph
            screenCharts[0]             = Helper.CreatePlot(0, 15, 60, 15, -1, -1, 0, -1);
            screenCharts[0].fixedXwidth = 600;
            screenCharts[0].setSeriesColor(0, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(1, Color.FromArgb(100, 251, 251, 251));
            screenCharts[0].setSeriesColor(2, Color.FromArgb(200, 0, 169, 51));
            screenCharts[0].setSeriesColor(3, Color.FromArgb(200, 0, 51, 204));
            screenCharts[0].setSeriesColor(4, Color.FromArgb(200, 204, 51, 0));

            // Gee-Force vs. Time Graph
            screenCharts[1]             = Helper.CreatePlot(60, 15, 60, 15, -1, -1);
            screenCharts[1].fixedXwidth = 600;
        }
Example #20
0
        public override void makeElements()
        {
            for (int i = 0; i < 32; i++)
            {
                screenLabels.Add(null);                                      // Initialize Labels
            }
            for (int i = 0; i < 1; i++)
            {
                screenInputs.Add(null);                                    // Initialize Inputs
            }
            screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2);            // Every page must have an input to capture keypresses on Unix



            screenLabels[0]      = Helper.CreateLabel(1, 4, 58, 1);        // Connection Status
            screenLabels[0].Text = "NOT CONNECTED";

            screenLabels[1] = Helper.CreateLabel(61, 4, 58, 2);

            screenLabels[4] = Helper.CreateLabel(0, 0, 60, 2, "──────────────────── CONNECTION DETAILS ────────────────────");             // Connection Header}

            screenLabels[2] = Helper.CreateLabel(1, 6, 58, 2, "Label 2");

            screenLabels[3] = Helper.CreateLabel(0, 10, 120, 1, "┼─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ┼");
            screenLabels[5] = Helper.CreateLabel(0, 11, 1, 1, "│");             // TEST
            screenLabels[6] = Helper.CreateLabel(119, 11, 1, 1, "│");           // TEST
            screenLabels[7] = Helper.CreateLabel(0, 12, 1, 2, "│\n││");         // TEST
            screenLabels[8] = Helper.CreateLabel(1, 14, 1, 1, "│");             // TEST

            screenLabels[9] = Helper.CreateLabel(1, 5, 58, 2, "CTRL STATUS:");

            screenLabels[10] = Helper.CreateLabel(10, 11, 1, 1, "│");             // TEST
            screenLabels[11] = Helper.CreateLabel(20, 11, 1, 1, "│");             // TEST
            screenLabels[12] = Helper.CreateLabel(30, 11, 1, 1, "│");             // TEST
            screenLabels[13] = Helper.CreateLabel(40, 11, 1, 1, "│");             // TEST
            screenLabels[14] = Helper.CreateLabel(50, 11, 1, 1, "│");             // TEST
            screenLabels[15] = Helper.CreateLabel(60, 11, 1, 1, "│");             // TEST
            screenLabels[16] = Helper.CreateLabel(70, 11, 1, 1, "│");             // TEST

            screenLabels[17] = Helper.CreateLabel(20, 15, 6, 1, "HHgåfy");        // TEST
            screenLabels[18] = Helper.CreateLabel(20, 16, 6, 1, "HHåygf");        // TEST
            screenLabels[19] = Helper.CreateLabel(20, 17, 6, 1, "HHgåfy");        // TEST

            screenLabels[20] = Helper.CreateLabel(5, 15, 1, 1, "┼");
            screenLabels[21] = Helper.CreateLabel(6, 15, 1, 1, "┼");
            screenLabels[22] = Helper.CreateLabel(5, 16, 1, 1, "┼");
            screenLabels[23] = Helper.CreateLabel(6, 16, 1, 1, "┼");

            screenLabels[24] = Helper.CreateLabel(10, 14, 1, 1, "┼");

            screenLabels[25]           = Helper.CreateLabel(0, 10, 120, 1);
            screenLabels[25].Location  = new Point(4, 350);
            screenLabels[25].Size      = new Size((int)(120 * form.pxPrChar), (int)form.pxPrLine);
            screenLabels[25].Text      = "┼─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ─┬─ ─ ─ ─ ┼";
            screenLabels[25].ForeColor = Color.FromArgb(255, 255, 255);
            screenLabels[25].BackColor = Color.Maroon;

            screenLabels[26] = Helper.CreateLabel(60, 7, 25, 1, "THIS IS STANDARD TEXT", false);
            screenLabels[27] = Helper.CreateLabel(60, 8, 25, 1, "     THIS IS BIG TEXT", true);
            screenLabels[28] = Helper.CreateLabel(85, 7, 10, 1, "432.67", false);
            screenLabels[29] = Helper.CreateLabel(85, 8, 10, 1, "432.67", true);
            screenLabels[30] = Helper.CreateLabel(85, 6, 10, 1, "432.67", false);
            screenLabels[31] = Helper.CreateLabel(85, 9, 10, 1, "432.67", true);

            screenLabels[31] = Helper.CreateLabel(55, 14, 55, 1, "GREEK LETTERS: ΑΒΓΔΕΖΗΘΛΣΦΨΩ αβγδεζηθλμξπρφψω", true);
        }