Beispiel #1
0
 private void btnATN_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_777X_Control.EVT_CDU_C_ALTN, Aircraft.ClkL);
     RefreshCDU();
 }
        private void CDUForm_KeyDown(object sender, KeyEventArgs e)
        {
            // keys for CDU buttons
            // menu key
            if ((e.Alt && e.KeyCode == Keys.M))
            {
                btnMenu.PerformClick();
            }
            // Execute
            if ((e.Alt && e.KeyCode == Keys.E))
            {
                btnExec.PerformClick();
            }
            // dep arr
            if ((e.Alt && e.KeyCode == Keys.D))
            {
                btnDepArr.PerformClick();
                RefreshCDU();
            }
            // init ref
            if ((e.Alt && e.KeyCode == Keys.I))
            {
                btnInitRef.PerformClick();
            }
            // prog
            if ((e.Alt && e.KeyCode == Keys.P))
            {
                btnProg.PerformClick();
            }
            // RTE
            if ((e.Alt && e.KeyCode == Keys.R))
            {
                btnRte.PerformClick();
            }
            // CLB
            if ((e.Alt && e.KeyCode == Keys.C))
            {
                btnClb.PerformClick();
            }
            // CRZ
            if ((e.Alt && e.KeyCode == Keys.Z))
            {
                btnCrz.PerformClick();
            }
            // DES
            if ((e.Alt && e.KeyCode == Keys.L))
            {
                btnDes.PerformClick();
            }
            // legs
            if ((e.Alt && e.KeyCode == Keys.G))
            {
                btnLegs.PerformClick();
            }
            // hold
            if ((e.Alt && e.KeyCode == Keys.H))
            {
                btnHold.PerformClick();
            }
            // N1 Limit
            if ((e.Alt && e.KeyCode == Keys.N))
            {
                btnN1Limit.PerformClick();
            }
            // fix
            if ((e.Alt && e.KeyCode == Keys.F))
            {
                btnFix.PerformClick();
                RefreshCDU();
            }

            if ((e.Alt && e.KeyCode == Keys.D1))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R1, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D2))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R2, Aircraft.ClkL);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D3))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R3, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D4))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R4, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D5))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R5, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D6))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R6, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D1))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L1, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D2))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L2, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D3))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L3, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D4))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L4, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D5))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L5, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D6))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L6, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.X))
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_DEL, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }

            if (e.KeyCode == Keys.PageDown)
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_NEXT_PAGE, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if (e.KeyCode == Keys.PageUp)
            {
                FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_PREV_PAGE, 0x20000000);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
        }
 private void startApuButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_OH_ELEC_APU_SEL_SWITCH, Aircraft.ClkR);
     Thread.Sleep(250);
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_OH_ELEC_APU_SEL_SWITCH, Aircraft.ClkR);
 }
Beispiel #4
0
 private void vertSpeedHoldButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_VS_SWITCH, Aircraft.ClkL);
 }
 private void btnFix_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_FIX, Aircraft.ClkL);
     RefreshCDU();
 }
Beispiel #6
0
 private void thrustButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_THR_SWITCH, Aircraft.ClkL);
 }
