diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index 1b0dbda..f1c6455 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -37,28 +37,28 @@ namespace OWTrack public void rediceLoss() => losses--; public int GetWins() { return wins; } public int GetLosses() { return losses; } - public int GetTotalMatches() - { + public int GetTotalMatches() + { int number = 0; foreach (var session in sessions) { number += session.TotalMatches; } - return number; + return number; } public int GetCurrentSessionMatches() { return sessions.Last().TotalMatches; } - + public void setNewSR(int SR) { newSR = SR; } - public int srDiff() { return newSR - startSR; } + public int srDiff() { return newSR - startSR; } public Settings settings = new Settings(); //public List matches = new List(); - public List sessions = new List(); + public List sessions = new List(); - public void StartNewSeission() + public void StartNewSeission() { Session ses = new Session(startSR); sessions.Add(ses); @@ -87,17 +87,17 @@ namespace OWTrack } else return false; } - - public bool LoacteOW() + + public bool LoacteOW() { - try + try { DriveInfo[] driveInfo = DriveInfo.GetDrives(); List paths = new List(); //Searches all drives (too long) //foreach (var drive in driveInfo) //{ - //paths.AddRange(GetFiles(drive.ToString(),"Overwatch.exe")); + //paths.AddRange(GetFiles(drive.ToString(),"Overwatch.exe")); //} paths.AddRange(GetFiles(Paths.ProgramFiles.C, "Overwatch.exe")); paths.AddRange(GetFiles(Paths.ProgramFiles.D, "Overwatch.exe")); @@ -115,14 +115,14 @@ namespace OWTrack settings.GamePath = paths[0]; return true; } - else return false; + else return false; } catch (Exception e) { - MessageBox.Show(e.Message); + MessageBox.Show(e.Message); return false; - } - } + } + } public static IEnumerable GetFiles(string root, string searchPattern) { @@ -151,13 +151,13 @@ namespace OWTrack class Settings { - public bool TrackSR, TrackOW = true; - public string GamePath = ""; + public bool TrackSR, TrackOW = true; + public string GamePath = ""; /// /// Reset All values to defult /// - public void Reset() + public void Reset() { TrackOW = true; TrackSR = true; @@ -170,9 +170,9 @@ namespace OWTrack public int TotalMatches; public int SkillChange; public int StartSR; - List Matches = new List(); + List Matches = new List(); DateTime date; - + /// /// Start a new session with a starting Skill Rating /// @@ -183,7 +183,7 @@ namespace OWTrack TotalMatches = 0; } - public bool IsNewSession() + public bool IsNewSession() { if (Matches.Count == 0) return true; else return false; @@ -201,7 +201,7 @@ namespace OWTrack } } - class Match + class Match { public Match() { } public DateTime dateTime { get; set; }