From c8bd2a9c1ccd61f6566e41788af5e8a29b86c0ee Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 4 May 2024 15:34:36 +0200 Subject: [PATCH] Option to stop AC service --- app/AppConfig.cs | 5 +++++ app/Helpers/OptimizationService.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 7fcc9f02..1754d5d3 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -615,6 +615,11 @@ public static class AppConfig return Is("bw_icon"); } + public static bool IsStopAC() + { + return IsAlly() || Is("stop_ac"); + } + } diff --git a/app/Helpers/OptimizationService.cs b/app/Helpers/OptimizationService.cs index 7b0e40cb..92c41910 100644 --- a/app/Helpers/OptimizationService.cs +++ b/app/Helpers/OptimizationService.cs @@ -48,7 +48,7 @@ namespace GHelper.Helpers if (Process.GetProcessesByName(service).Count() > 0) count++; } - if (AppConfig.IsAlly()) + if (AppConfig.IsStopAC()) foreach (string service in processesAC) { if (Process.GetProcessesByName(service).Count() > 0) @@ -69,7 +69,7 @@ namespace GHelper.Helpers ProcessHelper.StopDisableService(service); } - if (AppConfig.IsAlly()) + if (AppConfig.IsStopAC()) { foreach (string service in servicesAC) {