Beispiel #7
0
 private void altitudeButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_ALTITUDE_PUSH_SWITCH, Aircraft.ClkL);
 }
        }     // End txtEntry_KeyDown.

        private void _747CDU_KeyDown(object sender, KeyEventArgs e)
        {
            // Allow Alt+F4 to perform the default Windows action.
            if ((e.Alt) && (e.KeyCode == Keys.F4))
            {
                return;
            }

            // Line select keys.
            if (Properties.Settings.Default.PMDGCDUKeyLayout == "1")
            {
                ProcessDefaultSoftKeys(e);
            }

            if (Properties.Settings.Default.PMDGCDUKeyLayout == "2")
            {
                ProcessAlternateSoftKeys(e);
            }
            // Activate the buttons.
            if ((e.Alt) && (e.KeyCode == Keys.R))
            {
                btnRefresh.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.S))
            {
                txtEntry.Focus();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.C))
            {
                btnClear.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.I))
            {
                btnInitRef.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.T))
            {
                btnRte.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.A))
            {
                btnATC.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.V))
            {
                btnVNAV.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.Shift) && (e.KeyCode == Keys.F))
            {
                btnFMCCOMM.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.M))
            {
                btnMenu.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.G))
            {
                btnLegs.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.D))
            {
                btnDepArr.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.H))
            {
                btnHold.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.P))
            {
                btnProg.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.E))
            {
                btnExec.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.X))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_DEL, Aircraft.ClkL);
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.Shift) && (e.KeyCode == Keys.S))
            {
                btnSTART.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.F))
            {
                btnFix.PerformClick();
                e.SuppressKeyPress = true;
            }
            if (e.KeyCode == Keys.PageUp)
            {
                btnPrev.PerformClick();
                e.SuppressKeyPress = true;
            }
            if (e.KeyCode == Keys.PageDown)
            {
                btnNext.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.O))
            {
                btnRADIOS.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.Shift) && (e.KeyCode == Keys.E))
            {
                btnEnd.PerformClick();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt) && (e.KeyCode == Keys.Home))
            {
                txtCDU.Focus();
                e.SuppressKeyPress = true;
            }
        } // End 747CDUKeyDown.
        } // End 747CDUKeyDown.

        private void ProcessDefaultSoftKeys(KeyEventArgs e)
        {
            if ((e.Alt && e.KeyCode == Keys.D1))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R1, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D2))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R2, Aircraft.ClkL);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D3))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R3, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D4))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R4, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D5))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R5, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Alt && e.KeyCode == Keys.D6))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R6, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D1))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L1, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D2))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L2, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D3))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L3, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D4))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L4, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
            }
            if ((e.Control && e.KeyCode == Keys.D5))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L5, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
            if ((e.Control && e.KeyCode == Keys.D6))
            {
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L6, 0x20000000);
                txtEntry.Clear();
                RefreshCDU();
                e.SuppressKeyPress = true;
            }
        }
        } // End btnATC_Click.

        private void btnVNAV_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_VNAV, Aircraft.ClkL);
        } // End btnVNAV_Click.
        } // End btnEND_Click.

        private void txtEntry_KeyDown(object sender, KeyEventArgs e)
        {
            //Make an exception for Ctrl+A to perform default windows commands.
            if ((e.Control) && (e.KeyCode == Keys.A))
            {
                return;
            }

            switch (e.KeyCode)
            {
            case Keys.A:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_A, Aircraft.ClkL);
                break;

            case Keys.B:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_B, Aircraft.ClkL);
                break;

            case Keys.C:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_C, Aircraft.ClkL);
                break;

            case Keys.D:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_D, Aircraft.ClkL);
                break;

            case Keys.E:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_E, Aircraft.ClkL);
                break;

            case Keys.F:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_F, Aircraft.ClkL);
                break;

            case Keys.G:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_G, Aircraft.ClkL);
                break;

            case Keys.H:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_H, Aircraft.ClkL);
                break;

            case Keys.I:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_I, Aircraft.ClkL);
                break;

            case Keys.J:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_J, Aircraft.ClkL);
                break;

            case Keys.K:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_K, Aircraft.ClkL);
                break;

            case Keys.L:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L, Aircraft.ClkL);
                break;

            case Keys.M:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_M, Aircraft.ClkL);
                break;

            case Keys.N:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_N, Aircraft.ClkL);
                break;

            case Keys.O:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_O, Aircraft.ClkL);
                break;

            case Keys.P:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_P, Aircraft.ClkL);
                break;

            case Keys.Q:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_Q, Aircraft.ClkL);
                break;

            case Keys.R:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R, Aircraft.ClkL);
                break;

            case Keys.S:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_S, Aircraft.ClkL);
                break;

            case Keys.T:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_T, Aircraft.ClkL);
                break;

            case Keys.U:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_U, Aircraft.ClkL);
                break;

            case Keys.V:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_V, Aircraft.ClkL);
                break;

            case Keys.W:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_W, Aircraft.ClkL);
                break;

            case Keys.X:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_X, Aircraft.ClkL);
                break;

            case Keys.Y:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_Y, Aircraft.ClkL);
                break;

            case Keys.Z:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_Z, Aircraft.ClkL);
                break;

            case Keys.D0:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_0, Aircraft.ClkL);
                break;

            case Keys.D1:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_1, Aircraft.ClkL);
                break;

            case Keys.D2:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_2, Aircraft.ClkL);
                break;

            case Keys.D3:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_3, Aircraft.ClkL);
                break;

            case Keys.D4:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_4, Aircraft.ClkL);
                break;

            case Keys.D5:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_5, Aircraft.ClkL);
                break;

            case Keys.D6:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_6, Aircraft.ClkL);
                break;

            case Keys.D7:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_7, Aircraft.ClkL);
                break;

            case Keys.D8:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_8, Aircraft.ClkL);
                break;

            case Keys.D9:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_9, Aircraft.ClkL);
                break;

            case Keys.Space:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_SPACE, Aircraft.ClkL);
                break;

            case Keys.Back:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_DEL, Aircraft.ClkL);
                break;

            case Keys.OemQuestion:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_SLASH, Aircraft.ClkL);
                break;

            case Keys.Oemplus:
                // send key twice to get plus symbol
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_PLUS_MINUS, Aircraft.ClkL);
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_PLUS_MINUS, Aircraft.ClkL);
                break;

            case Keys.OemMinus:
                txtEntry.Text = txtEntry.Text.Remove(txtEntry.Text.Length - 1, 1);
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_PLUS_MINUS, Aircraft.ClkL);
                break;

            case Keys.OemPeriod:
                FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_DOT, Aircraft.ClkL);
                break;
            } // End switch.
        }     // End txtEntry_KeyDown.
        } // End btnPREV_Click.

        private void btnNext_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_NEXT_PAGE, Aircraft.ClkL);
            RefreshCDU();
            Tolk.Output($"{pmdg.cdu0.Rows[0]}");
        } // End btnNEXT_Click.
        } // End btnLEGS_Click.

        private void btnDepArr_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_DEP_ARR, Aircraft.ClkL);
            RefreshCDU();
        } // End btnDEPAR_Click.
