From d152a05e48e9e365c51ad11d75c7ee62ed62a4eb Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 3 Sep 2018 23:29:40 +0300 Subject: [PATCH 1/2] attempt 1 (add Brakpoints) --- OWTrack/Form1.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/OWTrack/Form1.cs b/OWTrack/Form1.cs index acc1e58..18616bf 100644 --- a/OWTrack/Form1.cs +++ b/OWTrack/Form1.cs @@ -4,6 +4,7 @@ using System.Windows.Forms; using Newtonsoft.Json; using System.IO; + namespace OWTrack { public partial class Form1 : Form @@ -20,7 +21,8 @@ namespace OWTrack checkStatus(); update(); label4.Text = Program.Version.ToString(); - Text = "OWTrack " + Program.Version.ToString(); + Text = "OWTrack " + Program.Version.ToString(); + } private void checkStatus() @@ -72,9 +74,9 @@ namespace OWTrack else { if (!tr.LoacteOW()) - { - getGamePath(); + { st.Close(); + getGamePath(); } return true; } @@ -104,11 +106,17 @@ namespace OWTrack openFileDialog1.CheckFileExists = true; openFileDialog1.CheckPathExists = true; - if (openFileDialog1.ShowDialog() == DialogResult.OK) + DialogResult result = openFileDialog1.ShowDialog(); + + if (result == DialogResult.OK) { tr.gamePath = openFileDialog1.FileName; - update(); } + else if (result == DialogResult.Cancel) + { + Close(); + } + update(); } private Tracker savedTracker() -- 2.39.5 From 7347c37ce6d4bbf27f7c0bfd5774057942366657 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Tue, 4 Sep 2018 20:45:09 +0300 Subject: [PATCH 2/2] Solved hidden Form --- OWTrack/Form1.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OWTrack/Form1.cs b/OWTrack/Form1.cs index 18616bf..975d183 100644 --- a/OWTrack/Form1.cs +++ b/OWTrack/Form1.cs @@ -116,6 +116,7 @@ namespace OWTrack { Close(); } + FindForm(); update(); } -- 2.39.5