[chronojump] DB:1.73 Jumps Dj capture graph can show times or heights



commit c15b8ed62e6ca54e6fe89dd5858146825d86b164
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Sep 27 15:49:17 2019 +0200

    DB:1.73 Jumps Dj capture graph can show times or heights

 glade/preferences_win.glade | 203 +++++++++++++++++++++++++++++++-------------
 src/execute/jump.cs         |   8 +-
 src/gui/chronojump.cs       |   2 +-
 src/gui/eventExecute.cs     |  27 ++++--
 src/gui/jump.cs             |   2 +-
 src/gui/preferences.cs      |  16 +++-
 src/gui/usefulObjects.cs    |  13 ++-
 src/preferences.cs          |   1 +
 src/sqlite/main.cs          |  11 ++-
 src/sqlite/preferences.cs   |   8 ++
 10 files changed, 213 insertions(+), 78 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index 6f74e2c1..acab744d 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -597,7 +597,6 @@
                                         <child>
                                           <widget class="GtkHBox" id="hbox_indexes">
                                             <property name="can_focus">False</property>
-                                            <property name="spacing">6</property>
                                             <child>
                                               <widget class="GtkRadioButton" id="radiobutton_show_q_index">
                                                 <property name="label" translatable="yes">QIndex</property>
@@ -611,7 +610,7 @@
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="padding">12</property>
+                                                <property name="padding">20</property>
                                                 <property name="position">0</property>
                                               </packing>
                                             </child>
@@ -639,75 +638,156 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkAlignment" id="alignment5">
+                                          <widget class="GtkVBox" id="vbox41">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="top_padding">6</property>
+                                            <property name="spacing">8</property>
                                             <child>
-                                              <widget class="GtkTable" id="table1">
+                                              <widget class="GtkLabel" id="label120">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="n_rows">2</property>
-                                                <property name="n_columns">3</property>
-                                                <property name="column_spacing">6</property>
-                                                <property name="row_spacing">6</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label3">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">On statistics
-show elevation as:</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="x_options">GTK_FILL</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label21">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Weight 
units:</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="top_attach">1</property>
-                                                    <property name="bottom_attach">2</property>
-                                                    <property name="x_options">GTK_FILL</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Variables to show 
at capture graphs of reactive jumps:</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">True</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkHBox" id="hbox51">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="spacing">10</property>
                                                 <child>
-                                                  <widget class="GtkRadioButton" id="radio_elevation_height">
-                                                    <property name="label" translatable="yes">Height 
(cm)</property>
+                                                  <widget class="GtkRadioButton" 
id="radio_jumps_dj_capture_show_heights">
+                                                    <property name="label" translatable="yes">Heights: fall 
height, jump height</property>
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">False</property>
-                                                    <property name="xalign">0</property>
                                                     <property name="active">True</property>
                                                     <property name="draw_indicator">True</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="left_attach">1</property>
-                                                    <property name="right_attach">2</property>
-                                                    <property name="x_options">GTK_FILL</property>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="padding">20</property>
+                                                    <property name="position">0</property>
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <widget class="GtkRadioButton" id="radio_elevation_tf">
-                                                    <property name="label">TF (s)</property>
+                                                  <widget class="GtkRadioButton" 
id="radio_jumps_dj_capture_show_times">
+                                                    <property name="label" translatable="yes">Times: contact 
time, flight time</property>
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">False</property>
-                                                    <property name="xalign">0</property>
+                                                    <property name="active">True</property>
                                                     <property name="draw_indicator">True</property>
-                                                    <property name="group">radio_elevation_height</property>
+                                                    <property 
name="group">radio_jumps_dj_capture_show_heights</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="left_attach">2</property>
-                                                    <property name="right_attach">3</property>
-                                                    <property name="x_options">GTK_FILL</property>
+                                                    <property name="expand">True</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">1</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">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label3">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">On statistics show 
elevation as:</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">4</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox52">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">10</property>
+                                            <child>
+                                              <widget class="GtkRadioButton" id="radio_elevation_height">
+                                                <property name="label" translatable="yes">Height 
(cm)</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="xalign">0</property>
+                                                <property name="active">True</property>
+                                                <property name="draw_indicator">True</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="padding">20</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkRadioButton" id="radio_elevation_tf">
+                                                <property name="label">TF (s)</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="xalign">0</property>
+                                                <property name="active">True</property>
+                                                <property name="draw_indicator">True</property>
+                                                <property name="group">radio_elevation_height</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">5</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkVBox" id="vbox42">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">8</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label21">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Weight 
units:</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">True</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkHBox" id="hbox53">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="spacing">10</property>
                                                 <child>
                                                   <widget class="GtkRadioButton" id="radio_weight_percent">
                                                     <property name="label">%</property>
