From 5905ec01223ffde087339b0ea2017784175c0d74 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Dec 2018 09:18:39 +0300 Subject: [PATCH 1/3] ProgramFiles class to struct --- OWTrack/saveManeger.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index 8cb03e0..d945997 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -33,12 +33,12 @@ namespace OWTrack public static string GetSaves() { return SAVES; } public static string GetCurrentDir() { return curDir; } - public static class ProgramFiles + public struct ProgramFiles { - public static readonly string C = "C:\\Program Files"; - public static readonly string D = "D:\\Program Files"; - public static readonly string E = "E:\\Program Files"; - public static readonly string F = "F:\\Program Files"; + public const string C = "C:\\Program Files"; + public const string D = "D:\\Program Files"; + public const string E = "E:\\Program Files"; + public const string F = "F:\\Program Files"; } } -- 2.39.5 From 8d00ee072064306799d88060318e2df9b48d841b Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Dec 2018 09:22:02 +0300 Subject: [PATCH 2/3] Paths to struct --- OWTrack/saveManeger.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index d945997..74d29a0 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -24,7 +24,7 @@ using System.IO; namespace OWTrack { - public static class Paths + public struct Paths { private static string curDir = Directory.GetCurrentDirectory(); private static string SAVES = curDir + "/saves/data.json"; @@ -40,7 +40,6 @@ namespace OWTrack public const string E = "E:\\Program Files"; public const string F = "F:\\Program Files"; } - } class saveManeger -- 2.39.5 From bc3c84c984a45035156fdc0a63e13d6533d67dab Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Dec 2018 10:04:45 +0300 Subject: [PATCH 3/3] Fixed #40 --- OWTrack/MainForm.cs | 14 +++++++++----- OWTrack/Tracker.cs | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index 61466f3..05a33e6 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -226,12 +226,16 @@ namespace OWTrack } finally { - if (!SRonce) - { + //if (!SRonce) + //{ + // tr.startSR = sr; + // SRonce = true; + //} + //else tr.newSR = sr; + if (tr.GetCurrentSession().IsNewSession()) tr.startSR = sr; - SRonce = true; - } - else tr.newSR = sr; + else + tr.newSR = sr; } AddMatch(); update(); diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index b7f56ea..8a7c44b 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -71,7 +71,6 @@ namespace OWTrack { Session ses = new Session(startSR); sessions.Add(ses); - //Re do SR input!! } public Session GetCurrentSession() @@ -216,6 +215,7 @@ namespace OWTrack public Match() { } public DateTime dateTime { get; set; } public int StartSR; + public int LastMatchSR; public int newSR; public int ChangeInSR; } -- 2.39.5