[chronojump] On runEncoder load do not show device



commit c68520f1d2e5769ead57693e0bb393d2c3952c87
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue May 18 13:13:01 2021 +0200

    On runEncoder load do not show device

 src/gui/app1/runEncoder.cs |  4 ++--
 src/runEncoder.cs          | 11 ++++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index cfa0091e..6fb27cd6 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -809,13 +809,13 @@ public partial class ChronoJumpWindow
                ArrayList dataPrint = new ArrayList();
                int count = 1;
                foreach(RunEncoder re in data)
-                       dataPrint.Add(re.ToStringArray(count++));
+                       dataPrint.Add(re.ToStringArray(false, count++));
 
                string [] columnsString = {
                        Catalog.GetString("ID"),
                        Catalog.GetString("Set"),
                        Catalog.GetString("Exercise"),
-                       Catalog.GetString("Device"),
+                       //Catalog.GetString("Device"),
                        Catalog.GetString("Distance"),
                        Catalog.GetString("Date"),
                        Catalog.GetString("Video"),
diff --git a/src/runEncoder.cs b/src/runEncoder.cs
index 4b30244a..fda3d7f7 100644
--- a/src/runEncoder.cs
+++ b/src/runEncoder.cs
@@ -121,15 +121,20 @@ public class RunEncoder
                SqliteRunEncoder.UpdateComments (dbconOpened, uniqueID, comments); //SQL not opened
        }
 
-       public string [] ToStringArray (int count)
+       public string [] ToStringArray (bool showDevice, int count)
        {
-               int all = 8;
+               int all = 7;
+               if(showDevice)
+                       all ++;
+
                string [] str = new String [all];
                int i=0;
                str[i++] = uniqueID.ToString();
                str[i++] = count.ToString();
                str[i++] = exerciseName;
-               str[i++] = Catalog.GetString(GetDeviceString(device));
+               if(showDevice)
+                       str[i++] = Catalog.GetString(GetDeviceString(device));
+
                str[i++] = distance.ToString();
                str[i++] = dateTime;
 


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