From 885d235b334cb70cb5a511686fbf2246546c20b7 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 4 Oct 2018 09:03:54 +0300 Subject: [PATCH 1/3] clean --- OWTrack/MainForm.cs | 15 +++++---------- OWTrack/Program.cs | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index ddf3b21..47fdf59 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -28,7 +28,7 @@ namespace OWTrack { public partial class MainForm : Form { - Tracker tr = new Tracker(); + Tracker tr; private const string IS_RUNNING = "Running"; private const string NOT_RUNNING = " Not running"; private bool SRonce = false; @@ -36,11 +36,12 @@ namespace OWTrack public MainForm() { InitializeComponent(); + tr = new Tracker(); loadSave(); checkStatus(); update(); label4.Text = Program.Version.ToString(); - Text = "OWTrack " + Program.Version.ToString(); + Text = "OWTrack " + Program.Version.ToString(); } private void checkStatus() @@ -127,12 +128,9 @@ namespace OWTrack if (result == DialogResult.OK) { MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest"); - return openFileDialog1.FileName; + return openFileDialog1.FileName; } - else - { - return null; - } + else { return null; } } private void SRSystem(bool state) @@ -246,9 +244,6 @@ namespace OWTrack tr.gamePath = getGamePath(); update(); } - #endregion - - } } diff --git a/OWTrack/Program.cs b/OWTrack/Program.cs index 78d94a1..8ed6853 100644 --- a/OWTrack/Program.cs +++ b/OWTrack/Program.cs @@ -18,7 +18,7 @@ namespace OWTrack Application.Run(new MainForm()); } - public static string Version { get; } = "1.4.1"; + public static string Version { get; } = "1.4.2-a0"; //public static string Version = Application.ProductVersion; //public static Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; From fdfd400d0a1d8dd3faabeadfdb74c7dd71cad5b2 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 4 Oct 2018 09:08:41 +0300 Subject: [PATCH 2/3] dummy --- OWTrack/MainForm.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index 47fdf59..1d956af 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -32,6 +32,7 @@ namespace OWTrack private const string IS_RUNNING = "Running"; private const string NOT_RUNNING = " Not running"; private bool SRonce = false; + int dummy = 0; public MainForm() { From 6e7de802331af3bcc65e3380b94dadd6897d2407 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 24 Nov 2018 03:24:50 +0300 Subject: [PATCH 3/3] Fixed #29 --- OWTrack/MainForm.cs | 10 ++++------ OWTrack/Tracker.cs | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index 1d956af..b4ef381 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -92,17 +92,16 @@ namespace OWTrack if (line.Contains("Overwatch.exe")) { tr = saveManeger.GetSavedTracker(); - st.Close(); + if (tr.startSR > 0) SRonce = true; } else { if (!tr.LoacteOW()) { tr.gamePath = getGamePath(); - } - st.Close(); + } } - + st.Close(); } } catch (Exception e) @@ -125,13 +124,12 @@ namespace OWTrack openFileDialog1.DefaultExt = "exe"; openFileDialog1.Filter = "exe Files (*.exe)|*.exe|All files (*.*)|*.*"; DialogResult result = openFileDialog1.ShowDialog(); - if (result == DialogResult.OK) { MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest"); return openFileDialog1.FileName; } - else { return null; } + else return null; } private void SRSystem(bool state) diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index 58ab0c2..3ade965 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -109,9 +109,7 @@ namespace OWTrack gamePath = paths[0]; return true; } - - else return false; - + else return false; } catch (Exception e) {