@@ -719,11 +799,10 @@ show elevation as:</property>
                                                     <property name="draw_indicator">True</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="left_attach">1</property>
-                                                    <property name="right_attach">2</property>
-                                                    <property name="top_attach">1</property>
-                                                    <property name="bottom_attach">2</property>
-                                                    <property name="x_options">GTK_FILL</property>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="padding">20</property>
+                                                    <property name="position">0</property>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -733,24 +812,28 @@ show elevation as:</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">False</property>
                                                     <property name="xalign">0</property>
+                                                    <property name="active">True</property>
                                                     <property name="draw_indicator">True</property>
                                                     <property name="group">radio_weight_percent</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="left_attach">2</property>
-                                                    <property name="right_attach">3</property>
-                                                    <property name="top_attach">1</property>
-                                                    <property name="bottom_attach">2</property>
-                                                    <property name="x_options">GTK_FILL</property>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="position">1</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">3</property>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">6</property>
                                           </packing>
                                         </child>
                                       </widget>
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index 3962ad0f..9012a4d2 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -49,6 +49,7 @@ public class JumpExecute : EventExecute
 
        private int angle = -1;
        private bool avoidGraph;
+       private bool jumpsDjGraphHeights;
        
        public JumpExecute() {
        }
@@ -58,7 +59,8 @@ public class JumpExecute : EventExecute
                        Chronopic cp, Gtk.Window app, int pDN,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        double progressbarLimit, ExecutingGraphData egd, string description,
-                       bool avoidGraph //on configChronojump.Exhibition do not show graph because it gets 
too slow with big database
+                       bool avoidGraph, //on configChronojump.Exhibition do not show graph because it gets 
too slow with big database
+                       bool jumpsDjGraphHeights
                        )
        {
                this.personID = personID;
@@ -78,6 +80,7 @@ public class JumpExecute : EventExecute
                this.egd = egd;
                this.description = description;
                this.avoidGraph = avoidGraph;
+               this.jumpsDjGraphHeights = jumpsDjGraphHeights;
        
                if(TypeHasFall) {
                        hasFall = true;
@@ -475,7 +478,8 @@ public class JumpExecute : EventExecute
 
                if(! avoidGraph)
                {
-                       PrepareEventGraphJumpSimpleObject = new PrepareEventGraphJumpSimple(tv, tc, 
sessionID, personID, table, type);
+                       PrepareEventGraphJumpSimpleObject = new PrepareEventGraphJumpSimple(
+                                       tv, tc, sessionID, personID, table, type, jumpsDjGraphHeights);
                        needUpdateGraphType = eventType.JUMP;
                        needUpdateGraph = true;
                }
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 28b797b2..0ab5de24 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -4237,7 +4237,7 @@ public partial class ChronoJumpWindow
                                //chronopicWin.CP, event_execute_label_message, app1, 
preferences.digitsNumber, preferences.volumeOn,
                                cp2016.CP, app1, preferences.digitsNumber,
                                preferences.volumeOn, preferences.gstreamer,
-                               progressbarLimit, egd, description, configChronojump.Exhibition);
+                               progressbarLimit, egd, description, configChronojump.Exhibition, 
preferences.jumpsDjGraphHeights);
 
 
                //UtilGtk.ChronopicColors(viewport_chronopics, label_chronopics, label_connected_chronopics, 
chronopicWin.Connected);
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 9f1c7d8d..2c6ed32f 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -1016,6 +1016,7 @@ public partial class ChronoJumpWindow
                int tctfSep = 0; //separation between tc and tf
                int distanceBetweenCols = 
