From 09e1ea0969c0c851b9feb3baaa38f9f7961529f8 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Sep 2018 12:41:42 +0300 Subject: [PATCH] Fixed #24 --- OWTrack/MainForm.cs | 27 +++++++++++++++++++-------- OWTrack/Tracker.cs | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index cbb4641..832fb83 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -26,27 +26,38 @@ namespace OWTrack } private void checkStatus() - { + { + Time.Text = DateTime.Now.ToString("h:mm tt"); try { - Time.Text = DateTime.Now.ToString("h:mm tt"); - status.Text = NOT_RUNNING; - status.ForeColor = Color.Red; if (tr.owRunning()) { status.Text = IS_RUNNING; status.ForeColor = Color.FromArgb(0, 192, 0); - } + } + else + { + status.Text = NOT_RUNNING; + status.ForeColor = Color.Black; + } } catch (Exception e) { - MessageBox.Show(e.Message); + status.Text = e.Message; + status.ForeColor = Color.Red; } } private void loadSave() { - Directory.CreateDirectory("saves"); + try + { + Directory.CreateDirectory("saves"); + } + catch (Exception e) + { + MessageBox.Show("Can not create save directory.\n" + e.Message); + } if (saveManeger.saveExist()) { try @@ -92,7 +103,7 @@ namespace OWTrack if (result == DialogResult.OK) { //tr.gamePath = openFileDialog1.FileName; - MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest\n" + openFileDialog1.FileName ); + MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest"); return openFileDialog1.FileName; } else diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index a278053..6e23071 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -33,7 +33,7 @@ namespace OWTrack } catch (Exception) { - Exception ex = new Exception("Error in tracking Overwatch.exe"); + Exception ex = new Exception("Error"); throw ex; } } -- 2.39.5