From 7be0e816f11621ba9f58da8273f47e7795fe652a Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 11:24:32 +0300 Subject: [PATCH] New Save Parameters --- OWTrack/MainForm.cs | 30 +++++++++++------------------- OWTrack/Tracker.cs | 1 + 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index 445c524..ddf3b21 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -107,14 +107,16 @@ namespace OWTrack { MessageBox.Show(e.Message); } - update(); } else if (!tr.LoacteOW()) { tr.gamePath = getGamePath(); } - } - + ExeTrackCheckBx.Checked = tr.TrackOW; + SRCheckBx.Checked = tr.TrackSR; + update(); + } + private string getGamePath() { openFileDialog1.Title = "Select Overwatch.exe"; @@ -129,28 +131,15 @@ namespace OWTrack } else { - update(); return null; } - } - - private Tracker savedTracker() - { - try - { - return JsonConvert.DeserializeObject(File.ReadAllText(Paths.SAVES)); - } - catch (Exception e) - { - MessageBox.Show(e.Message); - return null; - } - } + } private void SRSystem(bool state) { srBut.Enabled = state; srTextBox.Enabled = state; + tr.TrackSR = state; } private void OWTrackFunc(bool state) @@ -242,17 +231,20 @@ namespace OWTrack private void SRCheckBx_CheckedChanged(object sender, EventArgs e) { - SRSystem(SRCheckBx.Checked); + SRSystem(SRCheckBx.Checked); + update(); } private void ExeTrackCheckBx_CheckedChanged(object sender, EventArgs e) { OWTrackFunc(ExeTrackCheckBx.Checked); + update(); } private void ChngOWPathBtn_Click(object sender, EventArgs e) { tr.gamePath = getGamePath(); + update(); } #endregion diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index 3a8a66c..58ab0c2 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -44,6 +44,7 @@ namespace OWTrack public void setNewSR(int SR) { newSR = SR; } public int srDiff() { return newSR - startSR; } public bool TrackOW = true; + public bool TrackSR = true; public bool owRunning() {