Convert.ToInt32((ancho-event_execute_rightMargin)*(1+.5)/eventGraph.jumpsAtSQL.Length) -
                        
Convert.ToInt32((ancho-event_execute_rightMargin)*(0+.5)/eventGraph.jumpsAtSQL.Length);
+
                if(eventGraph.tc > 0)
                        tctfSep = Convert.ToInt32(.3*distanceBetweenCols);
                int barWidth = Convert.ToInt32(.3*distanceBetweenCols);
@@ -1040,21 +1041,31 @@ public partial class ChronoJumpWindow
                                if(eventGraph.tv >0)
                                        animateBar = false;
 
+                               string valueToPlot = jump[6]; //tc
+                               if(eventGraph.djShowHeights && eventGraph.tc > 0 && eventGraph.tv > 0)
+                                       valueToPlot = jump[7]; //fall
+
                                x = 
Convert.ToInt32((ancho-event_execute_rightMargin)*(count-.5)/eventGraph.jumpsAtSQL.Length)-barDesplLeft;
-                               y = calculatePaintHeight(Convert.ToDouble(jump[6]), alto, maxValue, minValue, 
topMargin, bottomMargin);
+                               y = calculatePaintHeight(Convert.ToDouble(valueToPlot), alto, maxValue, 
minValue, topMargin, bottomMargin);
                                
                                drawBar(x, y, barWidth, alto, pen_rojo, count == eventGraph.jumpsAtSQL.Length,
-                                               jump[11] == "-1", Convert.ToDouble(jump[6]), layout, 
animateBar);
-                       
-                               //tv    
-                               if(eventGraph.tv > 0) {
+                                               jump[11] == "-1", Convert.ToDouble(valueToPlot), layout, 
animateBar);
+
+                               //tv
+                               if(eventGraph.tv > 0)
+                               {
+                                       valueToPlot = jump[5]; //tv
+                                       if(eventGraph.djShowHeights && eventGraph.tc > 0 && eventGraph.tv > 0)
+                                               valueToPlot = Util.GetHeightInCentimeters(jump[5]); //jump 
height
+
                                        x = 
Convert.ToInt32((ancho-event_execute_rightMargin)*(count-.5)/eventGraph.jumpsAtSQL.Length)-barDesplLeft 
+tctfSep;
-                                       y = calculatePaintHeight(Convert.ToDouble(jump[5]), alto, maxValue, 
minValue, topMargin, bottomMargin);
+                                       y = calculatePaintHeight(Convert.ToDouble(valueToPlot), alto, 
maxValue, minValue, topMargin, bottomMargin);
                                        
                                        drawBar(x, y, barWidth, alto, pen_azul_claro, count == 
eventGraph.jumpsAtSQL.Length,
-                                                       jump[11] == "-1", Convert.ToDouble(jump[5]), layout, 
animateBar);
+                                                       jump[11] == "-1", Convert.ToDouble(valueToPlot), 
layout, animateBar);
                                }
-                       } else { //as not tc. Show only height
+
+                       } else { //has not tc. Show only height
                                x = 
Convert.ToInt32((ancho-event_execute_rightMargin)*(count-.5)/eventGraph.jumpsAtSQL.Length)-barDesplLeft 
+tctfSep;
                                y = 
calculatePaintHeight(Convert.ToDouble(Util.GetHeightInCentimeters(jump[5])), 
                                                alto, maxValue, minValue, topMargin, bottomMargin);
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index a8db4c8f..543800df 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -1197,7 +1197,7 @@ public partial class ChronoJumpWindow
                        );
 
                PrepareEventGraphJumpSimple eventGraph = new PrepareEventGraphJumpSimple(
-                               tv, tc, currentSession.UniqueID, currentPerson.UniqueID, Constants.JumpTable, 
currentEventType.Name);
+                               tv, tc, currentSession.UniqueID, currentPerson.UniqueID, Constants.JumpTable, 
currentEventType.Name, preferences.jumpsDjGraphHeights);
                
                if(eventGraph.personMAXAtSQLAllSessions > 0 || eventGraph.jumpsAtSQL.Length > 0)
                        PrepareJumpSimpleGraph(eventGraph, false); //don't animate
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 180f7dc8..7bdd67c6 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -75,6 +75,8 @@ public class PreferencesWindow
        [Widget] Gtk.Box hbox_indexes;
        [Widget] Gtk.RadioButton radiobutton_show_q_index;
        [Widget] Gtk.RadioButton radiobutton_show_dj_index;
