//useful to show only an image //in a future do a DialogImage class (with this). And the inherit to DialogImageTest public DialogImageTest(string title, string imagePath, ArchiveType archiveType) { if (archiveType == ArchiveType.FILE && !File.Exists(imagePath)) { new DialogMessage(Constants.MessageTypes.WARNING, Constants.MultimediaFileNoExists); return; } Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_image_test.glade", "dialog_image_test", "chronojump"); gladeXML.Autoconnect(this); dialog_image_test.Title = title; label_name_description.Visible = false; //put an icon to window UtilGtk.IconWindow(dialog_image_test); scrolledwindow28.Hide(); Pixbuf pixbuf; if (archiveType == ArchiveType.FILE) { pixbuf = new Pixbuf(imagePath); } else //ASSEMBLY { pixbuf = new Pixbuf(null, imagePath); } image_test.Pixbuf = pixbuf; dialog_image_test.WidthRequest = pixbuf.Width + 40; //allocate vertical scrollbar if needed dialog_image_test.HeightRequest = pixbuf.Height + 85; //allocate button close }
RepetitiveConditionsWindow() { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "repetitive_conditions.glade", "repetitive_conditions", "chronojump"); gladeXML.Autoconnect(this); //don't show until View is called repetitive_conditions.Hide(); //put an icon to window UtilGtk.IconWindow(repetitive_conditions); FakeButtonClose = new Gtk.Button(); //createComboEncoderAutomaticVariable(); createComboEncoderMainVariable(); bestSetValueCaptureMainVariable = 0; bestSetValueCaptureMainVariable = 0; notebook_encoder_conditions.CurrentPage = 3; //power putNonStandardIcons(); label_rhythm_tab.Text = Catalog.GetString("Rhythm") + " / " + Catalog.GetString("Protocol"); }
public DialogImageTest(EventType myEventType) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_image_test.glade", "dialog_image_test", null); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(dialog_image_test); label_name_description.Text = "<b>" + myEventType.Name + "</b>" + " - " + myEventType.Description; label_name_description.UseMarkup = true; if (myEventType.LongDescription.Length == 0) { scrolledwindow28.Hide(); } else { label_long_description.Text = myEventType.LongDescription; label_long_description.UseMarkup = true; } Pixbuf pixbuf = new Pixbuf(null, Util.GetImagePath(false) + myEventType.ImageFileName); image_test.Pixbuf = pixbuf; }
//useful to show only an image //in a future do a DialogImage class (with this). And the inherit to DialogImageTest public DialogImageTest(string title, string imagePath, ArchiveType archiveType) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_image_test.glade", "dialog_image_test", "chronojump"); gladeXML.Autoconnect(this); dialog_image_test.Title = title; label_name_description.Visible = false; //put an icon to window UtilGtk.IconWindow(dialog_image_test); scrolledwindow28.Hide(); if (archiveType == ArchiveType.FILE) { if (File.Exists(imagePath)) { Pixbuf pixbuf = new Pixbuf(imagePath); image_test.Pixbuf = pixbuf; } else { new DialogMessage(Constants.MessageTypes.WARNING, Constants.MultimediaFileNoExists); } } else //ASSEMBLY { Pixbuf pixbuf = new Pixbuf(null, imagePath); image_test.Pixbuf = pixbuf; } }
EncoderConfigurationWindow() { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "encoder_configuration.glade", "encoder_configuration", "chronojump"); gladeXML.Autoconnect(this); //three encoder types pixbuf = new Pixbuf(null, Util.GetImagePath(false) + Constants.FileNameEncoderTypeLinear); image_encoder_linear.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + Constants.FileNameEncoderTypeRotaryFriction); image_encoder_rotary_friction.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + Constants.FileNameEncoderTypeRotaryAxis); image_encoder_rotary_axis.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + Constants.FileNameEncoderCalculeIM); image_encoder_calcule_im.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_cancel.png"); image_cancel.Pixbuf = pixbuf; //put an icon to window UtilGtk.IconWindow(encoder_configuration); }
public ChronopicRegisterWindow(Gtk.Window app1, List <ChronopicRegisterPort> listAll) { createWindow(app1); UtilGtk.IconWindow(chronopic_register_win); //put an icon to window listConnected = new List <ChronopicRegisterPort>(); //create listConnected with connected chronopics int connectedCount = 0; int unknownCount = 0; foreach (ChronopicRegisterPort crp in listAll) { if (crp.Port != "") { listConnected.Add(crp); connectedCount++; if (crp.Type == ChronopicRegisterPort.Types.UNKNOWN) { unknownCount++; } } } createVBoxMain(); createContent(connectedCount, unknownCount); createButtons(); }
public ConfirmWindow(string text1, string link, string question) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "confirm_window.glade", "confirm_window", null); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(confirm_window); label1.Text = text1; label1.UseMarkup = true; if (link != "") { label_link.Text = link; label_link.UseMarkup = true; } else { label_link.Hide(); } if (question != "") { label_question.Text = question; label_question.UseMarkup = true; } else { label_question.Hide(); } }
public EvaluatorWindow(ServerEvaluator eval) { //Setup (text, table, uniqueID); Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "evaluator_window", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(evaluator_window); fakeButtonAccept = new Gtk.Button(); this.eval = eval; if (eval.UniqueID == -1) { creating = true; } //copy to see if there are changes evalBefore = new ServerEvaluator(eval); createComboContinents(); createComboCountries(); putNonStandardIcons(); entry_cp_other.Sensitive = false; }
public DialogThreshold(Constants.Menuitem_modes m, int thresholdCurrent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_threshold.glade", "dialog_threshold", null); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(dialog_threshold); FakeButtonClose = new Gtk.Button(); this.thresholdCurrent = thresholdCurrent; hscale_threshold.Value = Convert.ToInt32(thresholdCurrent / 10); label_threshold_value.Text = thresholdCurrent.ToString() + " ms"; writeTexts(); if (m == Constants.Menuitem_modes.JUMPSSIMPLE || m == Constants.Menuitem_modes.JUMPSREACTIVE) { label_threshold_name.Text = "<b>" + Catalog.GetString("Threshold for jumps") + "</b>"; notebook.CurrentPage = 0; } else if (m == Constants.Menuitem_modes.RUNSSIMPLE || m == Constants.Menuitem_modes.RUNSINTERVALLIC) { label_threshold_name.Text = "<b>" + Catalog.GetString("Threshold for runs") + "</b>"; notebook.CurrentPage = 1; } else //other { label_threshold_name.Text = "<b>" + Catalog.GetString("Threshold for other tests") + "</b>"; notebook.CurrentPage = 2; } label_threshold_name.UseMarkup = true; }
ChronopicWizardWindow() { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronopic_wizard_win.glade", "chronopic_wizard_win", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(chronopic_wizard_win); }
public GenericWindow() { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "generic_window", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(generic_window); }
EventGraphConfigureWindow() { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "event_graph_configure.glade", "event_graph_configure", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(event_graph_configure); }
public ChronopicRegisterWindow(Gtk.Window app1, List <ChronopicRegisterPort> list) { createWindow(app1); //put an icon to window UtilGtk.IconWindow(chronopic_register_win); createVBoxMain(); createContent(list); createButtons(); chronopic_register_win.ShowAll(); }
JumpTypeAddWindow(Gtk.Window parent, bool simple) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "jump_type_add", "chronojump"); gladeXML.Autoconnect(this); this.parent = parent; fakeButtonAccept = new Gtk.Button(); //put an icon to window UtilGtk.IconWindow(jump_type_add); }
EditReactionTimeWindow(Gtk.Window parent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "edit_event.glade", "edit_event", "chronojump"); gladeXML.Autoconnect(this); this.parent = parent; //put an icon to window UtilGtk.IconWindow(edit_event); eventBigTypeString = Catalog.GetString("reaction time"); }
public Gtk.Button FakeButtonAccept; //to return orderedData public ExecuteAutoWindow(Gtk.Window parent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "execute_auto", null); gladeXML.Autoconnect(this); this.parent = parent; //put an icon to window UtilGtk.IconWindow(execute_auto); FakeButtonAccept = new Gtk.Button(); }
EditMultiChronopicWindow(Gtk.Window parent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "edit_event.glade", "edit_event", "chronojump"); gladeXML.Autoconnect(this); this.parent = parent; //put an icon to window UtilGtk.IconWindow(edit_event); eventBigTypeString = Catalog.GetString("multi chronopic"); headerShowDecimal = false; }
public ErrorWindow(string text1) { LogB.Information("At error window2"); Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "error_window.glade", "error_window", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(error_window); label1.Text = text1; label1.UseMarkup = true; }
public ChronopicWindow(Chronopic cpDetected, ArrayList myCpd) { LogB.Debug("constructor"); Glade.XML gxml; gxml = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "chronopic_window", "chronojump"); gxml.Autoconnect(this); cpd = myCpd; if (cpDetected != null) { cp = cpDetected; sp = new SerialPort(((ChronopicPortData)cpd[0]).Port); } UtilGtk.IconWindow(chronopic_window); if (UtilAll.IsWindows()) { isWindows = true; } else { isWindows = false; } setDefaultValues(); chronopicInit = new ChronopicInit(); //Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "chronopic_128.png"); //chronopic_image.Pixbuf = pixbuf; /* * Pixbuf pixbuf; * pixbuf = new Pixbuf (null, Util.GetImagePath(true) + Constants.FileNameContactPlatformModular); * image_contact_modular.Pixbuf = pixbuf; * pixbuf = new Pixbuf (null, Util.GetImagePath(true) + Constants.FileNameInfrared); * image_infrared.Pixbuf = pixbuf; */ /* * if(chronopicPort1 != Constants.ChronopicDefaultPortWindows && * (chronopicPort1 != Constants.ChronopicDefaultPortLinux && File.Exists(chronopicPort1)) * ) { * ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Do you want to connect to Chronopic now?"), "", ""); * confirmWin.Button_accept.Clicked += new EventHandler(chronopicAtStart); * } */ }
PersonSelectWindow(Gtk.Window parent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "person_select_window", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(person_select_window); FakeButtonAddPerson = new Gtk.Button(); FakeButtonEditPerson = new Gtk.Button(); FakeButtonDeletePerson = new Gtk.Button(); FakeButtonDone = new Gtk.Button(); }
public QueryServerWindow(int newPrefsDigitsNumber, string [] evaluators) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "query_server_window.glade", "query_server_window", "chronojump"); gladeXML.Autoconnect(this); this.pDN = newPrefsDigitsNumber; this.evaluators = evaluators; //put an icon to window UtilGtk.IconWindow(query_server_window); createAllCombos(); }
public About(string version, string translators) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_about.glade", "dialog_about", "chronojump"); gladeXML.Autoconnect(this); /* * //crash for test purposes * string [] myCrash = { * "hello" }; * Console.WriteLine("going to crash now intentionally"); * Console.WriteLine(myCrash[1]); */ //put an icon to window UtilGtk.IconWindow(dialog_about); //put logo image Pixbuf pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + Constants.FileNameLogo); image_logo.Pixbuf = pixbuf; dialog_about_label_version.Text = version; dialog_about_label_translators.Text = translators; //white bg dialog_about.ModifyBg(StateType.Normal, new Gdk.Color(0xff, 0xff, 0xff)); //put authors textLabel(Constants.AuthorsCEO, dialog_about_label_developers_CEO); textLabel(Constants.AuthorsSoftware, dialog_about_label_developers_software); textLabel(Constants.AuthorsChronopic, dialog_about_label_developers_chronopic); textLabel(Constants.AuthorsDevices, dialog_about_label_developers_devices); textLabel(Constants.AuthorsMath, dialog_about_label_developers_math); textLabel(Constants.AuthorsOpenCV, dialog_about_label_developers_opencv); //put documenters separated by commas string docsString = ""; string paragraph = ""; foreach (string doc in Constants.Documenters) { docsString += paragraph; docsString += doc; paragraph = "\n"; } dialog_about_label_documenters.Text = docsString; }
public GenericWindow(string textHeader) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "generic_window.glade", "generic_window", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(generic_window); generic_window.Resizable = false; label_header.Text = textHeader; HideOnAccept = true; DestroyOnAccept = false; }
PreferencesWindow() { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "preferences_win", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(preferences_win); //database and log files stuff databaseURL = Util.GetDatabaseDir() + System.IO.Path.DirectorySeparatorChar + "chronojump.db"; databaseTempURL = Util.GetDatabaseTempDir() + System.IO.Path.DirectorySeparatorChar + "chronojump.db"; FakeButtonImported = new Gtk.Button(); FakeButtonDebugModeStart = new Gtk.Button(); }
private void initialize(string title, Constants.MessageTypes type, string message) { LogB.Information("Dialog message: " + message); Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_message.glade", "dialog_message", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(dialog_message); //with this, user doesn't see a moving/changing creation window //if uncommented, then does weird bug in windows not showing dialog as its correct size until window is moves //dialog_message.Hide(); if (title != "") { dialog_message.Title = title; } label_message.Text = message; label_message.UseMarkup = true; switch (type) { case Constants.MessageTypes.WARNING: image_warning.Show(); image_info.Hide(); image_help.Hide(); break; case Constants.MessageTypes.INFO: image_warning.Hide(); image_info.Show(); image_help.Hide(); break; case Constants.MessageTypes.HELP: image_warning.Hide(); image_info.Hide(); image_help.Show(); break; } label_message.Show(); dialog_message.Show(); }
PersonSelectWindow(Gtk.Window parent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "person_select_window.glade", "person_select_window", "chronojump"); gladeXML.Autoconnect(this); viewport1.HeightRequest = 170 * 3 + 8 * 2 + 4 * 2; //170 is button height, 8 is padding top botton (4+4), 4 the top and bottom of viewport1 //put an icon to window UtilGtk.IconWindow(person_select_window); person_select_window.Parent = parent; FakeButtonAddPerson = new Gtk.Button(); FakeButtonAddPersonMultiple = new Gtk.Button(); FakeButtonLoadPerson = new Gtk.Button(); FakeButtonLoadPersonMultiple = new Gtk.Button(); FakeButtonEditPerson = new Gtk.Button(); FakeButtonPersonShowAllEvents = new Gtk.Button(); FakeButtonDeletePerson = new Gtk.Button(); FakeButtonDone = new Gtk.Button(); Pixbuf pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_person_pin.png"); image_manage_persons.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_person_add.png"); image_person_new.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_group_add.png"); image_persons_new_plus.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_person_outline.png"); image_person_load.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_group_outline.png"); image_persons_open_plus.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_edit.png"); image_person_edit.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_visibility.png"); image_all_persons_events.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "stock_delete.png"); image_person_delete.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_cancel.png"); image_manage_persons_cancel.Pixbuf = pixbuf; pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_close.png"); image_close.Pixbuf = pixbuf; }
public EncoderOverviewWindow(Gtk.Window parent, Constants.EncoderGI encoderGI, int sessionID) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "encoder_overview.glade", "encoder_overview_win", null); gladeXML.Autoconnect(this); encoder_overview_win.Parent = parent; if (encoderGI == Constants.EncoderGI.GRAVITATORY) { encoder_overview_win.Title = Catalog.GetString("Encoder Overview") + " - " + Catalog.GetString("Gravitatory"); } else if (encoderGI == Constants.EncoderGI.INERTIAL) { encoder_overview_win.Title = Catalog.GetString("Encoder Overview") + " - " + Catalog.GetString("Inertial"); } //put an icon to window UtilGtk.IconWindow(encoder_overview_win); createAndFillTreeView(treeview_sets, treeviewType.SETS, encoderGI, SqliteEncoder.SelectSessionOverviewSets(false, encoderGI, sessionID)); createAndFillTreeView(treeview_reps, treeviewType.REPS, encoderGI, SqliteEncoder.SelectSessionOverviewReps(false, encoderGI, sessionID)); /* * createTreeView(treeview_sets, treeviewType.SETS, encoderGI); * TreeStore storeSets = getStore(treeviewType.SETS, encoderGI); * treeview_sets.Model = storeSets; * ArrayList dataSets = SqliteEncoder.SelectSessionOverviewSets(false, encoderGI, sessionID); * * foreach (string [] line in dataSets) * storeSets.AppendValues (line); * * createTreeView(treeview_reps, treeviewType.REPS, encoderGI); * TreeStore storeReps = getStore(treeviewType.REPS, encoderGI); * treeview_reps.Model = storeReps; * ArrayList dataReps = SqliteEncoder.SelectSessionOverviewReps(false, encoderGI, sessionID); * * foreach (string [] line in dataReps) * storeReps.AppendValues (line); */ }
public DialogCalendar(string calendarTitle, DateTime dateInitial) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "chronojump.glade", "dialog_calendar", "chronojump"); gladeXML.Autoconnect(this); signalsActive = false; //put an icon to window UtilGtk.IconWindow(dialog_calendar); dialog_calendar.Title = calendarTitle; calendar1.Date = dateInitial; fakeButtonDateChanged = new Button(); signalsActive = true; }
SessionUploadWindow(Gtk.Window parent) { Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "session_upload.glade", "session_upload", "chronojump"); gladeXML.Autoconnect(this); session_upload.Parent = parent; //put an icon to window UtilGtk.IconWindow(session_upload); createTreeViews( treeview_persons, treeview_jumps, treeview_jumps_rj, treeview_runs, treeview_runs_i, treeview_rts, treeview_pulses, treeview_mcs ); store_persons = new TreeStore(typeof(string), typeof(string), typeof(string), typeof(string)); store_j = new TreeStore(typeof(string), typeof(string), typeof(string)); store_jr = new TreeStore(typeof(string), typeof(string), typeof(string)); store_r = new TreeStore(typeof(string), typeof(string), typeof(string)); store_ri = new TreeStore(typeof(string), typeof(string), typeof(string)); store_rts = new TreeStore(typeof(string), typeof(string), typeof(string)); store_pulses = new TreeStore(typeof(string), typeof(string), typeof(string)); store_mcs = new TreeStore(typeof(string), typeof(string), typeof(string)); treeview_persons.Model = store_persons; treeview_jumps.Model = store_j; treeview_jumps_rj.Model = store_jr; treeview_runs.Model = store_r; treeview_runs_i.Model = store_ri; treeview_rts.Model = store_rts; treeview_pulses.Model = store_pulses; treeview_mcs.Model = store_mcs; label_thanks.Hide(); button_close.Sensitive = false; }
public ConfirmWindowJumpRun(string text1, string question) { //Setup (text, table, uniqueID); Glade.XML gladeXML; gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "confirm_window.glade", "confirm_window", "chronojump"); gladeXML.Autoconnect(this); //put an icon to window UtilGtk.IconWindow(confirm_window); label1.Text = text1; if (question == "") { label_question.Hide(); } else { label_question.Text = question; } }