private void EdgeFolder_Load(object sender, EventArgs e) { CheckForIllegalCrossThreadCalls = false; textBox1.Text = Optimize.GetEdgeDownloadFolder(); textBox1.Select(textBox1.Text.Length, 0); }
private void button21_Click(object sender, EventArgs e) { Task t = new Task(() => Optimize.DisableXboxLive()); t.Start(); button21.Enabled = false; }
private void Confirm() { if (mode == MessagerType.Error) { this.Close(); } if (mode == MessagerType.Optimize) { this.Hide(); OptimizeForm f = new OptimizeForm(!chkPrint.Checked, !chkSensors.Checked); f.ShowDialog(); f.BringToFront(); } if (mode == MessagerType.Startup) { _main.RemoveAllStartupItems(); } if (mode == MessagerType.Restart) { Optimize.RebootPC(); } if (mode == MessagerType.Hosts) { _main.RemoveAllHostsEntries(); } if (mode == MessagerType.Integrator) { _main.RemoveAllDesktopItems(); } }
private void button17_Click(object sender, EventArgs e) { Task t = new Task(() => Optimize.DisableSystemRestore()); t.Start(); button17.Enabled = false; }
internal static void TakeOwnership(bool remove) { if (!File.Exists(Required.ReadyMadeMenus + "\\InstallTakeOwnership.reg")) { try { File.WriteAllText(Required.ReadyMadeMenus + "\\InstallTakeOwnership.reg", Properties.Resources.InstallTakeOwnership); } catch { } } if (!File.Exists(Required.ReadyMadeMenus + "\\RemoveTakeOwnership.reg")) { try { File.WriteAllText(Required.ReadyMadeMenus + "\\RemoveTakeOwnership.reg", Properties.Resources.RemoveTakeOwnership); } catch { } } if (!remove) { Optimize.ImportRegistryScript(Required.ReadyMadeMenus + "\\InstallTakeOwnership.reg"); } else { Optimize.ImportRegistryScript(Required.ReadyMadeMenus + "\\RemoveTakeOwnership.reg"); } }
private void button29_Click(object sender, EventArgs e) { Task t = new Task(() => Optimize.UninstallOneDrive()); t.Start(); Optimize.ActivateMain(); button29.Enabled = false; }
private void button5_Click(object sender, EventArgs e) { Task t = new Task(() => Optimize.DisableOfficeTelemetryTasks()); t.Start(); Optimize.ActivateMain(); button5.Enabled = false; }
// silent config processing for Windows 8 tweaks internal static void ProcessSilentConfigWindows8() { if (CurrentSilentConfig.DisableOneDrive) { Optimize.DisableOneDrive(); } else { Optimize.EnableOneDrive(); } }
private void ok_Click(object sender, EventArgs e) { if (Directory.Exists(textBox1.Text)) { Optimize.SetEdgeDownloadFolder(textBox1.Text); this.Close(); } else { MessagerForm f = new MessagerForm(null, MessagerType.Error, errormsg); f.ShowDialog(); } }
private void button38_Click(object sender, EventArgs e) { Optimize.RemoveWindows10Icon(); button38.Enabled = false; }
private void button36_Click(object sender, EventArgs e) { Optimize.DisableOneDrive(); button36.Enabled = false; }
private void button30_Click(object sender, EventArgs e) { Optimize.DisableSensorServices(); button30.Enabled = false; }
private void button23_Click(object sender, EventArgs e) { Optimize.DisableDataTelemetry(); button23.Enabled = false; }
private void button13_Click(object sender, EventArgs e) { Optimize.DisableHomeGroup(); button13.Enabled = false; }
// 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(); } } }
private void button57_Click(object sender, EventArgs e) { Optimize.ImportRegistryScript(Required.ReadyMadeMenus + "\\DesktopShortcuts.reg"); GetDesktopItems(); }
private void button72_Click(object sender, EventArgs e) { Optimize.DisableSpellingAndTypingFeatures(); button72.Enabled = false; }
private void button3_Click(object sender, EventArgs e) { Optimize.PerformanceTweaks(); button3.Enabled = false; }
private void button2_Click(object sender, EventArgs e) { Optimize.DisableNetworkThrottling(); button2.Enabled = false; }
private void button9_Click(object sender, EventArgs e) { Optimize.RestoreLegacyVolumeSlider(); button9.Enabled = false; }
private void button10_Click(object sender, EventArgs e) { Optimize.BlockSkypeAds(); button10.Enabled = false; }
private void button15_Click(object sender, EventArgs e) { Optimize.DisablePrintSpooler(); button15.Enabled = false; }
private void button14_Click(object sender, EventArgs e) { Optimize.DisableSuperfetch(); button14.Enabled = false; }
private void button28_Click(object sender, EventArgs e) { Optimize.DisableAutomaticUpdates(); button28.Enabled = false; }
private void button40_Click(object sender, EventArgs e) { Optimize.DisablePrivacyOptions(); button40.Enabled = false; }
private void button27_Click(object sender, EventArgs e) { Optimize.DisableDiagnosticsTracking(); button27.Enabled = false; }
// silent config processing for Windows 10 tweaks internal static void ProcessSilentConfigWindows10() { if (CurrentSilentConfig.EnableLegacyVolumeSlider.HasValue) { if (CurrentSilentConfig.EnableLegacyVolumeSlider.Value) { Optimize.EnableLegacyVolumeSlider(); } else { Optimize.DisableLegacyVolumeSlider(); } } if (CurrentSilentConfig.EnableTaskbarColor.HasValue) { if (CurrentSilentConfig.EnableTaskbarColor.Value) { Optimize.EnableTaskbarColor(); } else { Optimize.DisableTaskbarColor(); } } if (CurrentSilentConfig.DisableQuickAccessHistory.HasValue) { if (CurrentSilentConfig.DisableQuickAccessHistory.Value) { Optimize.DisableQuickAccessHistory(); } else { Optimize.EnableQuickAccessHistory(); } } if (CurrentSilentConfig.DisableStartMenuAds.HasValue) { if (CurrentSilentConfig.DisableStartMenuAds.Value) { Optimize.DisableStartMenuAds(); } else { Optimize.EnableStartMenuAds(); } } if (CurrentSilentConfig.EnableDarkTheme.HasValue) { if (CurrentSilentConfig.EnableDarkTheme.Value) { Optimize.EnableDarkTheme(); } else { Optimize.EnableLightTheme(); } } if (CurrentSilentConfig.UninstallOneDrive.HasValue) { if (CurrentSilentConfig.UninstallOneDrive.Value) { Task t = new Task(() => Optimize.UninstallOneDrive()); t.Start(); } else { Task t = new Task(() => Optimize.InstallOneDrive()); t.Start(); } } if (CurrentSilentConfig.DisableMyPeople.HasValue) { if (CurrentSilentConfig.DisableMyPeople.Value) { Optimize.DisableMyPeople(); } else { Optimize.EnableMyPeople(); } } if (CurrentSilentConfig.EnableLongPaths.HasValue) { if (CurrentSilentConfig.EnableLongPaths.Value) { Optimize.EnableLongPaths(); } else { Optimize.DisableLongPaths(); } } if (CurrentSilentConfig.DisableAutomaticUpdates.HasValue) { if (CurrentSilentConfig.DisableAutomaticUpdates.Value) { Optimize.DisableAutomaticUpdates(); } else { Optimize.EnableAutomaticUpdates(); } } if (CurrentSilentConfig.ExcludeDrivers.HasValue) { if (CurrentSilentConfig.ExcludeDrivers.Value) { Optimize.ExcludeDrivers(); } else { Optimize.IncludeDrivers(); } } if (CurrentSilentConfig.DisableTelemetryServices.HasValue) { if (CurrentSilentConfig.DisableTelemetryServices.Value) { Optimize.DisableTelemetryServices(); } else { Optimize.EnableTelemetryServices(); } } if (CurrentSilentConfig.DisablePrivacyOptions.HasValue) { if (CurrentSilentConfig.DisablePrivacyOptions.Value) { Optimize.DisablePrivacyOptions(); } else { Optimize.EnablePrivacyOptions(); } } if (CurrentSilentConfig.DisableCortana.HasValue) { if (CurrentSilentConfig.DisableCortana.Value) { Optimize.DisableCortana(); } else { Optimize.EnableCortana(); } } if (CurrentSilentConfig.DisableSensorServices.HasValue) { if (CurrentSilentConfig.DisableSensorServices.Value) { Optimize.DisableSensorServices(); } else { Optimize.EnableSensorServices(); } } if (CurrentSilentConfig.DisableWindowsInk.HasValue) { if (CurrentSilentConfig.DisableWindowsInk.Value) { Optimize.DisableWindowsInk(); } else { Optimize.EnableWindowsInk(); } } if (CurrentSilentConfig.DisableSpellingTyping.HasValue) { if (CurrentSilentConfig.DisableSpellingTyping.Value) { Optimize.DisableSpellingAndTypingFeatures(); } else { Optimize.EnableSpellingAndTypingFeatures(); } } if (CurrentSilentConfig.DisableXboxLive.HasValue) { if (CurrentSilentConfig.DisableXboxLive.Value) { Optimize.DisableXboxLive(); } else { Optimize.EnableXboxLive(); } } if (CurrentSilentConfig.DisableGameBar.HasValue) { if (CurrentSilentConfig.DisableGameBar.Value) { Optimize.DisableGameBar(); } else { Optimize.EnableGameBar(); } } if (CurrentSilentConfig.DisableInsiderService.HasValue) { if (CurrentSilentConfig.DisableInsiderService.Value) { Optimize.DisableInsiderService(); } else { Optimize.EnableInsiderService(); } } if (CurrentSilentConfig.DisableFeatureUpdates.HasValue) { if (CurrentSilentConfig.DisableFeatureUpdates.Value) { Optimize.DisableForcedFeatureUpdates(); } else { Optimize.EnableForcedFeatureUpdates(); } } if (CurrentSilentConfig.DisableCloudClipboard.HasValue) { if (CurrentSilentConfig.DisableCloudClipboard.Value) { Optimize.DisableCloudClipboard(); } else { Optimize.EnableCloudClipboard(); } } if (CurrentSilentConfig.RemoveCastToDevice.HasValue) { if (CurrentSilentConfig.RemoveCastToDevice.Value) { Optimize.RemoveCastToDevice(); } else { Optimize.AddCastToDevice(); } } if (CurrentSilentConfig.DisableActionCenter.HasValue) { if (CurrentSilentConfig.DisableActionCenter.Value) { Optimize.DisableActionCenter(); } else { Optimize.EnableActionCenter(); } } }
private void button25_Click(object sender, EventArgs e) { Optimize.DisableWAPPush(); button25.Enabled = false; }
private void button24_Click(object sender, EventArgs e) { Optimize.DisableCortana(); button24.Enabled = false; }
private void button16_Click(object sender, EventArgs e) { Optimize.DisableErrorReporting(); button16.Enabled = false; }