Ejemplo n.º 1
0
        // silent config processing for universal tweaks
        internal static void ProcessSilentConfigGeneral()
        {
            if (CurrentSilentConfig.EnablePerformanceTweaks.HasValue)
            {
                if (CurrentSilentConfig.EnablePerformanceTweaks.Value)
                {
                    Optimize.EnablePerformanceTweaks();
                }
                else
                {
                    Optimize.DisablePerformanceTweaks();
                }
            }

            if (CurrentSilentConfig.DisableNetworkThrottling.HasValue)
            {
                if (CurrentSilentConfig.DisableNetworkThrottling.Value)
                {
                    Optimize.DisableNetworkThrottling();
                }
                else
                {
                    Optimize.EnableNetworkThrottling();
                }
            }

            if (CurrentSilentConfig.DisableWindowsDefender.HasValue)
            {
                if (CurrentSilentConfig.DisableWindowsDefender.Value)
                {
                    Optimize.DisableDefender();
                }
                else
                {
                    Optimize.EnableDefender();
                }
            }

            if (CurrentSilentConfig.DisableSystemRestore.HasValue)
            {
                if (CurrentSilentConfig.DisableSystemRestore.Value)
                {
                    Optimize.DisableSystemRestore();
                }
                else
                {
                    Optimize.EnableSystemRestore();
                }
            }

            if (CurrentSilentConfig.DisablePrintService.HasValue)
            {
                if (CurrentSilentConfig.DisablePrintService.Value)
                {
                    Optimize.DisablePrintService();
                }
                else
                {
                    Optimize.EnablePrintService();
                }
            }

            if (CurrentSilentConfig.DisableMediaPlayerSharing.HasValue)
            {
                if (CurrentSilentConfig.DisableMediaPlayerSharing.Value)
                {
                    Optimize.DisableMediaPlayerSharing();
                }
                else
                {
                    Optimize.EnableMediaPlayerSharing();
                }
            }

            if (CurrentSilentConfig.DisableErrorReporting.HasValue)
            {
                if (CurrentSilentConfig.DisableErrorReporting.Value)
                {
                    Optimize.DisableErrorReporting();
                }
                else
                {
                    Optimize.EnableErrorReporting();
                }
            }

            if (CurrentSilentConfig.DisableHomeGroup.HasValue)
            {
                if (CurrentSilentConfig.DisableHomeGroup.Value)
                {
                    Optimize.DisableHomeGroup();
                }
                else
                {
                    Optimize.EnableHomeGroup();
                }
            }

            if (CurrentSilentConfig.DisableSuperfetch.HasValue)
            {
                if (CurrentSilentConfig.DisableSuperfetch.Value)
                {
                    Optimize.DisableSuperfetch();
                }
                else
                {
                    Optimize.EnableSuperfetch();
                }
            }

            if (CurrentSilentConfig.DisableTelemetryTasks.HasValue)
            {
                if (CurrentSilentConfig.DisableTelemetryTasks.Value)
                {
                    Optimize.DisableTelemetryTasks();
                }
                else
                {
                    Optimize.EnableTelemetryTasks();
                }
            }

            if (CurrentSilentConfig.DisableOffice2016Telemetry.HasValue)
            {
                if (CurrentSilentConfig.DisableOffice2016Telemetry.Value)
                {
                    Optimize.DisableOffice2016Telemetry();
                }
                else
                {
                    Optimize.EnableOffice2016Telemetry();
                }
            }

            if (CurrentSilentConfig.DisableCompatibilityAssistant.HasValue)
            {
                if (CurrentSilentConfig.DisableCompatibilityAssistant.Value)
                {
                    Optimize.DisableCompatibilityAssistant();
                }
                else
                {
                    Optimize.EnableCompatibilityAssistant();
                }
            }

            if (CurrentSilentConfig.DisableFaxService.HasValue)
            {
                if (CurrentSilentConfig.DisableFaxService.Value)
                {
                    Optimize.DisableFaxService();
                }
                else
                {
                    Optimize.EnableFaxService();
                }
            }

            if (CurrentSilentConfig.DisableSmartScreen.HasValue)
            {
                if (CurrentSilentConfig.DisableSmartScreen.Value)
                {
                    Optimize.DisableSmartScreen();
                }
                else
                {
                    Optimize.EnableSmartScreen();
                }
            }

            if (CurrentSilentConfig.DisableStickyKeys.HasValue)
            {
                if (CurrentSilentConfig.DisableStickyKeys.Value)
                {
                    Optimize.DisableStickyKeys();
                }
                else
                {
                    Optimize.EnableStickyKeys();
                }
            }
        }