+       [Widget] Gtk.RadioButton radio_jumps_dj_capture_show_heights;
+       [Widget] Gtk.RadioButton radio_jumps_dj_capture_show_times;
        [Widget] Gtk.RadioButton radio_elevation_height;
        [Widget] Gtk.RadioButton radio_elevation_tf;
        [Widget] Gtk.RadioButton radio_weight_percent;
@@ -395,7 +397,7 @@ public class PreferencesWindow
                        PreferencesWindowBox.checkbutton_angle.Active = true; 
                else 
                        PreferencesWindowBox.checkbutton_angle.Active = false; 
-               
+
 
                if(preferences.showQIndex || preferences.showDjIndex) { 
                        PreferencesWindowBox.checkbutton_show_tv_tc_index.Active = true; 
@@ -412,6 +414,11 @@ public class PreferencesWindow
                        PreferencesWindowBox.hbox_indexes.Hide();
                }
 
+               if(preferences.jumpsDjGraphHeights)
+                       PreferencesWindowBox.radio_jumps_dj_capture_show_heights.Active = true;
+               else
+                       PreferencesWindowBox.radio_jumps_dj_capture_show_times.Active = true;
+
                if(preferences.askDeletion)
                        PreferencesWindowBox.checkbutton_ask_deletion.Active = true; 
                else 
@@ -1702,7 +1709,12 @@ public class PreferencesWindow
                        preferences.showQIndex = false;
                        preferences.showDjIndex = false; 
                }
