From e24187f29835543e4fa48a52bb074908e7bc06ba Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 12 Aug 2018 03:42:29 +0300 Subject: [PATCH] File.Write in Update() --- OWTrack/Form1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OWTrack/Form1.cs b/OWTrack/Form1.cs index 9f8fa9e..694329f 100644 --- a/OWTrack/Form1.cs +++ b/OWTrack/Form1.cs @@ -24,8 +24,7 @@ namespace OWTrack private void checkStatus() { try - { - File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tr)); + { Time.Text = DateTime.Now.ToString("h:mm tt"); if (tr.owRunning()) { @@ -115,6 +114,7 @@ namespace OWTrack { Wins.Text = tr.GetWins().ToString(); Losses.Text = tr.GetLosses().ToString(); + File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tr)); } private void clearBut_Click(object sender, EventArgs e)