[chronojump] encoder analyze table shows eccon ok



commit 33759ccde8dd9328432de6e6ed8435bd46b60a7a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Mar 4 16:02:20 2013 +0100

    encoder analyze table shows eccon ok

 src/gui/encoder.cs |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index c66a4f3..c989e68 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1845,9 +1845,18 @@ Log.WriteLine("l");
        private void RenderNAnalyze (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
-               //(cell as Gtk.CellRendererText).Text = 
-               //      String.Format(UtilGtk.TVNumPrint(curve.N,1,0),Convert.ToInt32(curve.N));
-               (cell as Gtk.CellRendererText).Text = curve.N;
+               
+               if(radiobutton_encoder_analyze_data_current_signal.Active && findEccon(false) == "ecS") 
+               {
+                       string phase = "e";
+                       bool isEven = Util.IsEven(Convert.ToInt32(curve.N));
+                       if(isEven)
+                               phase = "c";
+
+                       (cell as Gtk.CellRendererText).Text = 
+                               decimal.Truncate((Convert.ToInt32(curve.N) +1) /2).ToString() + phase;
+               } else
+                       (cell as Gtk.CellRendererText).Text = curve.N;
        }
 
        private void RenderExercise (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)


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