-               
+
+               preferences.jumpsDjGraphHeights = preferencesChange(
+                               SqlitePreferences.JumpsDjGraphHeights,
+                               preferences.jumpsDjGraphHeights,
+                               radio_jumps_dj_capture_show_heights.Active);
+
                
                if( preferences.askDeletion != PreferencesWindowBox.checkbutton_ask_deletion.Active ) {
                        SqlitePreferences.Update("askDeletion", 
PreferencesWindowBox.checkbutton_ask_deletion.Active.ToString(), true);
diff --git a/src/gui/usefulObjects.cs b/src/gui/usefulObjects.cs
index b3f7ff6d..d4235bf6 100644
--- a/src/gui/usefulObjects.cs
+++ b/src/gui/usefulObjects.cs
@@ -70,13 +70,15 @@ public class PrepareEventGraphJumpSimple {
        //current data
        public double tv;
        public double tc;
+       public bool djShowHeights; //if djShowHeights and is a dj, graph falling height and jump height
+
                
        private enum jumpVariables { HEIGHT, TVTC, TC }
 
        public PrepareEventGraphJumpSimple() {
        }
 
-       public PrepareEventGraphJumpSimple(double tv, double tc, int sessionID, int personID, string table, 
string type) 
+       public PrepareEventGraphJumpSimple(double tv, double tc, int sessionID, int personID, string table, 
string type, bool djShowHeights)
        {
                Sqlite.Open();
 
@@ -88,8 +90,12 @@ public class PrepareEventGraphJumpSimple {
                if(tv > 0) {
                        if(tc <= 0)
                                sqlSelect = "100*4.9*(TV/2)*(TV/2)";
-                       else
-                               sqlSelect = "TV"; //if tc is higher than tv it will be fixed on 
PrepareJumpSimpleGraph
+                       else {
+                               if(djShowHeights)
+                                       sqlSelect = "100*4.9*(TV/2)*(TV/2)";
+                               else
+                                       sqlSelect = "TV"; //if tc is higher than tv it will be fixed on 
PrepareJumpSimpleGraph
+                       }
                } else
                        sqlSelect = "TC";
                
@@ -104,6 +110,7 @@ public class PrepareEventGraphJumpSimple {
                        
                this.tv = tv;
                this.tc = tc;
+               this.djShowHeights = djShowHeights;
                
                Sqlite.Close();
        }
diff --git a/src/preferences.cs b/src/preferences.cs
index 8266f434..53f28592 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -41,6 +41,7 @@ public class Preferences
        public bool showAngle;
        public bool showQIndex;
        public bool showDjIndex;
+       public bool jumpsDjGraphHeights;
        public bool weightStatsPercent;         //AKA weightPercentPreferred
        public bool heightPreferred;
        public bool metersSecondsPreferred;
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index fb01ed98..76e1313f 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -125,7 +125,7 @@ class Sqlite
        /*
         * Important, change this if there's any update to database
         */
-       static string lastChronojumpDatabaseVersion = "1.72";
+       static string lastChronojumpDatabaseVersion = "1.73";
 
        public Sqlite() {
        }
@@ -2480,6 +2480,14 @@ class Sqlite
 
                                currentVersion = updateVersion("1.72");
                        }
+                       if(currentVersion == "1.72")
+                       {
+                               LogB.SQL("Inserted into preferences: jumpsDjGraphHeights");
+
+                               SqlitePreferences.Insert (SqlitePreferences.JumpsDjGraphHeights, "True");
+
+                               currentVersion = updateVersion("1.73");
+                       }
 
 
                        // --- add more updates here
@@ -2673,6 +2681,7 @@ class Sqlite
                SqliteJson.createTableUploadExhibitionTestTemp ();
 
                //changes [from - to - desc]
+               //1.72 - 1.73 Converted DB to 1.73 Inserted into preferences: jumpsDjGraphHeights
                //1.71 - 1.72 Converted DB to 1.72 Inserted into preferences: forceSensorCaptureWidthSeconds, 
forceSensorCaptureScroll
                //1.70 - 1.71 Converted DB to 1.71 Imported run encoder text files into SQL
                //1.69 - 1.70 Converted DB to 1.70 Created tables: RunEncoder, RunEncoderExercise
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 4970e8e2..7f52d67b 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -27,6 +27,10 @@ using System.Collections; //ArrayList
 
 class SqlitePreferences : Sqlite
 {
+       //contacts
+       public const string JumpsDjGraphHeights = "jumpsDjGraphHeights";
+
+       //encoder
        public const string EncoderExerciseIDGravitatory = "encoderExerciseIDGravitatory";
        public const string EncoderExerciseIDInertial = "encoderExerciseIDInertial";
        public const string EncoderContractionGravitatory = "encoderContractionGravitatory";
@@ -52,6 +56,7 @@ class SqlitePreferences : Sqlite
        public const string EncoderRhythmRepsClusterStr = "encoderRhythmRepsCluster";
        public const string EncoderRhythmRestClustersSecondsStr = "encoderRhythmRestClustersSeconds";
 
+       //forceSensor
        public const string ForceSensorCaptureWidthSeconds = "forceSensorCaptureWidthSeconds";
        public const string ForceSensorCaptureScroll = "forceSensorCaptureScroll";
 
@@ -92,6 +97,7 @@ class SqlitePreferences : Sqlite
                                Insert ("showAngle", "False", dbcmdTr); //for treeviewjumps
                                Insert ("showQIndex", "False", dbcmdTr); //for treeviewJumps
                                Insert ("showDjIndex", "False", dbcmdTr); //for treeviewJumps
+                               Insert (JumpsDjGraphHeights, "True", dbcmdTr);
                                Insert ("simulated", "True", dbcmdTr);
                                Insert ("weightStatsPercent", "False", dbcmdTr);
                                Insert ("askDeletion", "True", dbcmdTr);
@@ -313,6 +319,8 @@ class SqlitePreferences : Sqlite
                                preferences.showQIndex = reader[1].ToString() == "True";
                        else if(reader[0].ToString() == "showDjIndex")
                                preferences.showDjIndex = reader[1].ToString() == "True";
+                       else if(reader[0].ToString() == JumpsDjGraphHeights)
+                               preferences.jumpsDjGraphHeights = reader[1].ToString() == "True";
                        else if(reader[0].ToString() == "weightStatsPercent")
                                preferences.weightStatsPercent = reader[1].ToString() == "True";
                        else if(reader[0].ToString() == "heightPreferred")


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