[chronojump] Exhibition id selection implemented (treeview_persons unsensitive)



commit 97eb13ce5921fc1b6c1c9cba21711316cab2d17a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Feb 25 23:48:15 2019 +0100

    Exhibition id selection implemented (treeview_persons unsensitive)

 glade/app1.glade      | 299 ++++++++++++++++++++++++++++++++++++++++++--------
 src/gui/chronojump.cs |   4 +-
 src/gui/exhibition.cs |  60 ++++++++--
 3 files changed, 311 insertions(+), 52 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 28e553a4..3256726e 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -2645,16 +2645,16 @@ EncoderInertialCapture</property>
                                                             <property name="border_width">4</property>
                                                             <property name="spacing">16</property>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox135">
+                                                            <widget class="GtkVBox" id="vbox137">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox307">
+                                                            <widget class="GtkHBox" id="hbox315">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
-                                                            <widget class="GtkLabel" id="label383">
+                                                            <widget class="GtkLabel" id="label197">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="label">(1)</property>
@@ -2666,10 +2666,10 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkLabel" id="label385">
+                                                            <widget class="GtkLabel" id="label389">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label">Escola</property>
+                                                            <property name="label">Id</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -2678,7 +2678,7 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkSpinButton" 
id="spin_exhibition_school">
+                                                            <widget class="GtkSpinButton" 
id="spin_exhibition_id">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="invisible_char">●</property>
@@ -2686,7 +2686,7 @@ EncoderInertialCapture</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">0 0 299 1 10 
0</property>
+                                                            <property name="adjustment">0 0 199 1 10 
0</property>
                                                             <property name="numeric">True</property>
                                                             </widget>
                                                             <packing>
@@ -2703,29 +2703,29 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox299">
+                                                            <widget class="GtkHBox" id="hbox316">
                                                             <property name="height_request">50</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
                                                             <property name="homogeneous">True</property>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_exhibition_school_left10">
+                                                            <widget class="GtkButton" 
id="button_exhibition_id_left10">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="relief">half</property>
-                                                            <signal name="clicked" 
handler="on_button_exhibition_school_left10_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_id_left10_clicked" swapped="no"/>
                                                             <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox306">
+                                                            <widget class="GtkHBox" id="hbox317">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="homogeneous">True</property>
                                                             <child>
-                                                            <widget class="GtkArrow" id="arrow2">
+                                                            <widget class="GtkArrow" id="arrow13">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">1</property>
@@ -2738,7 +2738,7 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkArrow" id="arrow3">
+                                                            <widget class="GtkArrow" id="arrow14">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
@@ -2760,17 +2760,17 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_exhibition_school_left">
+                                                            <widget class="GtkButton" 
id="button_exhibition_id_left">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="relief">half</property>
-                                                            <signal name="clicked" 
handler="on_button_exhibition_school_left_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_id_left_clicked" swapped="no"/>
                                                             <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
-                                                            <widget class="GtkArrow" id="arrow1">
+                                                            <widget class="GtkArrow" id="arrow15">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="arrow_type">left</property>
@@ -2784,17 +2784,17 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_exhibition_school_right">
+                                                            <widget class="GtkButton" 
id="button_exhibition_id_right">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="relief">half</property>
-                                                            <signal name="clicked" 
handler="on_button_exhibition_school_right_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_id_right_clicked" swapped="no"/>
                                                             <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
-                                                            <widget class="GtkArrow" id="arrow4">
+                                                            <widget class="GtkArrow" id="arrow16">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             </widget>
@@ -2807,22 +2807,22 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_exhibition_school_right10">
+                                                            <widget class="GtkButton" 
id="button_exhibition_id_right10">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="relief">half</property>
-                                                            <signal name="clicked" 
handler="on_button_exhibition_school_right10_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_id_right10_clicked" swapped="no"/>
                                                             <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox309">
+                                                            <widget class="GtkHBox" id="hbox318">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="homogeneous">True</property>
                                                             <child>
-                                                            <widget class="GtkArrow" id="arrow5">
+                                                            <widget class="GtkArrow" id="arrow17">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">1</property>
@@ -2834,7 +2834,7 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkArrow" id="arrow6">
+                                                            <widget class="GtkArrow" id="arrow18">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
@@ -2893,7 +2893,7 @@ EncoderInertialCapture</property>
                                                             <widget class="GtkLabel" id="label386">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label">Grup-classe</property>
+                                                            <property name="label">Grade</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -3093,6 +3093,230 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkVBox" id="vbox135">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox307">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label383">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label">(3)</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="label385">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label">School</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkSpinButton" 
id="spin_exhibition_school">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="invisible_char">●</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">0 0 299 1 10 
0</property>
+                                                            <property name="numeric">True</property>
+                                                            </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="hbox299">
+                                                            <property name="height_request">50</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <property name="homogeneous">True</property>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_exhibition_school_left10">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="can_default">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_school_left10_clicked" swapped="no"/>
+                                                            <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox306">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="homogeneous">True</property>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow2">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">1</property>
+                                                            <property name="arrow_type">left</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow3">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="arrow_type">left</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">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_exhibition_school_left">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="can_default">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_school_left_clicked" swapped="no"/>
+                                                            <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow1">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="arrow_type">left</property>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_exhibition_school_right">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="can_default">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_school_right_clicked" swapped="no"/>
+                                                            <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow4">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_exhibition_school_right10">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="can_default">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_school_right10_clicked" swapped="no"/>
+                                                            <accelerator key="Down" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox309">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="homogeneous">True</property>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow5">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">1</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow6">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</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">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">3</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" id="hbox314">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -3101,7 +3325,7 @@ EncoderInertialCapture</property>
                                                             <widget class="GtkLabel" id="label388">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label">(3)</property>
