handle if option to show progress bar is off

This commit is contained in:
mshafer1
2024-12-20 21:47:06 -06:00
parent 5414aa4996
commit 8203e6c112

View File

@@ -80,18 +80,25 @@ namespace ntfysh_client
displayTimeoutTimer.Elapsed += handleTimeout; displayTimeoutTimer.Elapsed += handleTimeout;
this.displayTimeoutTimer.Start(); this.displayTimeoutTimer.Start();
this.progress = 100; if (showTimeOutBar)
this.updateTimer = new System.Windows.Forms.Timer(); {
updateTimer.Interval = 100; this.progress = 100;
this.updateTimer.Tick += this.UpdateProgress; this.updateTimer = new System.Windows.Forms.Timer();
this.updateTimer.Start(); updateTimer.Interval = 100;
this.updateTimer.Tick += this.UpdateProgress;
this.updateTimer.Start();
this.shownStopwatch = new Stopwatch(); this.shownStopwatch = new Stopwatch();
this.shownStopwatch.Start(); this.shownStopwatch.Start();
this.progressBar1.Visible = true; this.progressBar1.Visible = true;
this.lbTimeout.Visible = true; this.lbTimeout.Visible = true;
this._timeout = timeout_ms; this._timeout = timeout_ms;
} else
{
this.progressBar1.Visible = false;
this.lbTimeout.Visible = false;
}
} }
else else
{ {