[chronojump] Encoder trigger code renamed variables



commit bded0b97b81efc4f9cc20d69441197dd7190e9c2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jan 27 18:16:05 2020 +0100

    Encoder trigger code renamed variables

 src/encoderCapture.cs |  2 +-
 src/gui/encoder.cs    | 34 +++++++++++++++++-----------------
 src/gui/trigger.cs    | 20 +++++++++++---------
 3 files changed, 29 insertions(+), 27 deletions(-)
---
diff --git a/src/encoderCapture.cs b/src/encoderCapture.cs
index a4b10e8e..42c7c1e6 100644
--- a/src/encoderCapture.cs
+++ b/src/encoderCapture.cs
@@ -344,7 +344,7 @@ public abstract class EncoderCapture
                        {
                                if(! playSoundsFromFile)
                                {
-                                       Trigger trigger  = new Trigger(Trigger.Modes.ENCODER, i, false);
+                                       Trigger trigger = new Trigger(Trigger.Modes.ENCODER, i, false);
                                        triggerList.Add(trigger);
                                }
 
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index c9027eab..e6c5f90c 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -481,9 +481,9 @@ public partial class ChronoJumpWindow
                //configInit();
        
                //triggers
-               triggerList = new TriggerList();
+               triggerListEncoder = new TriggerList();
                LogB.Information("after play 5");
-               showTriggerTab(false);
+               showEncoderAnalyzeTriggerTab(false);
                LogB.Information("after play 6");
 
                encoderGraphDoPlot = null;      //initialize
@@ -1223,7 +1223,7 @@ public partial class ChronoJumpWindow
 
        void on_button_encoder_recalculate_clicked (object o, EventArgs args)
        {
-               if(triggerList != null && triggerList.Count() > 0 && findEccon(false) != "c")
+               if(triggerListEncoder != null && triggerListEncoder.Count() > 0 && findEccon(false) != "c")
                {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(
                                        Catalog.GetString("Recalculate this set will remove existing 
triggers."),
@@ -1421,11 +1421,11 @@ public partial class ChronoJumpWindow
 
                //triggers stuff
                if(analysisSent == "curvesAC")
-                       triggerList = eCapture.GetTriggers();
+                       triggerListEncoder = eCapture.GetTriggers();
 
                //triggers only on concentric
-               if(triggerList == null || findEccon(false) != "c")
-                       triggerList = new TriggerList();
+               if(triggerListEncoder == null || findEccon(false) != "c")
+                       triggerListEncoder = new TriggerList();
 
                //send data to encoderRProcAnalyze
                encoderRProcAnalyze.SendData(
@@ -1433,7 +1433,7 @@ public partial class ChronoJumpWindow
                                false,  //do not use neuromuscularProfile script
                                preferences.RGraphsTranslate,
                                (preferences.encoderCaptureCutByTriggers != 
Preferences.TriggerTypes.NO_TRIGGERS),
-                               triggerList,
+                               triggerListEncoder,
                                getAnalysisMode()
                                ); 
                bool result = encoderRProcAnalyze.StartOrContinue(es);
@@ -1725,12 +1725,12 @@ public partial class ChronoJumpWindow
                                label_encoder_top_selected.Text = econfSO.name;
 
                                //triggers
-                               triggerList = new TriggerList(
+                               triggerListEncoder = new TriggerList(
                                                SqliteTrigger.Select(
                                                        false, Trigger.Modes.ENCODER,
                                                        Convert.ToInt32(encoderSignalUniqueID))
                                                );
-                               showTriggersAndTab();
+                               showEncoderAnalyzeTriggersAndTab();
                        }
                }
 
@@ -3245,15 +3245,15 @@ public partial class ChronoJumpWindow
                        encoderSendedAnalysis = sendAnalysis;
 
                //triggers only on concentric
-               if(triggerList == null || findEccon(false) != "c")
-                       triggerList = new TriggerList();
+               if(triggerListEncoder == null || findEccon(false) != "c")
+                       triggerListEncoder = new TriggerList();
 
                encoderRProcAnalyze.SendData(
                                titleStr, 
                                encoderSelectedAnalysis == "neuromuscularProfile",
                                preferences.RGraphsTranslate,
                                (preferences.encoderCaptureCutByTriggers != 
Preferences.TriggerTypes.NO_TRIGGERS),
-                               triggerList,
+                               triggerListEncoder,
                                getAnalysisMode()
                                );
 
@@ -3346,7 +3346,7 @@ public partial class ChronoJumpWindow
        
                hbox_encoder_analyze_current_signal.Visible = true;
 
-               showTriggersAndTab();
+               showEncoderAnalyzeTriggersAndTab();
 
                notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
                return false; //do not call this again
@@ -3401,7 +3401,7 @@ public partial class ChronoJumpWindow
        
                hbox_encoder_analyze_current_signal.Visible = false;
 
-               showTriggerTab(false);
+               showEncoderAnalyzeTriggerTab(false);
 
                notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
                return false; //do not call this again
@@ -3438,7 +3438,7 @@ public partial class ChronoJumpWindow
 
                button_encoder_monthly_change_current_session.Visible = false;
 
-               showTriggerTab(false);
+               showEncoderAnalyzeTriggerTab(false);
 
                notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
                return false; //do not call this again
@@ -3474,7 +3474,7 @@ public partial class ChronoJumpWindow
 
                button_encoder_monthly_change_current_session.Visible = false;
 
-               showTriggerTab(false);
+               showEncoderAnalyzeTriggerTab(false);
 
                notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
                return false; //do not call this again
@@ -6673,7 +6673,7 @@ public partial class ChronoJumpWindow
 
                                                //1) save the triggers now that we have an 
encoderSignalUniqueID
                                                
eCapture.SaveTriggers(Convert.ToInt32(encoderSignalUniqueID)); //dbcon is closed
-                                               showTriggersAndTab();
+                                               showEncoderAnalyzeTriggersAndTab();
 
                                                if(encoderRProcCapture.CutByTriggers != 
Preferences.TriggerTypes.NO_TRIGGERS &&
                                                                ! eCapture.MinimumOneTriggersOn())
diff --git a/src/gui/trigger.cs b/src/gui/trigger.cs
index aea62c9c..b852118a 100644
--- a/src/gui/trigger.cs
+++ b/src/gui/trigger.cs
@@ -27,26 +27,28 @@ using System.Collections.Generic; //List<T>
 public partial class ChronoJumpWindow
 {
        [Widget] Gtk.TextView textview_encoder_analyze_triggers;
-       TriggerList triggerList;
+       TriggerList triggerListEncoder;
 
-       private void showTriggersAndTab()
+       // start of encoder ------------->
+
+       private void showEncoderAnalyzeTriggersAndTab()
        {
-               triggerList.Print();
-               if(triggerList.Count() > 0)
+               triggerListEncoder.Print();
+               if(triggerListEncoder.Count() > 0)
                {
                        //fill textview
                        TextBuffer tb1 = new TextBuffer (new TextTagTable());
-                       tb1.Text = triggerList.ToString();
+                       tb1.Text = triggerListEncoder.ToString();
                        textview_encoder_analyze_triggers.Buffer = tb1;
                }
 
-               if(radio_encoder_analyze_individual_current_set.Active && triggerList.Count() > 0)
-                       showTriggerTab(true);
+               if(radio_encoder_analyze_individual_current_set.Active && triggerListEncoder.Count() > 0)
+                       showEncoderAnalyzeTriggerTab(true);
                else
-                       showTriggerTab(false);
+                       showEncoderAnalyzeTriggerTab(false);
        }
        
-       private void showTriggerTab(bool show)
+       private void showEncoderAnalyzeTriggerTab(bool show)
        {
                if(show)
                        notebook_analyze_results.GetNthPage(2).Show();


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