Ejemplo n.º 1
0
 private void fsxAltitudeChanged(object sender, FSXConnect.AltitudeChangedEventArgs e)
 {
     txtbxRemarks.Text = e.altitude.ToString();
 }
Ejemplo n.º 2
0
 private void closeConnection()
 {
     if (fsxConnection != null)
     {
         fsxConnection.closeConnection();
         fsxConnection = null;
         btnConnectToggle.Image = Properties.Resources.Disconnected32;
     }
 }
Ejemplo n.º 3
0
        private void fsxAction(object sender, FSXConnect.FSXActionEventArgs e)
        {
            switch (e.Action)
            {
                //KEY_PRESSURIZATION_PRESSURE_ALT_INC,
                //KEY_PRESSURIZATION_PRESSURE_ALT_DEC,
                //KEY_PRESSURIZATION_PRESSURE_DUMP_SWITCH,

                case (uint)EVENTS.KEY_TOGGLE_PROPELLER_DEICE:

                    ShowHideFlowcort();
                    break;

                case (uint)EVENTS.KEY_PRESSURIZATION_PRESSURE_ALT_INC:

                    nextActionItem(true);
                    break;

                case (uint)EVENTS.KEY_PRESSURIZATION_PRESSURE_ALT_DEC:

                    nextActionItem(false);
                    break;

                case (uint)EVENTS.KEY_PRESSURIZATION_PRESSURE_DUMP_SWITCH:

                    toggleDoneUndone();
                    break;

            }
        }
Ejemplo n.º 4
0
        private void btnConnectToggle_Click(object sender, EventArgs e)
        {
            if (fsxConnection == null)
            {
                fsxConnection = new FSXConnect(this);
                fsxConnection.openConnection();
                fsxConnection.ConnectionOpenEventHandler += new EventHandler(fsxConnectionOpened);

                // todo need a way to ensure that Flowcort is shown when FSX quits

                fsxConnection.FSXActionEventHandler += new EventHandler<FSXConnect.FSXActionEventArgs>(fsxAction);
                fsxConnection.AltitudeChangedEventHandler += new EventHandler<FSXConnect.AltitudeChangedEventArgs>(fsxAltitudeChanged);
            }
            else
            {
                closeConnection();
            }
        }