[chronojump] notebook_contacts_execute_or uses an enum



commit a126d4474f3882021803cc4607ccdca03e3d7037
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Oct 19 16:40:19 2021 +0200

    notebook_contacts_execute_or uses an enum

 src/gui/app1/chronojump.cs       | 3 ++-
 src/gui/app1/contactsExercise.cs | 4 ++--
 src/gui/app1/forceSensor.cs      | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 986d6442f..e69b0b734 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -62,7 +62,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.HBox hbox_other;
        [Widget] Gtk.HBox hbox_contacts_capture_top;
        [Widget] Gtk.Notebook notebook_capture_analyze; //not encoder
-       [Widget] Gtk.Notebook notebook_contacts_execute_or; // execute (page 0), instructions (page 1), 
forceSensorAdjust (page 2)
+       [Widget] Gtk.Notebook notebook_contacts_execute_or;
        [Widget] Gtk.Notebook notebook_analyze; //not encoder
        [Widget] Gtk.VBox vbox_contacts_capture_graph;
        [Widget] Gtk.HBox hbox_message_permissions_at_boot;
@@ -492,6 +492,7 @@ public partial class ChronoJumpWindow
        private string progName;
        private enum notebook_start_pages { PROGRAM, SENDLOG, EXITCONFIRM, SOCIALNETWORKPOLL }
        private enum notebook_sup_pages { START, CONTACTS, ENCODER, SESSION, NETWORKSPROBLEMS, HELP, NEWS }
+       private enum notebook_contacts_execute_or_pages { EXECUTE, INSTRUCTIONS, FORCESENSORADJUST }
        private enum notebook_analyze_pages { STATISTICS, JUMPSPROFILE, JUMPSDJOPTIMALFALL, 
JUMPSWEIGHTFVPROFILE, JUMPSEVOLUTION, JUMPSRJFATIGUE,
                RUNSEVOLUTION, SPRINT, FORCESENSOR, RACEENCODER }
 
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index 989062cec..b2715968f 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -46,7 +46,7 @@ public partial class ChronoJumpWindow
                hbox_top_person.Sensitive = false;
 
                button_contacts_exercise_close_and_capture.Sensitive = myTreeViewPersons.IsThereAnyRecord();
-               notebook_contacts_execute_or.CurrentPage = 1;
+               notebook_contacts_execute_or.CurrentPage = 
Convert.ToInt32(notebook_contacts_execute_or_pages.INSTRUCTIONS);
        }
        private void on_button_contacts_exercise_close_clicked (object o, EventArgs args)
        {
@@ -59,7 +59,7 @@ public partial class ChronoJumpWindow
                hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = true;
                hbox_top_person.Sensitive = true;
 
-               notebook_contacts_execute_or.CurrentPage = 0;
+               notebook_contacts_execute_or.CurrentPage = 
Convert.ToInt32(notebook_contacts_execute_or_pages.EXECUTE);
        }
        private void on_button_contacts_exercise_close_and_capture_clicked (object o, EventArgs args)
        {
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 3f2a5b7c2..0c2c69644 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -2919,7 +2919,7 @@ LogB.Information(" fs R ");
                alignment_button_force_sensor_adjust.Sensitive = false; //to not be called again
 
                notebook_contacts_capture_doing_wait.Sensitive = false;
-               notebook_contacts_execute_or.CurrentPage = 2;
+               notebook_contacts_execute_or.CurrentPage = 
Convert.ToInt32(notebook_contacts_execute_or_pages.FORCESENSORADJUST);
 
                viewport_chronopics.Sensitive = false;
                frame_contacts_exercise.Sensitive = false;
@@ -2932,7 +2932,7 @@ LogB.Information(" fs R ");
                alignment_button_force_sensor_adjust.Sensitive = true;
 
                notebook_contacts_capture_doing_wait.Sensitive = true;
-               notebook_contacts_execute_or.CurrentPage = 0;
+               notebook_contacts_execute_or.CurrentPage = 
Convert.ToInt32(notebook_contacts_execute_or_pages.EXECUTE);
 
                viewport_chronopics.Sensitive = true;
                frame_contacts_exercise.Sensitive = true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]