} //End FlyModes selected index change event. private void TFMMainForm_Load(object sender, EventArgs e) { //Move to a configure function when implementing settings. if (Properties.Settings.Default.AvionicsTabChangeFlag) { Properties.Settings.Default.avionics_tab = Properties.Settings.Default.NewAvionicsTab; Properties.Settings.Default.AvionicsTabChangeFlag = false; Properties.Settings.Default.Save(); } if (Properties.Settings.Default.avionics_tab == "simplified") { TFMTabControl.TabPages.Remove(AvionicsExplorationTabPage); GageComboBox.SelectedIndex = 0; FlyModeComboBox.SelectedIndex = 0; GageComboBox.Focus(); AutopilotCheckBox.Checked = Autopilot.ApMaster; } else { //Following code is expiremental. TFMTabControl.TabPages.Remove(AvionicsTabPage); AutopilotPropertyGrid.SelectedObject = Autopilot; } }
private void TFMMainForm_KeyDown(object sender, KeyEventArgs e) { // Manually define keyboard shortcuts for the Gages list and the gage value textbox. if ((e.Control && e.KeyCode == Keys.E)) { GageValueTextBox.Focus(); }// End Gage textfield assignment. if ((e.Control && e.KeyCode == Keys.G)) { GageComboBox.Focus(); } //End Gage list assignment. if ((e.Control && e.KeyCode == Keys.U)) { LockGageCheckBox.Focus(); } // End Auto gage assignment. if ((e.Control && e.KeyCode == Keys.F)) { FlyModeComboBox.Focus(); } //End FlyMode assignment. if ((e.Control && e.KeyCode == Keys.P)) { AutopilotCheckBox.Focus(); } //End autopilot assignment. if ((e.Control && e.KeyCode == Keys.L)) { OutputLogTextBox.Focus(); } //End output log assignment. if ((e.Control) && (e.KeyCode == Keys.W)) { this.waypointsListView.Focus(); } // End waypoints list assignment. if ((e.Control) && (e.KeyCode == Keys.R)) { this.waypointRestrictionsTextBox.Focus(); } if ((e.Control && e.KeyCode == Keys.D1)) { if (TFMTabControl.TabPages.Contains(AvionicsTabPage)) { TFMTabControl.SelectedTab = AvionicsTabPage; } else { TFMTabControl.SelectedTab = AvionicsExplorationTabPage; } } //End Avionics assignment. if ((e.Control && e.KeyCode == Keys.D2)) { TFMTabControl.SelectedTab = FlightPlanTabPage; } //End FlightPlan assignment. if ((e.Control && e.KeyCode == Keys.D3)) { TFMTabControl.SelectedTab = ProceduresTabPage; } //End Procedures assignment. if ((e.Control && e.KeyCode == Keys.D4)) { TFMTabControl.SelectedTab = FindTabPage; } //End Find assignment. } //End KeyDown event.