Ejemplo n.º 2
0
 // silent config processing for universal tweaks
 internal static void ProcessSilentConfigGeneral()
 {
     if (CurrentSilentConfig.EnablePerformanceTweaks)
     {
         Optimize.EnablePerformanceTweaks();
     }
     else
     {
         Optimize.DisablePerformanceTweaks();
     }
     if (CurrentSilentConfig.DisableNetworkThrottling)
     {
         Optimize.DisableNetworkThrottling();
     }
     else
     {
         Optimize.EnableNetworkThrottling();
     }
     if (CurrentSilentConfig.DisableWindowsDefender)
     {
         Optimize.DisableDefender();
     }
     else
     {
         Optimize.EnableDefender();
     }
     if (CurrentSilentConfig.DisableSystemRestore)
     {
         Optimize.DisableSystemRestore();
     }
     else
     {
         Optimize.EnableSystemRestore();
     }
     if (CurrentSilentConfig.DisablePrintService)
     {
         Optimize.DisablePrintService();
     }
     else
     {
         Optimize.EnablePrintService();
     }
     if (CurrentSilentConfig.DisableMediaPlayerSharing)
     {
         Optimize.DisableMediaPlayerSharing();
     }
     else
     {
         Optimize.EnableMediaPlayerSharing();
     }
     if (CurrentSilentConfig.BlockSkypeAds)
     {
         Optimize.DisableSkypeAds();
     }
     else
     {
         Optimize.EnableSkypeAds();
     }
     if (CurrentSilentConfig.DisableErrorReporting)
     {
         Optimize.DisableErrorReporting();
     }
     else
     {
         Optimize.EnableErrorReporting();
     }
     if (CurrentSilentConfig.DisableHomeGroup)
     {
         Optimize.DisableHomeGroup();
     }
     else
     {
         Optimize.EnableHomeGroup();
     }
     if (CurrentSilentConfig.DisableSuperfetch)
     {
         Optimize.DisableSuperfetch();
     }
     else
     {
         Optimize.EnableSuperfetch();
     }
     if (CurrentSilentConfig.DisableTelemetryTasks)
     {
         Optimize.DisableTelemetryTasks();
     }
     else
     {
         Optimize.EnableTelemetryTasks();
     }
     if (CurrentSilentConfig.DisableOffice2016Telemetry)
     {
         Optimize.DisableOffice2016Telemetry();
     }
     else
     {
         Optimize.EnableOffice2016Telemetry();
     }
     if (CurrentSilentConfig.DisableCompatibilityAssistant)
     {
         Optimize.DisableCompatibilityAssistant();
     }
     else
     {
         Optimize.EnableCompatibilityAssistant();
     }
     if (CurrentSilentConfig.DisableFaxService)
     {
         Optimize.DisableFaxService();
     }
     else
     {
         Optimize.EnableFaxService();
     }
     if (CurrentSilentConfig.DisableSmartScreen)
     {
         Optimize.DisableSmartScreen();
     }
     else
     {
         Optimize.EnableSmartScreen();
     }
     if (CurrentSilentConfig.DisableStickyKeys)
     {
         Optimize.DisableStickyKeys();
     }
     else
     {
         Optimize.EnableStickyKeys();
     }
 }