[chronojump] Reaction time discriminative has automatic description



commit 2e3178307488942bf7faa6398f588ba1a1abdc5f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon May 16 02:05:03 2016 +0200

    Reaction time discriminative has automatic description

 src/execute/reactionTime.cs |    5 +++--
 src/gui/chronojump.cs       |   23 ++++++++++++++++++++++-
 2 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/src/execute/reactionTime.cs b/src/execute/reactionTime.cs
index f609900..31e3f92 100644
--- a/src/execute/reactionTime.cs
+++ b/src/execute/reactionTime.cs
@@ -42,7 +42,7 @@ public class ReactionTimeExecute : EventExecute
        //reactionTime execution
        public ReactionTimeExecute(int personID, string personName, int sessionID,   
                        Chronopic cp, Gtk.Label event_execute_label_message, Gtk.Window app, int pDN, bool 
volumeOn,
-                       double progressbarLimit, ExecutingGraphData egd
+                       double progressbarLimit, ExecutingGraphData egd, string description
                        )
        {
                this.personID = personID;
@@ -57,6 +57,7 @@ public class ReactionTimeExecute : EventExecute
                this.volumeOn = volumeOn;
                this.progressbarLimit = progressbarLimit;
                this.egd = egd;
+               this.description = description;
        
                fakeButtonUpdateGraph = new Gtk.Button();
                fakeButtonEventEnded = new Gtk.Button();
@@ -287,7 +288,7 @@ public class ReactionTimeExecute : EventExecute
                uniqueID = SqliteReactionTime.Insert(
                                false, table, 
                                "NULL", personID, sessionID, "", //type
-                               time, "", Util.BoolToNegativeInt(simulated)); //time, description, simulated
+                               time, description, Util.BoolToNegativeInt(simulated));
 
                //define the created object
                eventDone = new ReactionTime(uniqueID, personID, sessionID, time, "", 
Util.BoolToNegativeInt(simulated)); 
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index d7b9c14..a55e286 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -4520,10 +4520,31 @@ public partial class ChronoJumpWindow
                event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do 
this, on_update_clicked it's called 'n' times when 'n' events are done
                event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked);
 
+               string sep = "";
+               string description = "";
+               if(extra_window_radio_reaction_time_discriminative.Active) {
+                       if(check_reaction_time_disc_red.Active == true) {
+                               description += sep + Catalog.GetString("red");
+                               sep = " + ";
+                       }
+                       if(check_reaction_time_disc_yellow.Active == true) {
+                               description += sep + Catalog.GetString("yellow");
+                               sep = " + ";
+                       }
+                       if(check_reaction_time_disc_green.Active == true) {
+                               description += sep + Catalog.GetString("green");
+                               sep = " + ";
+                       }
+                       if(check_reaction_time_disc_buzzer.Active == true) {
+                               description += sep + Catalog.GetString("buzzer");
+                               sep = " + ";
+                       }
+               }
+
                currentEventExecute = new ReactionTimeExecute(currentPerson.UniqueID, currentPerson.Name, 
                                currentSession.UniqueID, 
                                chronopicWin.CP, event_execute_label_message, app1, preferences.digitsNumber, 
preferences.volumeOn,
-                               progressbarLimit, egd
+                               progressbarLimit, egd, description
                                );
 
                if (!chronopicWin.Connected) 


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