From 0f31b393dae6b4510bdf672ba62f939ca8c049ac Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Tue, 24 Jul 2018 18:46:19 +0200
Subject: [PATCH] Hide the "suspended" menu entry if service not running

Fixes #55
---
 ATxTray/AutoTxTray.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ATxTray/AutoTxTray.cs b/ATxTray/AutoTxTray.cs
index 5f00eb8..c72f95b 100644
--- a/ATxTray/AutoTxTray.cs
+++ b/ATxTray/AutoTxTray.cs
@@ -455,7 +455,7 @@ namespace ATxTray
                 _miSvcRunning.Text = @"Service running.";
                 _miSvcRunning.BackColor = Color.LightGreen;
                 _miTitle.BackColor = Color.LightGreen;
-                _miSvcSuspended.Enabled = true;
+                _miSvcSuspended.Visible = true;
                 /*
                 _notifyIcon.ShowBalloonTip(500, AppTitle,
                     "Service running.", ToolTipIcon.Info);
@@ -464,7 +464,7 @@ namespace ATxTray
                 _miSvcRunning.Text = @"Service NOT RUNNING!";
                 _miSvcRunning.BackColor = Color.LightCoral;
                 _miTitle.BackColor = Color.LightCoral;
-                _miSvcSuspended.Enabled = false;
+                _miSvcSuspended.Visible = false;
                 /*
                 _notifyIcon.ShowBalloonTip(500, AppTitle,
                     "Service stopped.", ToolTipIcon.Error);
-- 
GitLab