From 0aea639baf8df6cd29f6b01a73e5ddd5a31d121e Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Fri, 14 Jul 2023 14:45:33 +0200 Subject: [PATCH] Fixed services count button / colors --- app/Extra.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/Extra.cs b/app/Extra.cs index decad21c..c356ce7b 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -265,10 +265,21 @@ namespace GHelper private void InitServices() { - if (OptimizationService.IsRunning()) buttonServices.Text = Properties.Strings.Stop; - else buttonServices.Text = Properties.Strings.Start; - labelServices.Text = Properties.Strings.AsusServicesRunning + ": " + OptimizationService.GetRunningCount(); + int servicesCount = OptimizationService.GetRunningCount(); + + if (servicesCount > 0) + { + buttonServices.Text = Properties.Strings.Stop; + labelServices.ForeColor = colorTurbo; + } + else + { + buttonServices.Text = Properties.Strings.Start; + labelServices.ForeColor = colorStandard; + } + + labelServices.Text = Properties.Strings.AsusServicesRunning + ": " + servicesCount; buttonServices.Enabled = true; }