private void commandExecute(object sender, ExecutedRoutedEventArgs e) { if (e.Command == SqlCommands.Home) { GoHome(); } if (e.Command == SqlCommands.Select) { Select(top: 0); } else if (e.Command == SqlCommands.Select1000) { Select(top: 1000); } else if (e.Command == SqlCommands.Execute) { Execute(); } else if (e.Command == ApplicationCommands.New) { New(); } else if (e.Command == ApplicationCommands.Save) { SelectedPane.Save(); } else if (e.Command == ApplicationCommands.Open) { Open(); } }
private static void RightColumnGUI() { // The right column GUILayout.BeginVertical(GUILayout.Width(550)); // Selector buttons GUILayout.BeginHorizontal(); if (GUILayout.Button("Debug Log", selectedPane == SelectedPane.DEBUG_LOG ? selectedButton : GUI.skin.button)) { selectedPane = SelectedPane.DEBUG_LOG; } if (GUILayout.Button("Contract Balancing", selectedPane == SelectedPane.BALANCE_MODE ? selectedButton : GUI.skin.button)) { selectedPane = SelectedPane.BALANCE_MODE; } if (FlightGlobals.ActiveVessel != null) { if (GUILayout.Button("Location", selectedPane == SelectedPane.LOCATION_MODE ? selectedButton : GUI.skin.button)) { selectedPane = SelectedPane.LOCATION_MODE; } } else if (selectedPane == SelectedPane.LOCATION_MODE) { selectedPane = SelectedPane.DEBUG_LOG; } GUILayout.EndHorizontal(); if (selectedPane == SelectedPane.DEBUG_LOG) { drawToolTip = false; scrollPosition2 = GUILayout.BeginScrollView(scrollPosition2, GUILayout.Width(550), GUILayout.ExpandHeight(true)); // Tooltip if (!string.IsNullOrEmpty(GUI.tooltip)) { tooltip = GUI.tooltip.Replace("\t", " "); } GUILayout.Label(tooltip, bigTipStyle); GUILayout.EndScrollView(); } else if (selectedPane == SelectedPane.BALANCE_MODE) { if (Event.current.type == EventType.Repaint) { drawToolTip = string.IsNullOrEmpty(GUI.tooltip); } BalanceModeGUI(); } else if (selectedPane == SelectedPane.LOCATION_MODE) { if (Event.current.type == EventType.Repaint) { drawToolTip = string.IsNullOrEmpty(GUI.tooltip); } LocationModeGUI(); } GUILayout.EndVertical(); }