diff --git a/MainForm.cs b/MainForm.cs index 7c225a1..4969af6 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -21,8 +21,6 @@ public class MainForm : Form readonly System.Windows.Forms.Timer _statusTimer; readonly CancellationTokenSource _loopCts; - bool _closingFromTray; - readonly HeatMap _heatA; readonly HeatMap _heatB; readonly ProgressBar _gaugeRecvA; @@ -377,7 +375,6 @@ public class MainForm : Form void ExitFromTray() { - _closingFromTray = true; _tray.Visible = false; Application.Exit(); } @@ -390,12 +387,6 @@ public class MainForm : Form void OnFormClosing(object? sender, FormClosingEventArgs e) { - if (e.CloseReason == CloseReason.UserClosing && !_closingFromTray) - { - e.Cancel = true; - Hide(); - return; - } _tray.Visible = false; _statusTimer.Stop(); _loopCts.Cancel();