[chronojump] Overriden ToString() on runType to debug



commit a3c9141c639156a6c6c53aa3baf34c7cf7329d2c
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 20 17:48:25 2022 +0200

    Overriden ToString() on runType to debug

 src/runType.cs | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/runType.cs b/src/runType.cs
index 569ccd08c..8c1c02ec1 100644
--- a/src/runType.cs
+++ b/src/runType.cs
@@ -536,6 +536,17 @@ public class RunType : EventType
                        return SqliteRunType.Insert(this, tableName, dbconOpened);
        }
 
+       public override string ToString() {
+               if(hasIntervals)
+                       return string.Format("RunType: Interval, uniqueID: {0}, name: {1}, distance: {2}, " +
+                                       "tracksLimited: {3}, fixedValue: {4}, unlimited: {5}, description: 
{6}",
+                                       uniqueID, name, distance,
+                                       tracksLimited, fixedValue, unlimited, description);
+               else
+                       return string.Format("RunType: Simple, uniqueID: {0}, name: {1}, " +
+                                       "distance: {2}, description: {3}",
+                                       uniqueID, name, distance, description);
+       }
 
        public double Distance
        {


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