void showWidgets(Constants.BellModes bellMode, Constants.EncoderVariablesCapture encoderMainVariable, EncoderRhythm encoderRhythm) { frame_best_and_worst.Hide(); frame_conditions.Hide(); hbox_jump_best_worst.Hide(); hbox_run_best_worst.Hide(); hbox_jump_conditions.Hide(); hbox_run_conditions.Hide(); frame_encoder_automatic_conditions.Hide(); vbox_encoder_manual.Hide(); notebook_encoder_conditions.Hide(); vbox_encoder_stuff.Hide(); notebook_main.GetNthPage(RHYTHMPAGE).Hide(); notebook_main.ShowTabs = false; if (bellMode == Constants.BellModes.JUMPS) { frame_best_and_worst.Show(); hbox_jump_best_worst.Show(); hbox_jump_conditions.Show(); frame_conditions.Show(); } else if (bellMode == Constants.BellModes.RUNS) { frame_best_and_worst.Show(); hbox_run_best_worst.Show(); hbox_run_conditions.Show(); frame_conditions.Show(); } else //encoder (grav and inertial) { vbox_encoder_stuff.Show(); frame_encoder_automatic_conditions.Show(); notebook_main.ShowTabs = true; vbox_encoder_manual.Show(); if (checkbutton_encoder_show_manual_feedback.Active) { notebook_encoder_conditions.Show(); } combo_encoder_main_variable.Active = UtilGtk.ComboMakeActive(combo_encoder_main_variable, Constants.GetEncoderVariablesCapture(encoderMainVariable)); notebook_main.GetNthPage(RHYTHMPAGE).Show(); encoder_rhythm_set_values(encoderRhythm); } label_test_sound_result.Text = ""; }
public void OnShowTextBoxActivate(object o, EventArgs args) { if (!showTextBox.Active) { noteBook.Hide(); } else { noteBook.Show(); } }
void showWidgets(Constants.BellModes bellMode) { frame_best_and_worst.Hide(); frame_conditions.Hide(); hbox_jump_best_worst.Hide(); hbox_run_best_worst.Hide(); hbox_jump_conditions.Hide(); hbox_run_conditions.Hide(); frame_encoder_automatic_conditions.Hide(); vbox_encoder_manual.Hide(); notebook_encoder_conditions.Hide(); if (bellMode == Constants.BellModes.JUMPS) { frame_best_and_worst.Show(); hbox_jump_best_worst.Show(); hbox_jump_conditions.Show(); frame_conditions.Show(); } else if (bellMode == Constants.BellModes.RUNS) { frame_best_and_worst.Show(); hbox_run_best_worst.Show(); hbox_run_conditions.Show(); frame_conditions.Show(); } else //encoder { notebook_encoder_conditions.CurrentPage = 3; //power frame_encoder_automatic_conditions.Show(); vbox_encoder_manual.Show(); if (checkbutton_encoder_show_manual_feedback.Active) { notebook_encoder_conditions.Show(); } } }
public SqlQueryView () { stoppedQueries = new List<object> (); MonoDevelop.SourceEditor.Extension.TemplateExtensionNodeLoader.Init (); this.UntitledName = string.Concat (AddinCatalog.GetString ("Untitled Sql Script"), ".sql"); vbox = new VBox (false, 6); vbox.BorderWidth = 6; Toolbar toolbar = new Toolbar (); toolbar.ToolbarStyle = ToolbarStyle.BothHoriz; buttonExecute = new ToolButton (ImageService.GetImage ("md-db-execute", IconSize.SmallToolbar), AddinCatalog.GetString ("_Execute")); buttonExecute.Label = AddinCatalog.GetString ("Execute"); buttonExecute.Sensitive = false; buttonExecute.TooltipMarkup = AddinCatalog.GetString ("Execute Query"); buttonExecute.IsImportant = true; buttonExecute.Clicked += new EventHandler (ExecuteClicked); buttonStop = new ToolButton ("gtk-stop"); buttonStop.TooltipText = AddinCatalog.GetString ("Stop Query Execution"); buttonStop.Sensitive = false; buttonStop.Clicked += new EventHandler (StopClicked); buttonClear = new ToolButton (ImageService.GetImage ("gtk-clear", IconSize.Button), AddinCatalog.GetString ("Clear Results")); buttonClear.TooltipText = AddinCatalog.GetString ("Clear Results"); buttonClear.Clicked += new EventHandler (ClearClicked); comboConnections = new DatabaseConnectionContextComboBox (); selectedConnection = comboConnections.DatabaseConnection; comboConnections.Changed += new EventHandler (ConnectionChanged); ToolItem comboItem = new ToolItem (); comboItem.Child = comboConnections; toolbar.Add (buttonExecute); toolbar.Add (buttonStop); toolbar.Add (buttonClear); toolbar.Add (new SeparatorToolItem ()); toolbar.Add (comboItem); pane = new VPaned (); // Sql History Window ScrolledWindow windowHistory = new ScrolledWindow (); history = new SqlEditorWidget (); history.Editable = false; windowHistory.AddWithViewport (history); // Status of the Last Query ScrolledWindow windowStatus = new ScrolledWindow (); status = new TextView (); windowStatus.Add (status); notebook = new Notebook (); notebook.AppendPage (windowStatus, new Label (AddinCatalog.GetString ("Status"))); notebook.AppendPage (windowHistory, new Label (AddinCatalog.GetString ("Query History"))); pane.Pack2 (notebook, true, true); vbox.PackStart (toolbar, false, true, 0); vbox.PackStart (pane, true, true, 0); this.Document.TextReplaced += SqlChanged; vbox.ShowAll (); Document.DocumentUpdated += delegate (object sender, EventArgs args) { // Default mime type or a provider defined. if (selectedConnection == null) Document.MimeType = "text/x-sql"; else Document.MimeType = GetMimeType (); }; notebook.Hide (); }
public SqlQueryView () { stoppedQueries = new List<object> (); vbox = new VBox (false, 6); vbox.BorderWidth = 6; sqlEditor = new SqlEditorWidget (); sqlEditor.TextChanged += new EventHandler (SqlChanged); Toolbar toolbar = new Toolbar (); toolbar.ToolbarStyle = ToolbarStyle.BothHoriz; buttonExecute = new ToolButton ( Services.Resources.GetImage ("md-db-execute", IconSize.SmallToolbar), GettextCatalog.GetString ("Execute") ); buttonStop = new ToolButton ("gtk-stop"); buttonClear = new ToolButton (Services.Resources.GetImage ("gtk-clear", IconSize.Button), GettextCatalog.GetString ("Clear Results")); buttonStop.Sensitive = false; buttonExecute.Sensitive = false; buttonExecute.Clicked += new EventHandler (ExecuteClicked); buttonStop.Clicked += new EventHandler (StopClicked); buttonClear.Clicked += new EventHandler (ClearClicked); comboConnections = new DatabaseConnectionContextComboBox (); selectedConnection = comboConnections.DatabaseConnection; comboConnections.Changed += new EventHandler (ConnectionChanged); buttonExecute.IsImportant = true; ToolItem comboItem = new ToolItem (); comboItem.Child = comboConnections; toolbar.Add (buttonExecute); toolbar.Add (buttonStop); toolbar.Add (buttonClear); toolbar.Add (new SeparatorToolItem ()); toolbar.Add (comboItem); pane = new VPaned (); ScrolledWindow windowStatus = new ScrolledWindow (); status = new TextView (); windowStatus.Add (status); notebook = new Notebook (); notebook.AppendPage (windowStatus, new Label (GettextCatalog.GetString ("Status"))); pane.Pack1 (sqlEditor, true, true); pane.Pack2 (notebook, true, true); vbox.PackStart (toolbar, false, true, 0); vbox.PackStart (pane, true, true, 0); vbox.ShowAll (); notebook.Hide (); }