Beispiel #14
0
        } // End btnInitRef_Click.

        private void btnRte_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_777X_Control.EVT_CDU_L_RTE, Aircraft.ClkL);
            RefreshCDU();
        } // End btnRTE_Click.
Beispiel #15
0
 private void speedIntvButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_SPEED_PUSH_SWITCH, Aircraft.ClkL);
 }
 private void ProcessAlternateSoftKeys(KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L1, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F2)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L2, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F3)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L3, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F4)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L4, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F5)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L5, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F6)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_L6, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F7)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R1, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F8)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R2, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F9)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R3, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F10)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R4, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F11)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R5, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled = true;
     }
     if (e.KeyCode == Keys.F12)
     {
         FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_R6, Aircraft.ClkL);
         txtEntry.Clear();
         RefreshCDU();
         e.Handled          = true;
         e.SuppressKeyPress = true;
     }
 }
Beispiel #17
0
 private void iasMachToggleButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_IAS_MACH_SWITCH, Aircraft.ClkL);
 }
        } // End btnRTE_Click.

        private void btnMenu_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_CDU_L_MENU, Aircraft.ClkL);
            RefreshCDU();
        } // End btnMENU_Click.
Beispiel #19
0
 private void flChangeButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_LVL_CHG_SWITCH, Aircraft.ClkL);
 }
Beispiel #20
0
 public void ElecGroundPowerOff()
 {
     FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_OH_ELEC_GRD_PWR_SWITCH, Aircraft.ClkR);
 }
Beispiel #21
0
 private void headingButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_MCP_HEADING_PUSH_SWITCH, Aircraft.ClkL);
 }
