Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
-upd. for import wd
Greedeksf152c22c932d
diff --git a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.csindex f16095e3..84e26d0d 100644--- a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs+++ b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs@@ -12,14 +12,22 @@ namespace GTweak.Utilities.Tweaks.DefenderManager{internal class WindowsDefender : BackupRights{- internal async void SetState(bool isState)+ internal void ImportSetState(bool isDisable)+ {+ if (isDisable)+ Disable();+ else+ Enable();+ }++ internal async void SetState(bool isDisable){WaitingWindow waitingWindow = new WaitingWindow();waitingWindow.Show();BackgroundQueue backgroundQueue = new BackgroundQueue();await backgroundQueue.QueueTask(delegate{- if (isState)+ if (isDisable)Disable();elseEnable();diff --git a/.Source/GTweak/Windows/ImportWindow.xaml.cs b/.Source/GTweak/Windows/ImportWindow.xaml.csindex 90f3b01b..400b1e98 100644--- a/.Source/GTweak/Windows/ImportWindow.xaml.cs+++ b/.Source/GTweak/Windows/ImportWindow.xaml.cs@@ -2,6 +2,7 @@using GTweak.Utilities.Helpers;using GTweak.Utilities.Helpers.Storage;using GTweak.Utilities.Tweaks;+using GTweak.Utilities.Tweaks.DefenderManager;using System;using System.Collections.Generic;using System.Diagnostics;@@ -133,23 +134,19 @@ namespace GTweak.Windowsif (set.Tweak != "TglButton8"){- if (set.Tweak.Contains("TglButton"))+ if (set.Tweak.StartsWith("TglButton") && set.Tweak != "TglButton8")SystemTweaks.ApplyTweaks(set.Tweak, Convert.ToBoolean(set.Value));+ else if (set.Tweak == "TglButton8")+ {+ new WindowsDefender().ImportSetState(Convert.ToBoolean(set.Value));+ await Task.Delay(20000, _token);+ }elseSystemTweaks.ApplyTweaksSlider(set.Tweak, Convert.ToUInt32(set.Value));isRestartNeed = NotifActionsStorage.GetSysActions.Any(get => get.Key == set.Tweak && get.Value == "restart");isLogoutNeed = NotifActionsStorage.GetSysActions.Any(get => get.Key == set.Tweak && get.Value == "logout");}- else- {- if (!SystemTweaks.isTweakWorkingAntivirus)- {- SystemTweaks.isTweakWorkingAntivirus = true;- SystemTweaks.ApplyTweaks(set.Tweak, Convert.ToBoolean(set.Value));- await Task.Delay(20000, _token);- }- }}}