[chronojump] Contacts exercise gui shows options on jumps
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Contacts exercise gui shows options on jumps
- Date: Tue, 10 Dec 2019 16:10:34 +0000 (UTC)
commit 10dd2c789b9fc5829f9f1dd44ce0cf4f29035943
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Dec 10 17:10:03 2019 +0100
Contacts exercise gui shows options on jumps
glade/app1.glade | 393 ++++++++++++++++++++-------------------
po/POTFILES.in | 3 +-
src/Makefile.am | 3 +-
src/gui/{ => app1}/chronojump.cs | 177 +-----------------
src/gui/app1/contactsExercise.cs | 234 +++++++++++++++++++++++
src/gui/jump.cs | 7 +
6 files changed, 457 insertions(+), 360 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index fed41611..f365396a 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -11441,6 +11441,20 @@ EncoderInertialCapture</property>
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton"
id="extra_window_jumps_check_dj_arms">
+ <property name="label" translatable="yes">Using
arms</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="clicked"
handler="on_extra_window_jumps_check_dj_arms_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -12680,190 +12694,6 @@ EncoderInertialCapture</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
<child>
- <widget class="GtkHBox"
id="extra_window_jumps_hbox_fall">
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkCheckButton"
id="extra_window_jumps_check_dj_fall_calculate">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property
name="receives_default">False</property>
- <property name="image_position">bottom</property>
- <property name="active">True</property>
- <property name="draw_indicator">False</property>
- <signal name="toggled"
handler="on_extra_window_jumps_check_dj_fall_calculate_toggled" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox23">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkImage"
id="extra_windows_jumps_image_dj_fall_calculate">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip"
translatable="yes">Calculate falling height using a previous jump</property>
- <property
name="stock">gtk-missing-image</property>
- <property name="icon-size">2</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkImage"
id="extra_windows_jumps_image_dj_fall_predefined">
- <property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">Fall
from a predefined height</property>
- <property
name="stock">gtk-missing-image</property>
- <property name="icon-size">2</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox300">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkLabel" id="label95">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">[</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="extra_window_jumps_label_dj_start_inside">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip"
translatable="yes">Calculate falling height using a previous jump</property>
- <property name="label" translatable="yes">Start
inside</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="extra_window_jumps_label_dj_start_outside">
- <property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">Fall
from a predefined height</property>
- <property name="label" translatable="yes">Start
outside</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label187">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">]</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">20</property>
- <child>
- <widget class="GtkHBox"
id="hbox_extra_window_jumps_fall_height">
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label99">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Falling height</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="extra_window_jumps_spinbutton_fall">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property
name="invisible_char_set">True</property>
- <property
name="primary_icon_activatable">False</property>
- <property
name="secondary_icon_activatable">False</property>
- <property
name="primary_icon_sensitive">True</property>
- <property
name="secondary_icon_sensitive">True</property>
- <property name="adjustment">20 0 200 1 10
0</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="extra_window_jumps_label_cm">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">cm</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox" id="hbox171">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -12968,7 +12798,7 @@ EncoderInertialCapture</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -13240,7 +13070,7 @@ EncoderInertialCapture</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -13251,12 +13081,183 @@ EncoderInertialCapture</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton"
id="extra_window_jumps_check_dj_arms">
- <property name="label" translatable="yes">Using
arms</property>
+ <widget class="GtkHBox"
id="extra_window_jumps_hbox_fall">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkCheckButton"
id="extra_window_jumps_check_dj_fall_calculate">
+ <property name="visible">True</property>
<property name="can_focus">True</property>
<property
name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <signal name="clicked"
handler="on_extra_window_jumps_check_dj_arms_clicked" swapped="no"/>
+ <property name="image_position">bottom</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <signal name="toggled"
handler="on_extra_window_jumps_check_dj_fall_calculate_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox23">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="extra_windows_jumps_image_dj_fall_calculate">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip"
translatable="yes">Calculate falling height using a previous jump</property>
+ <property
name="stock">gtk-missing-image</property>
+ <property name="icon-size">2</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage"
id="extra_windows_jumps_image_dj_fall_predefined">
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">Fall
from a predefined height</property>
+ <property
name="stock">gtk-missing-image</property>
+ <property name="icon-size">2</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox300">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label95">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">[</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="extra_window_jumps_label_dj_start_inside">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip"
translatable="yes">Calculate falling height using a previous jump</property>
+ <property name="label" translatable="yes">Start
inside</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="extra_window_jumps_label_dj_start_outside">
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">Fall
from a predefined height</property>
+ <property name="label" translatable="yes">Start
outside</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label187">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">]</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">20</property>
+ <child>
+ <widget class="GtkHBox"
id="hbox_extra_window_jumps_fall_height">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label99">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Falling height</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="extra_window_jumps_spinbutton_fall">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property
name="invisible_char_set">True</property>
+ <property
name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property
name="primary_icon_sensitive">True</property>
+ <property
name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">20 0 200 1 10
0</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ <signal name="value_changed"
handler="on_contacts_exercise_value_changed" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="extra_window_jumps_label_cm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">cm</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -22128,6 +22129,12 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -31490,6 +31497,12 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a04af51e..e15e1774 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -57,7 +57,8 @@ src/execute/reactionTime.cs
src/execute/run.cs
src/exportSession.cs
src/forceSensor.cs
-src/gui/chronojump.cs
+src/gui/app1/chronojump.cs
+src/gui/app1/contactsExercise.cs
src/gui/chronopic.cs
src/gui/chronopicRegister.cs
src/gui/convertWeight.cs
diff --git a/src/Makefile.am b/src/Makefile.am
index a613ef72..b8022640 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,8 @@ TARGET = exe
LINK = $(REF_DEP_CHRONOJUMP)
SOURCES = \
- gui/chronojump.cs\
+ gui/app1/chronojump.cs\
+ gui/app1/contactsExercise.cs\
gui/chronojumpIcons.cs\
gui/chronojumpImporter.cs\
gui/chronojumpPersons.cs\
diff --git a/src/gui/chronojump.cs b/src/gui/app1/chronojump.cs
similarity index 96%
rename from src/gui/chronojump.cs
rename to src/gui/app1/chronojump.cs
index de3e9bd3..abdcb98f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -142,7 +142,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.HBox hbox_combo_select_runs_interval;
//auto mode
- [Widget] Gtk.Box hbox_jump_types_options;
+ //[Widget] Gtk.Box hbox_jump_types_options;
[Widget] Gtk.Box hbox_jump_auto_controls;
[Widget] Gtk.Image image_auto_person_skip;
[Widget] Gtk.Image image_auto_person_remove;
@@ -164,7 +164,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Box hbox_combo_pulses;
[Widget] Gtk.VBox vbox_jumps;
- [Widget] Gtk.Box hbox_jumps_test;
+ //[Widget] Gtk.Box hbox_jumps_test;
[Widget] Gtk.Box hbox_jumps_rj;
[Widget] Gtk.VBox vbox_runs;
[Widget] Gtk.HBox hbox_runs_interval_all; //normal and compujump
@@ -510,69 +510,6 @@ public partial class ChronoJumpWindow
//createMainWindow("");
}
- private void on_button_contacts_exercise_clicked (object o, EventArgs args)
- {
- notebook_contacts_capture_doing_wait.Sensitive = false;
- vbox_contacts_device_and_camera.Sensitive = false;
- notebook_session_person.Sensitive = false;
- main_menu.Sensitive = false;
- button_contacts_exercise.Sensitive = false;
- hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = false;
- hbox_top_person.Sensitive = false;
-
- button_contacts_exercise_close_and_capture.Sensitive = myTreeViewPersons.IsThereAnyRecord();
- notebook_contacts_execute_or_instructions.CurrentPage = 1;
- }
- private void on_button_contacts_exercise_close_clicked (object o, EventArgs args)
- {
- notebook_contacts_capture_doing_wait.Sensitive = true;
- vbox_contacts_device_and_camera.Sensitive = true;
- notebook_session_person.Sensitive = true;
- main_menu.Sensitive = true;
- button_contacts_exercise.Sensitive = true;
- hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = true;
- hbox_top_person.Sensitive = true;
-
- notebook_contacts_execute_or_instructions.CurrentPage = 0;
- }
- private void on_button_contacts_exercise_close_and_capture_clicked (object o, EventArgs args)
- {
- on_button_contacts_exercise_close_clicked (o, args);
- on_button_execute_test_clicked(o, args);
- }
-
- private void on_button_image_test_zoom_clicked(object o, EventArgs args)
- {
- EventType myType;
- if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSSIMPLE)
- myType = currentJumpType;
- else if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSREACTIVE)
- myType = currentJumpRjType;
- else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSSIMPLE)
- myType = currentRunType;
- else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSINTERVALLIC)
- myType = currentRunIntervalType;
- //else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSENCODER)
- // myType = currentRunIntervalType;
- //else if(current_menuitem_mode == Constants.Menuitem_modes.FORCESENSOR
- // myType = currentForceType;
- else if(current_menuitem_mode == Constants.Menuitem_modes.RT)
- myType = currentReactionTimeType;
- else //if(current_menuitem_mode == Constants.Menuitem_modes.OTHER
- {
- if(radio_mode_multi_chronopic_small.Active)
- myType = currentMultiChronopicType;
- else //if(radio_mode_pulses_small.Active)
- myType = currentPulseType;
- }
-
- if(myType.Name == "DJa" && extra_window_jumps_check_dj_fall_calculate.Active)
- new DialogImageTest("", Util.GetImagePath(false) + "jump_dj_a_inside.png",
DialogImageTest.ArchiveType.ASSEMBLY);
- else if(myType.Name == "DJna" && extra_window_jumps_check_dj_fall_calculate.Active)
- new DialogImageTest("", Util.GetImagePath(false) + "jump_dj_inside.png",
DialogImageTest.ArchiveType.ASSEMBLY);
- else
- new DialogImageTest(myType);
- }
bool app1Shown = false;
bool needToShowChronopicRegisterWindow;
@@ -3475,6 +3412,9 @@ public partial class ChronoJumpWindow
chronopicRegisterUpdate(false);
chronojumpWindowTestsNext();
+
+ setLabelContactsExerciseSelectedOptions();
+
}
private void showHideCaptureSpecificControls(Constants.Menuitem_modes m)
@@ -3502,29 +3442,6 @@ public partial class ChronoJumpWindow
image_encoder_selected_type.Pixbuf = pixbuf;
}
- private void setLabelContactsExerciseSelected(Constants.Menuitem_modes m)
- {
- string name = "";
- if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
- name = UtilGtk.ComboGetActive(combo_select_jumps);
- else if(m == Constants.Menuitem_modes.JUMPSREACTIVE)
- name = UtilGtk.ComboGetActive(combo_select_jumps_rj);
- else if(m == Constants.Menuitem_modes.RUNSSIMPLE)
- name = UtilGtk.ComboGetActive(combo_select_runs);
- else if(m == Constants.Menuitem_modes.RUNSINTERVALLIC)
- name = UtilGtk.ComboGetActive(combo_select_runs_interval);
- else if(m == Constants.Menuitem_modes.FORCESENSOR)
- name = UtilGtk.ComboGetActive(combo_force_sensor_exercise);
- else if(m == Constants.Menuitem_modes.RUNSENCODER)
- name = UtilGtk.ComboGetActive(combo_run_encoder_exercise);
-
- label_contacts_exercise_selected_name.Text = name;
- }
- private void setLabelContactsExerciseSelected(string name)
- {
- label_contacts_exercise_selected_name.Text = name;
- }
-
/*
ChronopicDetect cpDetect;
private void autoDetectChronopic(Constants.Menuitem_modes m)
@@ -3634,82 +3551,6 @@ public partial class ChronoJumpWindow
*/
- private void on_menuitem_mode_activate(object o, EventArgs args)
- {
- Gtk.ImageMenuItem imi = o as Gtk.ImageMenuItem;
- if (o == null)
- return;
-
- if(o == menuitem_mode_jumps_simple)
- {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.JUMPSSIMPLE);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_simple.png");
- } else if(o == menuitem_mode_jumps_reactive) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.JUMPSREACTIVE);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_reactive.png");
- } else if(o == menuitem_mode_runs_simple) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSSIMPLE);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_simple.png");
- } else if(o == menuitem_mode_runs_intervallic) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSINTERVALLIC);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_multiple.png");
- } else if(o == menuitem_mode_race_encoder) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSENCODER);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"race_encoder_icon.png");
- } else if(o == menuitem_mode_power_gravitatory) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERGRAVITATORY);
- image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_weight.png");
- } else if(o == menuitem_mode_power_inertial) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERINERTIAL);
- image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_inertia.png");
- } else if(o == menuitem_mode_force_sensor) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.FORCESENSOR);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"force_sensor_icon.png");
- } else if(o == menuitem_mode_reaction_time) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RT);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"reaction_time_icon.png");
- } else if(o == menuitem_mode_other) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.OTHER);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"other_icon.png");
- }
-
- changeMenuitemModeWidgets(image_menuitem_mode_jumps_simple, o == menuitem_mode_jumps_simple,
- "image_jump_simple.png", "image_jump_simple_yellow.png", (Label)
menuitem_mode_jumps_simple.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_jumps_reactive, o ==
menuitem_mode_jumps_reactive,
- "image_jump_reactive.png", "image_jump_reactive_yellow.png", (Label)
menuitem_mode_jumps_reactive.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_runs_simple, o == menuitem_mode_runs_simple,
- "image_run_simple.png", "image_run_simple_yellow.png", (Label)
menuitem_mode_runs_simple.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_runs_intervallic, o ==
menuitem_mode_runs_intervallic,
- "image_run_multiple.png", "image_run_multiple_yellow.png", (Label)
menuitem_mode_runs_intervallic.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_race_encoder, o == menuitem_mode_race_encoder,
- "race_encoder_icon.png", "race_encoder_icon_yellow.png", (Label)
menuitem_mode_race_encoder.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_power_gravitatory, o ==
menuitem_mode_power_gravitatory,
- "image_weight.png", "image_weight_yellow.png", (Label)
menuitem_mode_power_gravitatory.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_power_inertial, o ==
menuitem_mode_power_inertial,
- "image_inertia.png", "image_inertia_yellow.png", (Label)
menuitem_mode_power_inertial.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_force_sensor, o == menuitem_mode_force_sensor,
- "force_sensor_icon.png", "force_sensor_icon_yellow.png", (Label)
menuitem_mode_force_sensor.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_reaction_time, o == menuitem_mode_reaction_time,
- "reaction_time_icon.png", "reaction_time_icon_yellow.png", (Label)
menuitem_mode_reaction_time.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_other, o == menuitem_mode_other,
- "other_icon.png", "other_icon_yellow.png", (Label) menuitem_mode_other.Child);
- }
-
- private void changeMenuitemModeWidgets(Gtk.Image image, bool active, string pathImageInactive, string
pathImageActive, Gtk.Label label)
- {
- Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + pathImageInactive);
- if(active)
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + pathImageActive);
-
- image.Pixbuf = pixbuf;
-
- if(active)
- {
- label.Text = Util.AddBoldMarks(label.Text);
- label.UseMarkup = true;
- } else
- label.Text = Util.RemoveBoldMarks(label.Text);
- }
private void on_button_selector_start_jumps_clicked(object o, EventArgs args)
{
@@ -7513,8 +7354,8 @@ LogB.Debug("mc finished 5");
encoderButtonsSensitive(encoderSensEnum.PROCESSINGR);
//hbox
- hbox_jumps_test.Sensitive = false;
- hbox_jump_types_options.Sensitive = false;
+ //hbox_jumps_test.Sensitive = false;
+ //hbox_jump_types_options.Sensitive = false;
hbox_jumps_rj.Sensitive = false;
vbox_runs.Sensitive = false;
@@ -7583,8 +7424,8 @@ LogB.Debug("mc finished 5");
encoderButtonsSensitive(encoderSensEnum.DONENOSIGNAL);
//hbox
- hbox_jumps_test.Sensitive = true;
- hbox_jump_types_options.Sensitive = true;
+ //hbox_jumps_test.Sensitive = true;
+ //hbox_jump_types_options.Sensitive = true;
hbox_jumps_rj.Sensitive = true;
vbox_runs.Sensitive = true;
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
new file mode 100644
index 00000000..3f6c3a66
--- /dev/null
+++ b/src/gui/app1/contactsExercise.cs
@@ -0,0 +1,234 @@
+/*
+ * This file is part of ChronoJump
+ *
+ * Chronojump is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Chronojump is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Copyright (C) 2004-2019 Xavier de Blas <xaviblas gmail com>
+ */
+
+
+using System;
+using Gtk;
+using Gdk;
+using Mono.Unix;
+
+public partial class ChronoJumpWindow
+{
+ private void on_button_contacts_exercise_clicked (object o, EventArgs args)
+ {
+ notebook_contacts_capture_doing_wait.Sensitive = false;
+ vbox_contacts_device_and_camera.Sensitive = false;
+ notebook_session_person.Sensitive = false;
+ main_menu.Sensitive = false;
+ button_contacts_exercise.Sensitive = false;
+ hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = false;
+ hbox_top_person.Sensitive = false;
+
+ button_contacts_exercise_close_and_capture.Sensitive = myTreeViewPersons.IsThereAnyRecord();
+ notebook_contacts_execute_or_instructions.CurrentPage = 1;
+ }
+ private void on_button_contacts_exercise_close_clicked (object o, EventArgs args)
+ {
+ notebook_contacts_capture_doing_wait.Sensitive = true;
+ vbox_contacts_device_and_camera.Sensitive = true;
+ notebook_session_person.Sensitive = true;
+ main_menu.Sensitive = true;
+ button_contacts_exercise.Sensitive = true;
+ hbox_contacts_sup_capture_analyze_two_buttons.Sensitive = true;
+ hbox_top_person.Sensitive = true;
+
+ notebook_contacts_execute_or_instructions.CurrentPage = 0;
+ }
+ private void on_button_contacts_exercise_close_and_capture_clicked (object o, EventArgs args)
+ {
+ on_button_contacts_exercise_close_clicked (o, args);
+ on_button_execute_test_clicked(o, args);
+ }
+
+ private void on_button_image_test_zoom_clicked(object o, EventArgs args)
+ {
+ EventType myType;
+ if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSSIMPLE)
+ myType = currentJumpType;
+ else if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSREACTIVE)
+ myType = currentJumpRjType;
+ else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSSIMPLE)
+ myType = currentRunType;
+ else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSINTERVALLIC)
+ myType = currentRunIntervalType;
+ //else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSENCODER)
+ // myType = currentRunIntervalType;
+ //else if(current_menuitem_mode == Constants.Menuitem_modes.FORCESENSOR
+ // myType = currentForceType;
+ else if(current_menuitem_mode == Constants.Menuitem_modes.RT)
+ myType = currentReactionTimeType;
+ else //if(current_menuitem_mode == Constants.Menuitem_modes.OTHER
+ {
+ if(radio_mode_multi_chronopic_small.Active)
+ myType = currentMultiChronopicType;
+ else //if(radio_mode_pulses_small.Active)
+ myType = currentPulseType;
+ }
+
+ if(myType.Name == "DJa" && extra_window_jumps_check_dj_fall_calculate.Active)
+ new DialogImageTest("", Util.GetImagePath(false) + "jump_dj_a_inside.png",
DialogImageTest.ArchiveType.ASSEMBLY);
+ else if(myType.Name == "DJna" && extra_window_jumps_check_dj_fall_calculate.Active)
+ new DialogImageTest("", Util.GetImagePath(false) + "jump_dj_inside.png",
DialogImageTest.ArchiveType.ASSEMBLY);
+ else
+ new DialogImageTest(myType);
+ }
+
+ private void setLabelContactsExerciseSelected(Constants.Menuitem_modes m)
+ {
+ string name = "";
+ if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
+ name = UtilGtk.ComboGetActive(combo_select_jumps);
+ else if(m == Constants.Menuitem_modes.JUMPSREACTIVE)
+ name = UtilGtk.ComboGetActive(combo_select_jumps_rj);
+ else if(m == Constants.Menuitem_modes.RUNSSIMPLE)
+ name = UtilGtk.ComboGetActive(combo_select_runs);
+ else if(m == Constants.Menuitem_modes.RUNSINTERVALLIC)
+ name = UtilGtk.ComboGetActive(combo_select_runs_interval);
+ else if(m == Constants.Menuitem_modes.FORCESENSOR)
+ name = UtilGtk.ComboGetActive(combo_force_sensor_exercise);
+ else if(m == Constants.Menuitem_modes.RUNSENCODER)
+ name = UtilGtk.ComboGetActive(combo_run_encoder_exercise);
+
+ label_contacts_exercise_selected_name.Text = name;
+ }
+ private void setLabelContactsExerciseSelected(string name)
+ {
+ label_contacts_exercise_selected_name.Text = name;
+ }
+
+ private void on_contacts_exercise_value_changed (object o, EventArgs args)
+ {
+ setLabelContactsExerciseSelectedOptions();
+ }
+
+ private void setLabelContactsExerciseSelectedOptions()
+ {
+ LogB.Information("TT0");
+ LogB.Information(current_menuitem_mode.ToString());
+ if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSSIMPLE)
+ setLabelContactsExerciseSelectedOptionsJumpsSimple();
+ }
+
+ private void setLabelContactsExerciseSelectedOptionsJumpsSimple()
+ {
+ LogB.Information("TT1");
+ if(currentEventType == null)
+ return;
+
+ LogB.Information("TT2");
+ string name = "";
+ string sep = "";
+
+ if(((JumpType) currentEventType).HasFall)
+ {
+ if(! extra_window_jumps_check_dj_fall_calculate.Active)
+ {
+ name += extra_window_jumps_spinbutton_fall.Value.ToString() + " cm";
+ sep = "; ";
+ }
+ } if(((JumpType) currentEventType).HasWeight)
+ {
+ if(extra_window_jumps_radiobutton_weight.Active)
+ name += sep + label_extra_window_jumps_radiobutton_weight_percent_as_kg.Text;
+ else
+ name += sep + extra_window_jumps_spinbutton_weight.Value.ToString() + " kg";
+ }
+
+ label_contacts_exercise_selected_options.Text = name;
+ }
+
+ private void on_menuitem_mode_activate(object o, EventArgs args)
+ {
+ Gtk.ImageMenuItem imi = o as Gtk.ImageMenuItem;
+ if (o == null)
+ return;
+
+ if(o == menuitem_mode_jumps_simple)
+ {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.JUMPSSIMPLE);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_simple.png");
+ } else if(o == menuitem_mode_jumps_reactive) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.JUMPSREACTIVE);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_reactive.png");
+ } else if(o == menuitem_mode_runs_simple) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSSIMPLE);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_simple.png");
+ } else if(o == menuitem_mode_runs_intervallic) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSINTERVALLIC);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_multiple.png");
+ } else if(o == menuitem_mode_race_encoder) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSENCODER);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"race_encoder_icon.png");
+ } else if(o == menuitem_mode_power_gravitatory) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERGRAVITATORY);
+ image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_weight.png");
+ } else if(o == menuitem_mode_power_inertial) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERINERTIAL);
+ image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_inertia.png");
+ } else if(o == menuitem_mode_force_sensor) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.FORCESENSOR);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"force_sensor_icon.png");
+ } else if(o == menuitem_mode_reaction_time) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.RT);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"reaction_time_icon.png");
+ } else if(o == menuitem_mode_other) {
+ select_menuitem_mode_toggled(Constants.Menuitem_modes.OTHER);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"other_icon.png");
+ }
+
+ changeMenuitemModeWidgets(image_menuitem_mode_jumps_simple, o == menuitem_mode_jumps_simple,
+ "image_jump_simple.png", "image_jump_simple_yellow.png", (Label)
menuitem_mode_jumps_simple.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_jumps_reactive, o ==
menuitem_mode_jumps_reactive,
+ "image_jump_reactive.png", "image_jump_reactive_yellow.png", (Label)
menuitem_mode_jumps_reactive.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_runs_simple, o == menuitem_mode_runs_simple,
+ "image_run_simple.png", "image_run_simple_yellow.png", (Label)
menuitem_mode_runs_simple.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_runs_intervallic, o ==
menuitem_mode_runs_intervallic,
+ "image_run_multiple.png", "image_run_multiple_yellow.png", (Label)
menuitem_mode_runs_intervallic.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_race_encoder, o == menuitem_mode_race_encoder,
+ "race_encoder_icon.png", "race_encoder_icon_yellow.png", (Label)
menuitem_mode_race_encoder.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_power_gravitatory, o ==
menuitem_mode_power_gravitatory,
+ "image_weight.png", "image_weight_yellow.png", (Label)
menuitem_mode_power_gravitatory.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_power_inertial, o ==
menuitem_mode_power_inertial,
+ "image_inertia.png", "image_inertia_yellow.png", (Label)
menuitem_mode_power_inertial.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_force_sensor, o == menuitem_mode_force_sensor,
+ "force_sensor_icon.png", "force_sensor_icon_yellow.png", (Label)
menuitem_mode_force_sensor.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_reaction_time, o == menuitem_mode_reaction_time,
+ "reaction_time_icon.png", "reaction_time_icon_yellow.png", (Label)
menuitem_mode_reaction_time.Child);
+ changeMenuitemModeWidgets(image_menuitem_mode_other, o == menuitem_mode_other,
+ "other_icon.png", "other_icon_yellow.png", (Label) menuitem_mode_other.Child);
+ }
+
+ private void changeMenuitemModeWidgets(Gtk.Image image, bool active, string pathImageInactive, string
pathImageActive, Gtk.Label label)
+ {
+ Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + pathImageInactive);
+ if(active)
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + pathImageActive);
+
+ image.Pixbuf = pixbuf;
+
+ if(active)
+ {
+ label.Text = Util.AddBoldMarks(label.Text);
+ label.UseMarkup = true;
+ } else
+ label.Text = Util.RemoveBoldMarks(label.Text);
+ }
+
+}
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index c17e634e..92bb8352 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -1076,6 +1076,8 @@ public partial class ChronoJumpWindow
else
changeTestImage("","", "jump_dj.png");
}
+
+ setLabelContactsExerciseSelectedOptionsJumpsSimple();
}
private void on_extra_window_jumps_test_changed(object o, EventArgs args)
@@ -1172,6 +1174,8 @@ public partial class ChronoJumpWindow
if(! configChronojump.Exhibition)
updateGraphJumpsSimple();
+
+ setLabelContactsExerciseSelectedOptionsJumpsSimple();
}
private void updateGraphJumpsSimple ()
{
@@ -1387,6 +1391,8 @@ public partial class ChronoJumpWindow
update_label_extra_window_jumps_radiobutton_weight_percent_as_kg(true);
label_extra_window_jumps_radiobutton_weight_percent_as_kg.Visible = true;
+
+ setLabelContactsExerciseSelectedOptionsJumpsSimple();
}
private void on_extra_window_jumps_rj_radiobutton_kg_toggled (object o, EventArgs args)
@@ -1406,6 +1412,7 @@ public partial class ChronoJumpWindow
private void on_extra_window_jumps_spinbutton_weight_value_changed (object o, EventArgs args)
{
update_label_extra_window_jumps_radiobutton_weight_percent_as_kg(true);
+ setLabelContactsExerciseSelectedOptionsJumpsSimple();
}
private void update_label_extra_window_jumps_radiobutton_weight_percent_as_kg(bool show)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]