Beispiel #22
0
 // APU generators
 public void ElecAPUGen1On()
 {
     FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_OH_ELEC_APU_GEN1_SWITCH, Aircraft.ClkL);
 }
        private void btnSend_Click(object sender, EventArgs e)
        {
            if (txtEntry.Text == "")
            {
                return;
            }
            // clear the entry textbox
//            txtEntry.Clear();
            // convert the entered text to an array so we can get at each character
            char [] charArray = txtEntry.Text.ToUpper().ToCharArray();
            foreach (char ch in charArray)
            {
                switch (ch)
                {
                case 'A':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_A, Aircraft.ClkL);
                    break;

                case 'B':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_B, Aircraft.ClkL);
                    break;

                case 'C':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_C, Aircraft.ClkL);
                    break;

                case 'D':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_D, Aircraft.ClkL);
                    break;

                case 'E':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_E, Aircraft.ClkL);
                    break;

                case 'F':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_F, Aircraft.ClkL);
                    break;

                case 'G':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_G, Aircraft.ClkL);
                    break;

                case 'H':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_H, Aircraft.ClkL);
                    break;

                case 'I':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_I, Aircraft.ClkL);
                    break;

                case 'J':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_J, Aircraft.ClkL);
                    break;

                case 'K':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_K, Aircraft.ClkL);
                    break;

                case 'L':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_L, Aircraft.ClkL);
                    break;

                case 'M':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_M, Aircraft.ClkL);
                    break;

                case 'N':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_N, Aircraft.ClkL);
                    break;

                case 'O':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_O, Aircraft.ClkL);
                    break;

                case 'P':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_P, Aircraft.ClkL);
                    break;

                case 'Q':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_Q, Aircraft.ClkL);
                    break;

                case 'R':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_R, Aircraft.ClkL);
                    break;

                case 'S':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_S, Aircraft.ClkL);
                    break;

                case 'T':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_T, Aircraft.ClkL);
                    break;

                case 'U':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_U, Aircraft.ClkL);
                    break;

                case 'V':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_V, Aircraft.ClkL);
                    break;

                case 'W':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_W, Aircraft.ClkL);
                    break;

                case 'X':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_X, Aircraft.ClkL);
                    break;

                case 'Y':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_Y, Aircraft.ClkL);
                    break;

                case 'Z':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_Z, Aircraft.ClkL);
                    break;

                case '1':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_1, Aircraft.ClkL);
                    break;

                case '2':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_2, Aircraft.ClkL);
                    break;

                case '3':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_3, Aircraft.ClkL);
                    break;

                case '4':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_4, Aircraft.ClkL);
                    break;

                case '5':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_5, Aircraft.ClkL);
                    break;

                case '6':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_6, Aircraft.ClkL);
                    break;

                case '7':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_7, Aircraft.ClkL);
                    break;

                case '8':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_8, Aircraft.ClkL);
                    break;

                case '9':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_9, Aircraft.ClkL);
                    break;

                case '0':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_0, Aircraft.ClkL);
                    break;

                case '.':
                    FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_DOT, Aircraft.ClkL);
                    break;
                }
                Thread.Sleep(50);
                RefreshCDU();
            }
        }
Beispiel #24
0
 public void ElecGen2Off()
 {
     FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_OH_ELEC_GEN2_SWITCH, Aircraft.ClkR);
 }
 private void btnNext_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_CDU_L_PREV_PAGE, 0x20000000);
     RefreshCDU();
 }
Beispiel #26
0
// APU
        public void ElecAPUStart()
        {
            FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_OH_LIGHTS_APU_START, Aircraft.ClkL);
            Thread.Sleep(250);
            FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_OH_LIGHTS_APU_START, Aircraft.ClkL);
        }
        } // End utility2CheckBox_CheckChanged.

        private void shutdownAPUButton_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_OH_ELEC_APU_SEL_SWITCH, Aircraft.ClkL);
            FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_OH_ELEC_APU_SEL_SWITCH, Aircraft.ClkL);
        }
Beispiel #28
0
 public void ElecAPUShutdown()
 {
     FSUIPCConnection.SendControlToFS(PMDG_737_NGX_Control.EVT_OH_LIGHTS_APU_START, Aircraft.ClkR);
 }
 private void apuGen2OffButton_Click(object sender, EventArgs e)
 {
     FSUIPCConnection.SendControlToFS(PMDG_747QOTSII_Control.EVT_OH_ELEC_APU_GEN2_SWITCH, Aircraft.ClkR);
 }
Beispiel #30
0
        } // End btnFIX_Click.

        private void btnPrev_Click(object sender, EventArgs e)
        {
            FSUIPCConnection.SendControlToFS(PMDG_777X_Control.EVT_CDU_L_PREV_PAGE, Aircraft.ClkL);
            RefreshCDU();
            Tolk.Output($"{pmdg.cdu0.Rows[0]}");
        } // End btnPREV_Click.