From b5749a6b3e29e85ec4c706f89a712dbbf5271de2 Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 27 Oct 2019 20:27:10 +0100 Subject: Not blocking GUI on the first run of continuous work --- spedytor/Form1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spedytor/Form1.cs b/spedytor/Form1.cs index 1b2afe2..7742c3f 100644 --- a/spedytor/Form1.cs +++ b/spedytor/Form1.cs @@ -194,7 +194,7 @@ namespace spedytor bTimer.Image = spedytor.Properties.Resources.stop; bTimer.Text = "Zatrzymaj"; this.setControlState(false, bTimer); - tInterval_Tick(null, null); + tInterval_Tick(this.bTimer, null); } else { @@ -222,7 +222,7 @@ namespace spedytor string filePath = Path.Combine(this.repeatFilePath, dbName + DateTime.Now.ToString("-yyyyMMdd-HHmmss") + ".sql"); threadList.Add(this.invokeSave(filePath, dbName, false)); } - if (e == null) // programmatic invoke, not actual button click + if (sender == null) // programmatic invoke, not actual button click { foreach (Thread t in threadList) { -- cgit v1.2.3