+                                                            <property name="label">(4)</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -3110,12 +3334,12 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_exhibition_session_load">
+                                                            <widget class="GtkButton" 
id="button_exhibition_select">
                                                             <property name="label">Selecciona</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
-                                                            <signal name="clicked" 
handler="on_button_exhibition_session_load_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_exhibition_select_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -3127,7 +3351,7 @@ EncoderInertialCapture</property>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">2</property>
+                                                            <property name="position">3</property>
                                                             </packing>
                                                             </child>
                                                           </widget>
@@ -3171,17 +3395,6 @@ EncoderInertialCapture</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" id="label_exhibition_4">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label">(4)</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkButton" 
id="button_manage_persons">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
@@ -3203,7 +3416,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>
@@ -3217,7 +3430,7 @@ EncoderInertialCapture</property>
                                                             <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
-                                                            <property name="position">2</property>
+                                                            <property name="position">1</property>
                                                             </packing>
                                                             </child>
                                                             <child>
@@ -3281,7 +3494,7 @@ EncoderInertialCapture</property>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
                                                             <property name="pack_type">end</property>
-                                                            <property name="position">3</property>
+                                                            <property name="position">2</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 509b87a0..1b719735 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -7624,7 +7624,9 @@ LogB.Debug("mc finished 5");
                notebook_results.Sensitive = true;
                notebook_options_top.Sensitive = true;
                notebook_encoder_sup.Sensitive = true;
-               treeview_persons.Sensitive = true;
+
+               if(! configChronojump.Exhibition)
+                       treeview_persons.Sensitive = true;
                
                menuPersonSelectedSensitive(true);
        
diff --git a/src/gui/exhibition.cs b/src/gui/exhibition.cs
index b0a0da6f..3273bd2e 100644
--- a/src/gui/exhibition.cs
+++ b/src/gui/exhibition.cs
@@ -27,8 +27,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Frame frame_exhibition;
        [Widget] Gtk.SpinButton spin_exhibition_school;
        [Widget] Gtk.SpinButton spin_exhibition_group;
-       [Widget] Gtk.Label label_exhibition_4;
-       [Widget] Gtk.Label label_persons; //persons text show the top of manage persons. Hidden on exhibition 
to be more clear (1,2,3,4)
+       [Widget] Gtk.SpinButton spin_exhibition_id;
 
        private void exhibitionGuiAtStart(ExhibitionTest.testTypes exhibitionStationType)
        {
@@ -46,11 +45,10 @@ public partial class ChronoJumpWindow
                frame_exhibition.Visible = true;
                notebook_session_person.CurrentPage = 1;
                frame_persons.Sensitive = true;
+               frame_persons_top.Visible = false;
                spin_exhibition_school.Value = 0; //need to assign an inital value (if not it shows blank 
value)
                spin_exhibition_group.Value = 0;
 
-               label_exhibition_4.Visible = true;
-               label_persons.Visible = false;
                button_persons_up.SetSizeRequest (45,10);
                button_persons_down.SetSizeRequest (45,10);
        }
@@ -125,11 +123,57 @@ public partial class ChronoJumpWindow
 
        //---- end of spin_exhibition_group stuff
 
-       private void on_button_exhibition_session_load_clicked (object o, EventArgs args)
+       //---- spin_exhibition_id stuff
+
+       private void on_button_exhibition_id_left10_clicked (object o, EventArgs args)
+       {
+               exhibitionIdChange(-10);
+       }
+       private void on_button_exhibition_id_left_clicked (object o, EventArgs args)
+       {
+               exhibitionIdChange(-1);
+       }
+       private void on_button_exhibition_id_right10_clicked (object o, EventArgs args)
+       {
+               exhibitionIdChange(+10);
+       }
+       private void on_button_exhibition_id_right_clicked (object o, EventArgs args)
+       {
+               exhibitionIdChange(+1);
+       }
+
+       void exhibitionIdChange(int change)
        {
-               currentSession = SqliteSession.SelectByName(string.Format("{0}-{1}", 
spin_exhibition_school.Value, spin_exhibition_group.Value));
-               on_load_session_accepted();
-               sensitiveGuiYesSession();
+               double newValue = spin_exhibition_id.Value + change;
+
+               double min, max;
+               spin_exhibition_id.GetRange(out min, out max);
+               if(newValue < min)
+                       spin_exhibition_id.Value = min;
+               else if(newValue > max)
+                       spin_exhibition_id.Value = max;
+               else
+                       spin_exhibition_id.Value = newValue;
+       }
+
+       //---- end of spin_exhibition_group stuff
+       private void on_button_exhibition_select_clicked (object o, EventArgs args)
+       {
+               //select session
+               string newSessionName = string.Format("{0}-{1}", spin_exhibition_school.Value, 
spin_exhibition_group.Value);
+               if(currentSession == null || currentSession.Name != newSessionName)
+               {
+                       currentSession = SqliteSession.SelectByName(newSessionName);
+                       on_load_session_accepted();
+                       sensitiveGuiYesSession();
+               }
+
+               //select person
+               int rowToSelect = myTreeViewPersons.FindRow(Convert.ToInt32(spin_exhibition_id.Value));
+               if(rowToSelect != -1) {
+                       selectRowTreeView_persons(treeview_persons, rowToSelect);
+                       sensitiveGuiYesPerson();
+               }
        }
 
        //---- json upload


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