[chronojump] new method to return jumpsRj.TvTcList



commit 68fec9843449095b931e73e2669752ba713c374d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Aug 6 14:54:08 2020 +0200

    new method to return jumpsRj.TvTcList

 src/jump.cs | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/jump.cs b/src/jump.cs
index 91bd3804..5ab41274 100644
--- a/src/jump.cs
+++ b/src/jump.cs
@@ -265,15 +265,22 @@ public class JumpRj : Jump
                set { tvString = value; }
        }
 
-       public List<double> TvList
+       public List<double> TvTcList
        {
                get {
                        List<double> l = new List<double>();
-                       string [] strFull = TvString.Split(new char[] {'='});
-                       foreach(string str in strFull)
+                       string [] tvFull = TvString.Split(new char[] {'='});
+                       string [] tcFull = TcString.Split(new char[] {'='});
+                       if(tvFull.Length != tcFull.Length)
+                               return l;
+
+                       for(int i = 0; i < tvFull.Length ; i ++)
                        {
-                               if(Util.IsNumber(Util.ChangeDecimalSeparator(str), true))
-                                       l.Add(Convert.ToDouble(Util.ChangeDecimalSeparator(str)));
+                               if( Util.IsNumber(Util.ChangeDecimalSeparator(tvFull[i]), true) &&
+                                       Util.IsNumber(Util.ChangeDecimalSeparator(tcFull[i]), true) )
+                                       l.Add(
+                                                       
Convert.ToDouble(Util.ChangeDecimalSeparator(tvFull[i])) /
+                                                       
Convert.ToDouble(Util.ChangeDecimalSeparator(tcFull[i])) );
                        }
                        return l;
                }


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