From 9b4ab212ece92fe502ab02559157844fe0d41ff6 Mon Sep 17 00:00:00 2001
From: Rayen Ghanmi
Date: Mon, 8 Jan 2024 18:55:41 +0100
Subject: [PATCH 1/5] check CHANGELOG.md
---
App.xaml.cs | 13 +-
CHANGELOG.md | 18 +
Helpers/LogHelper.cs | 58 ++
Helpers/OptimizationOptions.cs | 7 +-
Helpers/OptimizeSystemHelper.cs | 4 -
MainWindow.xaml.cs | 1 +
Package.appxmanifest | 2 +-
RyTuneX.csproj | 5 +
Views/DebloatSystemPage.xaml | 13 +-
Views/DebloatSystemPage.xaml.cs | 79 +-
Views/HomePage.xaml.cs | 1 +
Views/OptimizeSystemPage.xaml | 15 +-
Views/OptimizeSystemPage.xaml.cs | 1295 +++++++++++++++---------------
Views/SettingsPage.xaml | 8 +-
Views/SettingsPage.xaml.cs | 34 +-
Views/ShellPage.xaml | 16 +-
Views/ShellPage.xaml.cs | 2 +-
Views/SystemInfoPage.xaml.cs | 30 +-
18 files changed, 892 insertions(+), 709 deletions(-)
create mode 100644 Helpers/LogHelper.cs
diff --git a/App.xaml.cs b/App.xaml.cs
index ba03ec8..7e756aa 100644
--- a/App.xaml.cs
+++ b/App.xaml.cs
@@ -61,7 +61,7 @@ public static T GetService()
public App()
{
InitializeComponent();
-
+ LogHelper.Log("Initializing App");
Host = Microsoft.Extensions.Hosting.Host.
CreateDefaultBuilder().
UseContentRoot(AppContext.BaseDirectory).
@@ -102,23 +102,17 @@ public App()
App.GetService().Initialize();
- UnhandledException += App_UnhandledException;
- }
-
- private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
- {
- // TODO: Log and handle exceptions as appropriate.
- // https://docs.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.application.unhandledexception.
}
protected async override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
- bool showWelcomeNotification = ShouldShowWelcomeNotification();
+ var showWelcomeNotification = ShouldShowWelcomeNotification();
if (showWelcomeNotification)
{
+ await LogHelper.Log("Showing Welcome Notification");
App.GetService().Show(string.Format("WelcomeNotification".GetLocalized(), AppContext.BaseDirectory));
// Set the flag to indicate that the welcome notification has been shown
@@ -143,6 +137,7 @@ private bool ShouldShowWelcomeNotification()
private void SetWelcomeNotificationShown()
{
// Set the flag to true to indicate that the welcome notification has been shown
+ LogHelper.Log("Setting WelcomeNotificationShown");
ApplicationData.Current.LocalSettings.Values["WelcomeNotificationShown"] = true;
}
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 674f49e..9ab5943 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,24 @@
All notable changes to this project will be documented in this file.
+## 0.7
+
+## Added
+
+- Error Logging for better debugging.
+- New `View Logs` HyperLink in Settings Page.
+
+## Changes
+
+- Minor UI improvements and fixes.
+- Better exception handling.
+- Package Name has been changed to `Rayen.RyTuneX`.
+
+### Fixes
+
+- Selecting and unselecting a package, then selecting it again, should now attempt to remove it once.
+- Crashing when exiting the app while fetching installed apps.
+
## 0.6
> [!TIP]
diff --git a/Helpers/LogHelper.cs b/Helpers/LogHelper.cs
new file mode 100644
index 0000000..e9d2f90
--- /dev/null
+++ b/Helpers/LogHelper.cs
@@ -0,0 +1,58 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Windows.Storage;
+
+internal class LogHelper
+{
+ public static async void ShowErrorMessageAndLog(Exception ex, XamlRoot xamlRoot)
+ {
+ var errorMessage = $"Caught Error: {ex.Message}";
+
+ await LogError(errorMessage);
+
+ InitiliseErrorMessage(errorMessage, xamlRoot);
+ }
+
+ private static async Task LogToFile(string message, string fileName)
+ {
+ try
+ {
+ var tempFolder = ApplicationData.Current.TemporaryFolder;
+
+ var logFile = await tempFolder.CreateFileAsync($"{fileName}_{DateTime.Now:yyyy-MM-dd}.txt", CreationCollisionOption.OpenIfExists);
+
+ await FileIO.AppendTextAsync(logFile, $"{DateTime.Now:T}: {message}\n");
+ }
+ catch (Exception logException)
+ {
+ Console.WriteLine($"Error logging to file: {logException.Message}");
+ }
+ }
+
+ private static async void InitiliseErrorMessage(string errorMessage, XamlRoot xamlRoot)
+ {
+ ContentDialog errorDialog = new ContentDialog
+ {
+ Title = "Error",
+ Content = errorMessage,
+ CloseButtonText = "Close",
+ PrimaryButtonText = "Open Logs File"
+ };
+ errorDialog.XamlRoot = xamlRoot;
+
+ errorDialog.PrimaryButtonClick += async (sender, args) =>
+ {
+ StorageFolder tempFolder = ApplicationData.Current.TemporaryFolder;
+ StorageFile logFile = await tempFolder.GetFileAsync($"ErrorLogs_{DateTime.Now:yyyy-MM-dd}.txt");
+ if (logFile != null)
+ {
+ var options = new Windows.System.LauncherOptions();
+ options.DisplayApplicationPicker = false;
+ await Windows.System.Launcher.LaunchFileAsync(logFile, options);
+ }
+ };
+ await errorDialog.ShowAsync();
+ }
+ public static Task Log(string message) => LogToFile(message, "Logs");
+ public static Task LogError(string message) => LogToFile(message, "ErrorLogs");
+}
\ No newline at end of file
diff --git a/Helpers/OptimizationOptions.cs b/Helpers/OptimizationOptions.cs
index 1ff9ae8..36304fe 100644
--- a/Helpers/OptimizationOptions.cs
+++ b/Helpers/OptimizationOptions.cs
@@ -13,7 +13,7 @@ public static List> GetUWPApps(bool uninstallableOn
using (var PowerShellInstance = PowerShell.Create())
{
-
+ LogHelper.Log("Getting Installed Apps [OptimizationOptions.cs]");
PowerShellInstance.AddScript("Set-ExecutionPolicy RemoteSigned -Scope Process");
PowerShellInstance.AddScript("Import-Module Appx")
.AddArgument("-ExecutionPolicy Bypass");
@@ -52,7 +52,7 @@ public static List> GetUWPApps(bool uninstallableOn
}
}
}
-
+ LogHelper.Log("Returning Installed Apps [OptimizationOptions.cs]");
return installedApps;
}
@@ -64,6 +64,7 @@ internal static void StopService(string serviceName)
{
if (ServiceExists(serviceName))
{
+ LogHelper.Log($"Stopping svc: {serviceName}");
var sc = new ServiceController(serviceName);
if (sc.CanStop)
{
@@ -77,6 +78,7 @@ internal static void StartInCmd(string command)
{
return;
}
+ LogHelper.Log("Starting CMD Command");
using var p = new Process();
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.StartInfo.FileName = "cmd.exe";
@@ -90,6 +92,7 @@ internal static void StartService(string serviceName)
{
if (ServiceExists(serviceName))
{
+ LogHelper.Log($"Starting svc: {serviceName}");
var sc = new ServiceController(serviceName);
sc.Start();
}
diff --git a/Helpers/OptimizeSystemHelper.cs b/Helpers/OptimizeSystemHelper.cs
index 1e6f005..db9cd37 100644
--- a/Helpers/OptimizeSystemHelper.cs
+++ b/Helpers/OptimizeSystemHelper.cs
@@ -351,16 +351,12 @@ internal static void DisableLegacyVolumeSlider()
internal static void EnableTaskbarColor()
{
- OptimizationOptions.StartInCmd("reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize\" /v EnableTransparency /t REG_DWORD /d 0 /f");
-
OptimizationOptions.StartInCmd("reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\DWM\" /v ColorPrevalence /t REG_DWORD /d 00000001 /f");
OptimizationOptions.StartInCmd("reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize\" /v ColorPrevalence /t REG_DWORD /d 00000000 /f");
}
internal static void DisableTaskbarColor()
{
- OptimizationOptions.StartInCmd("reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize\" /v EnableTransparency /t REG_DWORD /d 1 /f");
-
OptimizationOptions.StartInCmd("reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\DWM\" /v ColorPrevalence /t REG_DWORD /d 00000000 /f");
OptimizationOptions.StartInCmd("reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize\" /v ColorPrevalence /t REG_DWORD /d 00000001 /f");
}
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index c16f3f9..a1b6131 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -33,6 +33,7 @@ public sealed partial class MainWindow : WindowEx
public MainWindow()
{
InitializeComponent();
+ LogHelper.Log("Initializing MainWindow");
AppWindow.SetIcon(Path.Combine(AppContext.BaseDirectory, "Assets/WindowIcon.ico"));
Content = null;
Title = "AppDisplayName".GetLocalized();
diff --git a/Package.appxmanifest b/Package.appxmanifest
index 3cdf5ed..f59d8b6 100644
--- a/Package.appxmanifest
+++ b/Package.appxmanifest
@@ -11,7 +11,7 @@
IgnorableNamespaces="uap rescap genTemplate">
diff --git a/RyTuneX.csproj b/RyTuneX.csproj
index 50b9598..fe42e89 100644
--- a/RyTuneX.csproj
+++ b/RyTuneX.csproj
@@ -40,6 +40,7 @@
+
@@ -108,4 +109,8 @@
+
+
+
+
diff --git a/Views/DebloatSystemPage.xaml b/Views/DebloatSystemPage.xaml
index 1f301ef..d47ebdf 100644
--- a/Views/DebloatSystemPage.xaml
+++ b/Views/DebloatSystemPage.xaml
@@ -5,7 +5,9 @@
xmlns:local="using:RyTuneX.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:viewmodels="using:RyTuneX.ViewModels"
+ xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
+ xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
+ xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
mc:Ignorable="d">
@@ -37,5 +39,14 @@
+
+
+
+
+
diff --git a/Views/DebloatSystemPage.xaml.cs b/Views/DebloatSystemPage.xaml.cs
index 86d4023..a679e9f 100644
--- a/Views/DebloatSystemPage.xaml.cs
+++ b/Views/DebloatSystemPage.xaml.cs
@@ -13,28 +13,43 @@
using RyTuneX.Helpers;
using Windows.ApplicationModel;
using Windows.UI.Core;
+using Windows.UI.Notifications;
+using CommunityToolkit.WinUI.Behaviors;
+using System.Threading;
namespace RyTuneX.Views;
public sealed partial class DebloatSystemPage : Page
{
public ObservableCollection> AppList { get; set; } = [];
-
+ private readonly HashSet selectedAppsForUninstall = [];
+ private readonly CancellationTokenSource cancellationTokenSource = new();
public DebloatSystemPage()
{
InitializeComponent();
+ LogHelper.Log("Initializing DebloatSystemPage");
LoadInstalledApps();
+ Unloaded += DebloatSystemPage_Unloaded;
+ }
+ private void DebloatSystemPage_Unloaded(object sender, RoutedEventArgs e)
+ {
+ // Stop any background task when exiting
+ LogHelper.Log("Unloading DebloatSystemPage's Tasks");
+ selectedAppsForUninstall.Clear();
+ cancellationTokenSource.Cancel();
}
-
private void appTreeView_DragItemsStarting(TreeView sender, TreeViewDragItemsStartingEventArgs args)
{
args.Cancel = true;
}
- private async void LoadInstalledApps(bool uninstallableOnly = true)
+ private async void LoadInstalledApps(bool uninstallableOnly = true, CancellationToken cancellationToken = default)
{
await Task.Run(() =>
{
+ LogHelper.Log("Loading InstalledApps");
+ // Check for cancellation request
+ cancellationToken.ThrowIfCancellationRequested();
var installedApps = OptimizationOptions.GetUWPApps(uninstallableOnly);
var numberOfInstalledApps = installedApps.Count;
@@ -69,10 +84,15 @@ await Task.Run(() =>
uninstallingStatusBar.ShowError = false;
});
- });
+ }, cancellationToken);
}
private async void UninstallSelectedApp_Click(object sender, RoutedEventArgs e)
{
+ // Check if at least one item is selected
+ if (appTreeView.SelectedItems.Count == 0)
+ {
+ return;
+ }
uninstallButton.IsEnabled = false;
appTreeView.IsEnabled = false;
uninstallingStatusBar.Visibility = Visibility.Visible;
@@ -83,31 +103,53 @@ private async void UninstallSelectedApp_Click(object sender, RoutedEventArgs e)
if (selectedApp is KeyValuePair appInfo)
{
- var selectedAppInfo = appInfo;
- uninstallingStatusText.Text = "Uninstalling".GetLocalized() + selectedAppInfo.Key.ToString();
- await UninstallApps(appInfo.Key);
+ var selectedAppName = appInfo.Key;
+
+ // Check if the app is already selected for uninstallation
+ if (!selectedAppsForUninstall.Contains(selectedAppName))
+ {
+ var selectedAppInfo = appInfo;
+ uninstallingStatusText.Text = "Uninstalling".GetLocalized() + " " + selectedAppInfo.Key.ToString();
+
+ await UninstallApps(selectedAppName);
+
+ // Add the app to the HashSet to mark it as selected for uninstallation
+ selectedAppsForUninstall.Add(selectedAppName);
+ }
}
}
// Reload the installed apps after successfull uninstall
+ await LogHelper.Log("Reloading Installed Apps Data");
LoadInstalledApps();
// update ui elements
- uninstallingStatusText.Text = "Done".GetLocalized();
- uninstallingStatusText.Foreground = new SolidColorBrush(Colors.LightGreen);
uninstallingStatusBar.Visibility = Visibility.Collapsed;
+ if (appTreeView.SelectedItems.Count > 1)
+ {
+ NotificationQueue.Show(NotificationContent("Debloat", $"{appTreeView.SelectedItems.Count} Apps uninstalled successfully", InfoBarSeverity.Success, 4000));
+ }
+ else
+ {
+ NotificationQueue.Show(NotificationContent("Debloat", "App uninstalled successfully", InfoBarSeverity.Success, 4000));
+ }
+
}
// in case of an error
catch (Exception ex)
{
+ await LogHelper.Log("Error Uninstalling");
+ await LogHelper.LogError($"Error Uninstalling: {ex}");
// update ui elements
uninstallingStatusText.Text = $"Error: {ex}";
uninstallingStatusText.Foreground = new SolidColorBrush(Colors.Crimson);
uninstallingStatusBar.ShowError = true;
+ NotificationQueue.Show(NotificationContent("Debloat", "Error uninstalling", InfoBarSeverity.Error, 5000));
// reload
LoadInstalledApps();
}
}
private static async Task UninstallApps(string appName)
{
+ await LogHelper.Log($"Uninstalling: {appName}");
using var script = PowerShell.Create();
script.AddScript("Import-Module -SkipEditionCheck");
script.AddScript($"Get-AppxPackage -AllUsers {appName} | Remove-AppxPackage");
@@ -117,18 +159,21 @@ private static async Task UninstallApps(string appName)
private void ShowAll_Checked(object sender, RoutedEventArgs e)
{
// Show uninstallable apps only
+ LogHelper.Log("Reloading Installed Apps Data (All)");
DispatcherQueue.TryEnqueue(() =>
{
gettingAppsLoading.Visibility = Visibility.Visible;
appTreeView.Visibility = Visibility.Collapsed;
appTreeView.IsEnabled = false;
uninstallButton.IsEnabled = false;
+ NotificationQueue.Show(NotificationContent("Debloat", "Uninstalling some apps may break your system!", InfoBarSeverity.Warning, 4000));
});
- LoadInstalledApps(uninstallableOnly: false);
+ LoadInstalledApps(uninstallableOnly: false, cancellationTokenSource.Token);
}
private void ShowAll_Unchecked(object sender, RoutedEventArgs e)
{
// Show all apps
+ LogHelper.Log("Reloading Installed Apps Data (Uninstallable Only)");
DispatcherQueue.TryEnqueue(() =>
{
gettingAppsLoading.Visibility = Visibility.Visible;
@@ -136,6 +181,18 @@ private void ShowAll_Unchecked(object sender, RoutedEventArgs e)
appTreeView.IsEnabled = false;
uninstallButton.IsEnabled = false;
});
- LoadInstalledApps(uninstallableOnly: true);
+ LoadInstalledApps(uninstallableOnly: true, cancellationTokenSource.Token);
+ }
+ private CommunityToolkit.WinUI.Behaviors.Notification NotificationContent(string title, string message, InfoBarSeverity severity, int duration)
+ {
+ var notification = new CommunityToolkit.WinUI.Behaviors.Notification
+ {
+ Title = title,
+ Message = message,
+ Severity = severity,
+ Duration = TimeSpan.FromMilliseconds(duration)
+ };
+ LogHelper.Log("Returning Debloat Notification");
+ return notification;
}
}
\ No newline at end of file
diff --git a/Views/HomePage.xaml.cs b/Views/HomePage.xaml.cs
index 4c5a70e..7dcfdcf 100644
--- a/Views/HomePage.xaml.cs
+++ b/Views/HomePage.xaml.cs
@@ -7,5 +7,6 @@ public sealed partial class HomePage : Page
public HomePage()
{
InitializeComponent();
+ LogHelper.Log("Initializing HomePage");
}
}
diff --git a/Views/OptimizeSystemPage.xaml b/Views/OptimizeSystemPage.xaml
index 608363a..1932f87 100644
--- a/Views/OptimizeSystemPage.xaml
+++ b/Views/OptimizeSystemPage.xaml
@@ -4,13 +4,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:viewmodels="using:RyTuneX.ViewModels"
mc:Ignorable="d">
-
-
+
+
-
+
@@ -24,7 +23,7 @@
-
+
@@ -36,7 +35,7 @@
-
+
@@ -59,7 +58,7 @@
-
+
@@ -70,7 +69,7 @@
-
+
diff --git a/Views/OptimizeSystemPage.xaml.cs b/Views/OptimizeSystemPage.xaml.cs
index da59ceb..5a61edd 100644
--- a/Views/OptimizeSystemPage.xaml.cs
+++ b/Views/OptimizeSystemPage.xaml.cs
@@ -4,6 +4,9 @@
using Windows.Storage;
using Microsoft.UI.Xaml.Media;
using RyTuneX.Helpers;
+using Windows.UI.Popups;
+using Json.Schema;
+using System;
namespace RyTuneX.Views;
@@ -15,11 +18,13 @@ public sealed partial class OptimizeSystemPage : Page
public OptimizeSystemPage()
{
InitializeComponent();
+ LogHelper.Log("Initializing OptimizeSystemPage");
Loaded += (sender, e) => InitializeToggleSwitches();
isInitialSetup = false;
}
private void InitializeToggleSwitches()
{
+ LogHelper.Log("Initializing Toggle Switches");
foreach (var control in FindVisualChildren(this))
{
if (control.Tag != null && control.Tag is string tagName)
@@ -56,652 +61,660 @@ private static IEnumerable FindVisualChildren(DependencyObject depObj) whe
}
private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
{
- if (!isInitialSetup)
+ try
{
- var toggleSwitch = (ToggleSwitch)sender;
- Debug.WriteLine($"ToggleSwitch Tag: {toggleSwitch.Tag}, IsOn: {toggleSwitch.IsOn}");
- if (toggleSwitch != null && toggleSwitch.Tag != null)
+ if (!isInitialSetup)
{
- switch (toggleSwitch.Tag)
+ var toggleSwitch = (ToggleSwitch)sender;
+ LogHelper.Log($"ToggleSwitch Tag: {toggleSwitch.Tag}, IsOn: {toggleSwitch.IsOn}");
+ if (toggleSwitch != null && toggleSwitch.Tag != null)
{
- case "PerformanceTweaks":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.EnablePerformanceTweaks();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.DisablePerformanceTweaks();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "TelemetryServices":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableTelemetryServices();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableTelemetryServices();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "HomeGroup":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableHomeGroup();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableHomeGroup();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "PrintService":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisablePrintService();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnablePrintService();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Superfetch":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSuperfetch();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSuperfetch();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "CompatibilityAssistant":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableCompatibilityAssistant();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableCompatibilityAssistant();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SystemRestore":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSystemRestore();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSystemRestore();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Search":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSearch();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSearch();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SMBv1":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSMB("1");
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSMB("1");
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SMBv2":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSMB("2");
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSMB("2");
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SMBv3":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSMB("3");
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSMB("3");
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "NTFSTimeStamp":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableNTFSTimeStamp();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableNTFSTimeStamp();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "ErrorReporting":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableErrorReporting();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableErrorReporting();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "LegacyVolumeSlider":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableLegacyVolumeSlider();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableLegacyVolumeSlider();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "TaskbarColor":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableTaskbarColor();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableTaskbarColor();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Cortana":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableCortana();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableCortana();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "GamingMode":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.EnableGamingMode();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.DisableGamingMode();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "AutomaticUpdates":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableAutomaticUpdates();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableAutomaticUpdates();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "StoreUpdates":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableStoreUpdates();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableStoreUpdates();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "OneDrive":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableOneDrive();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableOneDrive();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SensorServices":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSensorServices();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSensorServices();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Privacy":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.EnhancePrivacy();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.CompromisePrivacy();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "GameBar":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableGameBar();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableGameBar();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "QuickAccessHistory":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableQuickAccessHistory();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableQuickAccessHistory();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "StartMenuAds":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableStartMenuAds();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableStartMenuAds();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "MyPeople":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableMyPeople();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableMyPeople();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Drivers":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.ExcludeDrivers();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.IncludeDrivers();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "WindowsInk":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableWindowsInk();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableWindowsInk();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SpellingAndTypingFeatures":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSpellingAndTypingFeatures();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSpellingAndTypingFeatures();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "FaxService":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableFaxService();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableFaxService();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "InsiderService":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableInsiderService();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableInsiderService();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SmartScreen":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSmartScreen();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSmartScreen();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "CloudClipboard":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableCloudClipboard();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableCloudClipboard();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "StickyKeys":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableStickyKeys();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableStickyKeys();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "CastToDevice":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.RemoveCastToDevice();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.AddCastToDevice();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "VBS":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableVirtualizationBasedSecurity();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableVirtualizationBasedSecurity();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "TaskbarToLeft":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.AlignTaskbarToLeft();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.AlignTaskbarToCenter();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "SnapAssist":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableSnapAssist();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableSnapAssist();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Widgets":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableWidgets();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableWidgets();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Chat":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableChat();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableChat();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "ContextMenu":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.EnableClassicMenu();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.DisableClassicMenu();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "ShowMoreOptions":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableShowMoreOptions();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableShowMoreOptions();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "TPMCheck":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableTPMCheck();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableTPMCheck();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "FilesCompactMode":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.EnableFilesCompactMode();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.DisableFilesCompactMode();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Stickers":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableStickers();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableStickers();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "EdgeDiscoverBar":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableEdgeDiscoverBar();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableEdgeDiscoverBar();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "EdgeTelemetry":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableEdgeTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableEdgeTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "CoPilotAI":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableCoPilotAI();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableCoPilotAI();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "VisualStudioTelemetry":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableVisualStudioTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableVisualStudioTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "NvidiaTelemetry":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableNvidiaTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableNvidiaTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "ChromeTelemetry":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableChromeTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableChromeTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "FirefoxTelemetry":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableFirefoxTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableFirefoxTelemetry();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
- case "Hibernation":
- if (toggleSwitch.IsOn)
- {
- OptimizeSystemHelper.DisableHibernation();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
- }
- else
- {
- OptimizeSystemHelper.EnableHibernation();
- ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
- }
- break;
+ switch (toggleSwitch.Tag)
+ {
+ case "PerformanceTweaks":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.EnablePerformanceTweaks();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.DisablePerformanceTweaks();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "TelemetryServices":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableTelemetryServices();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableTelemetryServices();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "HomeGroup":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableHomeGroup();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableHomeGroup();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "PrintService":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisablePrintService();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnablePrintService();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Superfetch":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSuperfetch();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSuperfetch();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "CompatibilityAssistant":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableCompatibilityAssistant();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableCompatibilityAssistant();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SystemRestore":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSystemRestore();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSystemRestore();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Search":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSearch();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSearch();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SMBv1":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSMB("1");
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSMB("1");
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SMBv2":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSMB("2");
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSMB("2");
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SMBv3":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSMB("3");
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSMB("3");
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "NTFSTimeStamp":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableNTFSTimeStamp();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableNTFSTimeStamp();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "ErrorReporting":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableErrorReporting();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableErrorReporting();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "LegacyVolumeSlider":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableLegacyVolumeSlider();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableLegacyVolumeSlider();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "TaskbarColor":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableTaskbarColor();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableTaskbarColor();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Cortana":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableCortana();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableCortana();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "GamingMode":
+ if (toggleSwitch.IsOn)
+ {
+ throw new Exception();
+ OptimizeSystemHelper.EnableGamingMode();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.DisableGamingMode();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "AutomaticUpdates":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableAutomaticUpdates();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableAutomaticUpdates();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "StoreUpdates":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableStoreUpdates();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableStoreUpdates();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "OneDrive":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableOneDrive();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableOneDrive();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SensorServices":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSensorServices();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSensorServices();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Privacy":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.EnhancePrivacy();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.CompromisePrivacy();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "GameBar":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableGameBar();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableGameBar();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "QuickAccessHistory":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableQuickAccessHistory();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableQuickAccessHistory();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "StartMenuAds":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableStartMenuAds();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableStartMenuAds();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "MyPeople":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableMyPeople();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableMyPeople();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Drivers":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.ExcludeDrivers();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.IncludeDrivers();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "WindowsInk":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableWindowsInk();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableWindowsInk();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SpellingAndTypingFeatures":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSpellingAndTypingFeatures();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSpellingAndTypingFeatures();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "FaxService":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableFaxService();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableFaxService();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "InsiderService":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableInsiderService();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableInsiderService();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SmartScreen":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSmartScreen();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSmartScreen();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "CloudClipboard":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableCloudClipboard();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableCloudClipboard();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "StickyKeys":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableStickyKeys();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableStickyKeys();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "CastToDevice":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.RemoveCastToDevice();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.AddCastToDevice();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "VBS":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableVirtualizationBasedSecurity();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableVirtualizationBasedSecurity();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "TaskbarToLeft":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.AlignTaskbarToLeft();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.AlignTaskbarToCenter();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "SnapAssist":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableSnapAssist();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableSnapAssist();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Widgets":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableWidgets();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableWidgets();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Chat":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableChat();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableChat();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "ContextMenu":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.EnableClassicMenu();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.DisableClassicMenu();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "ShowMoreOptions":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableShowMoreOptions();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableShowMoreOptions();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "TPMCheck":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableTPMCheck();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableTPMCheck();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "FilesCompactMode":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.EnableFilesCompactMode();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.DisableFilesCompactMode();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Stickers":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableStickers();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableStickers();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "EdgeDiscoverBar":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableEdgeDiscoverBar();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableEdgeDiscoverBar();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "EdgeTelemetry":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableEdgeTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableEdgeTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "CoPilotAI":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableCoPilotAI();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableCoPilotAI();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "VisualStudioTelemetry":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableVisualStudioTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableVisualStudioTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "NvidiaTelemetry":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableNvidiaTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableNvidiaTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "ChromeTelemetry":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableChromeTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableChromeTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "FirefoxTelemetry":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableFirefoxTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableFirefoxTelemetry();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ case "Hibernation":
+ if (toggleSwitch.IsOn)
+ {
+ OptimizeSystemHelper.DisableHibernation();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
+ }
+ else
+ {
+ OptimizeSystemHelper.EnableHibernation();
+ ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = false;
+ }
+ break;
+ }
}
}
}
+ catch (Exception ex)
+ {
+ LogHelper.ShowErrorMessageAndLog(ex, this.XamlRoot);
+ }
}
}
\ No newline at end of file
diff --git a/Views/SettingsPage.xaml b/Views/SettingsPage.xaml
index 0df64b4..71072a8 100644
--- a/Views/SettingsPage.xaml
+++ b/Views/SettingsPage.xaml
@@ -10,8 +10,8 @@
-
-
+
+
@@ -65,7 +65,7 @@
-
+
-
+
diff --git a/Views/SettingsPage.xaml.cs b/Views/SettingsPage.xaml.cs
index 9595b55..ad844f6 100644
--- a/Views/SettingsPage.xaml.cs
+++ b/Views/SettingsPage.xaml.cs
@@ -23,6 +23,7 @@ public ICommand SwitchThemeCommand
public SettingsPage()
{
InitializeComponent();
+ LogHelper.Log("Initializing SettingsPage");
_themeSelectorService = App.GetService();
@@ -60,6 +61,8 @@ private void LanguageComboBox_SelectionChanged(object sender, SelectionChangedEv
}
else
{
+ LogHelper.Log("Invalid language tag");
+ LogHelper.LogError("Invalid language tag");
throw new Exception($"Invalid language tag");
}
}
@@ -87,6 +90,7 @@ private void SetDefaultLanguageBasedOnSystem()
private void SetDefaultLanguage(string tag)
{
+ LogHelper.Log($"Setting Language: {tag}");
foreach (ComboBoxItem item in LanguageComboBox.Items)
{
if (item.Tag as string == tag)
@@ -110,19 +114,20 @@ private string GetVersionDescription()
{
version = typeof(SettingsPage).Assembly.GetName().Version!;
}
-
return $"{"AppDisplayName".GetLocalized()} - {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
}
public ElementTheme ElementTheme
{
get
{
+ LogHelper.Log("Returning ElementTheme");
return _elementTheme;
}
set
{
if (_elementTheme != value)
{
+ LogHelper.Log("Setting ElementTheme");
_elementTheme = value;
}
}
@@ -132,14 +137,41 @@ public string VersionDescription
{
get
{
+ LogHelper.Log("Getting VersionDescription");
return _versionDescription;
}
set
{
if (_versionDescription != value)
{
+ LogHelper.Log("Setting VersionDescription");
_versionDescription = value;
}
}
}
+
+ private async void HyperlinkButton_Click(object sender, RoutedEventArgs e)
+ {
+ await OpenLogFile();
+ }
+
+ private async Task OpenLogFile()
+ {
+ try
+ {
+ StorageFolder tempFolder = ApplicationData.Current.TemporaryFolder;
+ StorageFile logFile = await tempFolder.GetFileAsync($"Logs_{DateTime.Now:yyyy-MM-dd}.txt");
+
+ if (logFile != null)
+ {
+ var options = new Windows.System.LauncherOptions();
+ options.DisplayApplicationPicker = false;
+ await Windows.System.Launcher.LaunchFileAsync(logFile, options);
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Error opening log file: {ex.Message}");
+ }
+ }
}
diff --git a/Views/ShellPage.xaml b/Views/ShellPage.xaml
index 9bb11ac..c5b1a67 100644
--- a/Views/ShellPage.xaml
+++ b/Views/ShellPage.xaml
@@ -19,19 +19,11 @@
HorizontalAlignment="Left"
Width="22"
Height="22" />
-
-
-
-
-
+ Style="{StaticResource CaptionTextBlockStyle}"/>
try
{
// This code will run on a background thread
-
+ LogHelper.Log("Updating SystemInfo");
var osInformation = GetOsInformation();
var cpuInformation = GetCpuInformation();
var gpuInformation = GetGpuInformation();
@@ -55,7 +56,7 @@ await Task.Run(() =>
}
catch (Exception ex)
{
- Debug.WriteLine($"Error updating system information: {ex}");
+ LogHelper.LogError($"Error updating system information: {ex}");
}
});
}
@@ -64,6 +65,7 @@ private static string GetCpuInformation()
{
try
{
+ LogHelper.Log("Getting CPU Info");
using var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
var collection = searcher.Get();
searcher.Dispose();
@@ -77,13 +79,12 @@ private static string GetCpuInformation()
$"Socket Designation: {cpu["SocketDesignation"]}\n" +
$"L2 Cache Size: {cpu["L2CacheSize"]} KB\n" +
$"L3 Cache Size: {cpu["L3CacheSize"]} KB");
- Debug.WriteLine("Getting CPU info");
return string.Join(Environment.NewLine, cpuInfoLines);
}
catch (Exception ex)
{
- Debug.WriteLine($"Error getting CPU info: {ex}");
+ LogHelper.LogError($"Error getting CPU info: {ex}");
return string.Empty;
}
}
@@ -92,6 +93,7 @@ private static string GetGpuInformation()
{
try
{
+ LogHelper.Log("Getting GPU Info");
using var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
var collection = searcher.Get();
searcher.Dispose();
@@ -107,12 +109,12 @@ private static string GetGpuInformation()
gpuNumber++;
return gpuInfo;
});
- Debug.WriteLine("Getting GPU info");
+
return string.Join(Environment.NewLine, gpuInfoLines);
}
catch (Exception ex)
{
- Debug.WriteLine($"Error getting GPU info: {ex}");
+ LogHelper.LogError($"Error getting GPU info: {ex}");
return string.Empty;
}
}
@@ -121,6 +123,7 @@ private static string GetRamInformation()
{
try
{
+ LogHelper.Log("Getting RAM Info");
using var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMemory");
var collection = searcher.Get();
searcher.Dispose();
@@ -132,12 +135,11 @@ private static string GetRamInformation()
$" Speed: {ram["Speed"]} MHz\n" +
$" Manufacturer: {ram["Manufacturer"]}");
- Debug.WriteLine("Getting RAM info");
return string.Join(Environment.NewLine, ramInfoLines);
}
catch (Exception ex)
{
- Debug.WriteLine($"Error getting RAM info: {ex}");
+ LogHelper.LogError($"Error getting RAM info: {ex}");
return string.Empty;
}
}
@@ -146,6 +148,7 @@ private static string GetDiskInformation()
{
try
{
+ LogHelper.Log("Getting Disks Info");
using var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
var collection = searcher.Get();
searcher.Dispose();
@@ -162,13 +165,12 @@ private static string GetDiskInformation()
diskNumber++;
return diskInfo;
});
- Debug.WriteLine("Getting Disk info");
return string.Join(Environment.NewLine, diskInfoLines);
}
catch (Exception ex)
{
- Debug.WriteLine($"Error getting Disk info: {ex}");
+ LogHelper.LogError($"Error getting Disk info: {ex}");
return string.Empty; ;
}
}
@@ -177,6 +179,7 @@ private static string GetOsInformation()
{
try
{
+ LogHelper.Log("Getting OS Info");
using var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
var collection = searcher.Get();
searcher.Dispose();
@@ -193,12 +196,11 @@ private static string GetOsInformation()
$"System Directory: {os["SystemDirectory"]}\n" +
$"Last Boot Up Time: {os["LastBootUpTime"]}");
- Debug.WriteLine("Getting OS info");
return string.Join(Environment.NewLine, osInfoLines);
}
catch (Exception ex)
{
- Debug.WriteLine($"Error getting OS info: {ex}");
+ LogHelper.LogError($"Error getting OS info: {ex}");
return string.Empty;
}
}
@@ -207,13 +209,13 @@ private void ReloadInfo(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
try
{
- Debug.WriteLine("Reloading SystemInfo Page");
+ LogHelper.LogError("Reloading SystemInfo Page");
Frame.Navigate(Frame.CurrentSourcePageType);
Frame.BackStack.RemoveAt(Frame.BackStack.Count - 1);
}
catch (Exception ex)
{
- Debug.WriteLine($"Error reloading SystemInfo Page: {ex}");
+ LogHelper.LogError($"Error reloading SystemInfo Page: {ex}");
}
}
}
From 661f9e9e76ff2ee083abfbf7773aed6447d6a474 Mon Sep 17 00:00:00 2001
From: Rayen Ghanmi
Date: Mon, 8 Jan 2024 19:25:19 +0100
Subject: [PATCH 2/5] CHANGELOG.md
---
CHANGELOG.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ab5943..32243bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,8 @@
# CHANGELOG.md
-All notable changes to this project will be documented in this file.
+All notable changes to this branch will be documented in this file.
-## 0.7
+## 0.7 - Work In Progress
## Added
@@ -20,7 +20,7 @@ All notable changes to this project will be documented in this file.
- Selecting and unselecting a package, then selecting it again, should now attempt to remove it once.
- Crashing when exiting the app while fetching installed apps.
-## 0.6
+## 0.6 - Released
> [!TIP]
> **This version adressed the following issue:**
@@ -40,14 +40,14 @@ All notable changes to this project will be documented in this file.
> [!NOTE]
> If you have any design ideas for the setup, feel free to share them.
-## 0.5
+## 0.5 - Unreleased
### Added
- Extended System information (Operating System, cpu, gpu, ram, ...).
-## 0.4
+## 0.4 - Unreleased
### Added
From e3e9be24a48f87629a57571351756dc91f1a217e Mon Sep 17 00:00:00 2001
From: Rayen Ghanmi
Date: Mon, 8 Jan 2024 20:37:15 +0100
Subject: [PATCH 3/5] Update README.md
---
README.md | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index be32a7e..f4bae21 100644
--- a/README.md
+++ b/README.md
@@ -4,19 +4,17 @@
# RyTuneX
-[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
+[![License: AGPL v3.0](https://img.shields.io/badge/License-AGPL%20v3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.html)
[![GitHub stars](https://img.shields.io/github/stars/rayenghanmi/RyTuneX.svg)](https://github.com/rayenghanmi/RyTuneX/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/rayenghanmi/RyTuneX.svg)](https://github.com/rayenghanmi/RyTuneX/issues)
[![GitHub forks](https://img.shields.io/github/forks/rayenghanmi/RyTuneX.svg)](https://github.com/rayenghanmi/RyTuneX/network)
[![Twitter Follow](https://img.shields.io/twitter/follow/rayen_ghanmi_23.svg?style=social)](https://twitter.com/rayen_ghanmi_23)
[![Facebook](https://img.shields.io/badge/Facebook-rayen.ghanmi.23-blue)](https://www.facebook.com/rayen.ghanmi.23)
-[![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue)](https://discord.gg/1129340862044839936)
-[![Website](https://img.shields.io/badge/Website-RyTuneX-blue)](https://rayen.vercel.app/rytunex)
+[![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue)](https://discord.gg/gyBzyd364t)
+[![Website](https://img.shields.io/badge/Website-RyTuneX-blue)](https://rayenghanmi.github.io/rytunex)
> [!NOTE]
-> Any url redirecting to my website whether in github or in the app is not working right now as I'm working on a newer one.
-
-## Description
+> [New Website](https://rayenghanmi.github.io/rytunex/index.html)
RyTuneX is an optimizer made using the WinUI 3 framework, designed to elevate the performance of Windows devices. Tailored for both Windows 10 and 11, RyTuneX allows users to selectively remove unwanted pre-built applications that are challenging to uninstall and to disable unnecessary background services.
@@ -35,13 +33,17 @@ RyTuneX is an optimizer made using the WinUI 3 framework, designed to elevate th
## Screenshots
-
-
-
+
+
+
+
+
+
-
+
+
## Installation
From 9c33de5f67f60ab746e64f8ca459674c74716919 Mon Sep 17 00:00:00 2001
From: rayenghanmi
Date: Thu, 11 Jan 2024 16:29:05 +0100
Subject: [PATCH 4/5] Minor changes
---
Package.appxmanifest | 2 +-
README.md | 92 ++------------------------------
Views/OptimizeSystemPage.xaml.cs | 1 -
app.manifest | 4 +-
4 files changed, 8 insertions(+), 91 deletions(-)
diff --git a/Package.appxmanifest b/Package.appxmanifest
index f59d8b6..b40c1f2 100644
--- a/Package.appxmanifest
+++ b/Package.appxmanifest
@@ -13,7 +13,7 @@
+ Version="0.7.0.0" />
diff --git a/README.md b/README.md
index f4bae21..fdfcf10 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,10 @@
-# RyTuneX
+# RyTuneX Testing
+
+> [!IMPORTANT]
+> Testing Branch
[![License: AGPL v3.0](https://img.shields.io/badge/License-AGPL%20v3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0.html)
[![GitHub stars](https://img.shields.io/github/stars/rayenghanmi/RyTuneX.svg)](https://github.com/rayenghanmi/RyTuneX/stargazers)
@@ -13,93 +16,8 @@
[![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue)](https://discord.gg/gyBzyd364t)
[![Website](https://img.shields.io/badge/Website-RyTuneX-blue)](https://rayenghanmi.github.io/rytunex)
-> [!NOTE]
-> [New Website](https://rayenghanmi.github.io/rytunex/index.html)
-
RyTuneX is an optimizer made using the WinUI 3 framework, designed to elevate the performance of Windows devices. Tailored for both Windows 10 and 11, RyTuneX allows users to selectively remove unwanted pre-built applications that are challenging to uninstall and to disable unnecessary background services.
-## Key Features:
-
-- **Selective App Removal:** Remove unwanted pre-installed apps that are typically hard to uninstall, freeing up valuable storage space.
-
-- **Background Service Management:** Disable unnecessary background services to streamline system resources, enhancing overall performance.
-
-- **Privacy Enhancements:** Enhance privacy by blocking telemetry and data collection processes, ensuring a more secure computing environment.
-
-- **WinUI 3 Framework:** Built with the modern WinUI 3 framework, RyTuneX ensures a sleek and responsive user interface.
-
-- **Windows 10 and 11 Compatibility:** Optimized to enhance performance on both Windows 10 and Windows 11.
-
-## Screenshots
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-## Installation
-
-It has never been easier to get started with RyTuneX. Follow these simple steps:
-
-1. **Download**: Get the installation setup:
-
- [![Download Latest Release](https://img.shields.io/badge/Download-Latest%20Release-brightgreen)](https://github.com/rayenghanmi/RyTuneX/releases/latest)
-
-3. **Install**: Once the download is complete, run the setup and follow the on-screen instructions to install RyTuneX.
-
-That's it! It's as easy as that. Now you're ready to enjoy the features of RyTuneX.
-
-> [!NOTE]
-> Due to the no-certified setup excutable you'll encounter warnings from Windows Defender during installation saying that the app is a malware or it's from an untrusted source due to , if you're concerned you can clone the repo and build it yourself.
-
-**Important**: Only download RyTuneX from the official [GitHub releases page](https://github.com/rayenghanmi/RyTuneX/releases). Avoid downloading from unofficial sources to ensure the integrity of the application.
-
-## Usage
-
-### System Optimizations
-
-1. **Navigate to "Optimize System" Tab:**
- - Locate and click on the "Optimize System" tab in the RyTuneX user interface.
-
-2. **Customize Optimization Settings:**
- - Toggle each switch to enable or disable specific optimization features.
- - Hover over each option to get detailed information about its functionality.
- - Tailor the optimization settings based on your preferences.
- - Make sure to restart your system for changes to take effect.
-
-### Debloat Unwanted Apps
-
-1. **Visit the "Debloat" Tab:**
- - Access the "Debloat" tab to manage unwanted applications on your system.
-
-2. **Select Apps for Removal:**
- - Browse through the list of apps presented in the "Debloat" tab.
- - Choose the apps you want to remove by selecting the corresponding checkboxes.
-
-3. **Uninstall Selected Apps:**
- - Click the "Uninstall Apps" button to initiate the removal process for the selected applications.
- - Make sure to restart your system.
-
-Feel free to explore these sections and customize your system optimizations and app removals according to your preferences.
-
-## Contributing
-
-If you want to contribute to this project, follow these steps:
-1. Fork the project.
-2. Create a new branch (`git checkout -b feature/YourFeature`).
-3. Commit your changes (`git commit -m 'Add some feature'`).
-4. Push to the branch (`git push origin feature/YourFeature`).
-5. Open a pull request.
-
## License
This project is licensed under the [GNU Affero General Public License v3.0](https://github.com/rayenghanmi/RyTuneX/blob/main/LICENSE.md).
@@ -112,4 +30,4 @@ This project is licensed under the [GNU Affero General Public License v3.0](http
- Twitter: [@rayen_ghanmi_23](https://twitter.com/rayen_ghanmi_23)
- Facebook: [rayen.ghanmi.23](https://www.facebook.com/rayen.ghanmi.23)
-Feel free to reach out if you have any questions or suggestions!
+Feel free to reach out if you have any questions or suggestions!
\ No newline at end of file
diff --git a/Views/OptimizeSystemPage.xaml.cs b/Views/OptimizeSystemPage.xaml.cs
index 5a61edd..5b5a571 100644
--- a/Views/OptimizeSystemPage.xaml.cs
+++ b/Views/OptimizeSystemPage.xaml.cs
@@ -266,7 +266,6 @@ private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
case "GamingMode":
if (toggleSwitch.IsOn)
{
- throw new Exception();
OptimizeSystemHelper.EnableGamingMode();
ApplicationData.Current.LocalSettings.Values[(string)toggleSwitch.Tag] = true;
}
diff --git a/app.manifest b/app.manifest
index 21a1c43..65cf28b 100644
--- a/app.manifest
+++ b/app.manifest
@@ -6,13 +6,13 @@
-
+
true/PM
From 37e2ebe4c0a3a90ca29cf7f6f836d79d2ad73de1 Mon Sep 17 00:00:00 2001
From: rayenghanmi
Date: Fri, 12 Jan 2024 13:26:02 +0100
Subject: [PATCH 5/5] v0.7.1
---
App.xaml.cs | 2 +-
CHANGELOG.md | 16 +++++++++++++---
Package.appxmanifest | 2 +-
RyTuneX.csproj | 6 ++++--
Services/PageService.cs | 1 +
Strings/ar-tn/Resources.resw | 3 +++
Strings/en-us/Resources.resw | 3 +++
Strings/fr-fr/Resources.resw | 3 +++
Views/BenchmarkPage.xaml | 14 ++++++++++++++
Views/BenchmarkPage.xaml.cs | 14 ++++++++++++++
Views/DebloatSystemPage.xaml.cs | 22 +++++++++++++++-------
Views/SettingsPage.xaml.cs | 4 ++--
Views/ShellPage.xaml | 11 +++++++++++
Views/ShellPage.xaml.cs | 8 +++-----
app.manifest | 2 +-
15 files changed, 89 insertions(+), 22 deletions(-)
create mode 100644 Views/BenchmarkPage.xaml
create mode 100644 Views/BenchmarkPage.xaml.cs
diff --git a/App.xaml.cs b/App.xaml.cs
index 7e756aa..e6b5f9b 100644
--- a/App.xaml.cs
+++ b/App.xaml.cs
@@ -61,7 +61,7 @@ public static T GetService()
public App()
{
InitializeComponent();
- LogHelper.Log("Initializing App");
+ LogHelper.Log("___________ New Session ___________");
Host = Microsoft.Extensions.Hosting.Host.
CreateDefaultBuilder().
UseContentRoot(AppContext.BaseDirectory).
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 32243bc..0bd575f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,14 +2,24 @@
All notable changes to this branch will be documented in this file.
-## 0.7 - Work In Progress
+## 0.7.1 - Released
-## Added
+### Added
+
+- Version number is now displayed the taskbar.
+
+### Fixes
+
+- Crashing when exiting the app while fetching installed apps.
+
+## 0.7.0 - Unreleased
+
+### Added
- Error Logging for better debugging.
- New `View Logs` HyperLink in Settings Page.
-## Changes
+### Changes
- Minor UI improvements and fixes.
- Better exception handling.
diff --git a/Package.appxmanifest b/Package.appxmanifest
index b40c1f2..665607a 100644
--- a/Package.appxmanifest
+++ b/Package.appxmanifest
@@ -13,7 +13,7 @@
+ Version="0.7.1.0" />
diff --git a/RyTuneX.csproj b/RyTuneX.csproj
index fe42e89..b101705 100644
--- a/RyTuneX.csproj
+++ b/RyTuneX.csproj
@@ -21,8 +21,6 @@
True
Never
MSIX
- 0.6.0.0
- 0.6.0.0
1D92A91C88A122BB200B96F35A8311064D7AD1CE
RyTuneX.Program
README.md
@@ -31,6 +29,7 @@
+
@@ -80,6 +79,9 @@
MSBuild:Compile
+
+ $(DefaultXamlRuntime)
+
diff --git a/Services/PageService.cs b/Services/PageService.cs
index bc555b5..47f0a02 100644
--- a/Services/PageService.cs
+++ b/Services/PageService.cs
@@ -15,6 +15,7 @@ public class PageService : IPageService
public PageService()
{
Configure();
+ Configure();
Configure();
Configure();
Configure();
diff --git a/Strings/ar-tn/Resources.resw b/Strings/ar-tn/Resources.resw
index 816d567..22dba18 100644
--- a/Strings/ar-tn/Resources.resw
+++ b/Strings/ar-tn/Resources.resw
@@ -227,4 +227,7 @@
حدد التطبيقات التي ترغب في إزالتها واضغط على إلغاء التثبيت
+
+ قياس الأداء
+
\ No newline at end of file
diff --git a/Strings/en-us/Resources.resw b/Strings/en-us/Resources.resw
index fe0a867..4f11e50 100644
--- a/Strings/en-us/Resources.resw
+++ b/Strings/en-us/Resources.resw
@@ -227,4 +227,7 @@
Select apps that you want to remove and hit uninstall
+
+ Benchmark
+
\ No newline at end of file
diff --git a/Strings/fr-fr/Resources.resw b/Strings/fr-fr/Resources.resw
index e2b4370..3094939 100644
--- a/Strings/fr-fr/Resources.resw
+++ b/Strings/fr-fr/Resources.resw
@@ -227,4 +227,7 @@
Sélectionnez les applications que vous souhaitez supprimer et appuyez sur Désinstaller
+
+ Performance
+
\ No newline at end of file
diff --git a/Views/BenchmarkPage.xaml b/Views/BenchmarkPage.xaml
new file mode 100644
index 0000000..0b00677
--- /dev/null
+++ b/Views/BenchmarkPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/BenchmarkPage.xaml.cs b/Views/BenchmarkPage.xaml.cs
new file mode 100644
index 0000000..64120dc
--- /dev/null
+++ b/Views/BenchmarkPage.xaml.cs
@@ -0,0 +1,14 @@
+using Microsoft.UI.Xaml.Controls;
+
+
+namespace RyTuneX.Views;
+
+public sealed partial class BenchmarkPage : Page
+{
+
+ public BenchmarkPage()
+ {
+ InitializeComponent();
+ LogHelper.Log("Initializing BenchmarkPage");
+ }
+}
\ No newline at end of file
diff --git a/Views/DebloatSystemPage.xaml.cs b/Views/DebloatSystemPage.xaml.cs
index a679e9f..c8783ad 100644
--- a/Views/DebloatSystemPage.xaml.cs
+++ b/Views/DebloatSystemPage.xaml.cs
@@ -16,6 +16,7 @@
using Windows.UI.Notifications;
using CommunityToolkit.WinUI.Behaviors;
using System.Threading;
+using Windows.ApplicationModel.Core;
namespace RyTuneX.Views;
@@ -45,18 +46,19 @@ private void appTreeView_DragItemsStarting(TreeView sender, TreeViewDragItemsSta
private async void LoadInstalledApps(bool uninstallableOnly = true, CancellationToken cancellationToken = default)
{
- await Task.Run(() =>
+ try
{
- LogHelper.Log("Loading InstalledApps");
+ await LogHelper.Log("Loading InstalledApps");
+
// Check for cancellation request
cancellationToken.ThrowIfCancellationRequested();
- var installedApps = OptimizationOptions.GetUWPApps(uninstallableOnly);
+ var installedApps = await Task.Run(() => OptimizationOptions.GetUWPApps(uninstallableOnly), cancellationToken);
var numberOfInstalledApps = installedApps.Count;
- DispatcherQueue.TryEnqueue(() =>
+ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
- // fetching installed apps data & hiding ui elements
+ // fetching installed apps data & hiding UI elements
AppList.Clear();
gettingAppsLoading.Visibility = Visibility.Visible;
appTreeView.Visibility = Visibility.Collapsed;
@@ -68,10 +70,12 @@ await Task.Run(() =>
uninstallingStatusBar.Visibility = Visibility.Collapsed;
showAll.Visibility = Visibility.Collapsed;
uninstallButton.Visibility = Visibility.Collapsed;
+
foreach (var app in installedApps)
{
AppList.Add(app);
}
+
// showing the installed apps data after fetching
installedAppsCount.Text = $"Total: {numberOfInstalledApps} Apps";
installedAppsCount.Visibility = Visibility.Visible;
@@ -82,10 +86,14 @@ await Task.Run(() =>
uninstallButton.IsEnabled = true;
gettingAppsLoading.Visibility = Visibility.Collapsed;
uninstallingStatusBar.ShowError = false;
-
});
- }, cancellationToken);
+ }
+ catch (OperationCanceledException ex)
+ {
+ await LogHelper.Log(ex.ToString());
+ }
}
+
private async void UninstallSelectedApp_Click(object sender, RoutedEventArgs e)
{
// Check if at least one item is selected
diff --git a/Views/SettingsPage.xaml.cs b/Views/SettingsPage.xaml.cs
index ad844f6..a47b7c2 100644
--- a/Views/SettingsPage.xaml.cs
+++ b/Views/SettingsPage.xaml.cs
@@ -108,13 +108,13 @@ private string GetVersionDescription()
{
var packageVersion = Package.Current.Id.Version;
- version = new(packageVersion.Major, packageVersion.Minor, packageVersion.Build, packageVersion.Revision);
+ version = new(packageVersion.Major, packageVersion.Minor, packageVersion.Build);
}
else
{
version = typeof(SettingsPage).Assembly.GetName().Version!;
}
- return $"{"AppDisplayName".GetLocalized()} - {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
+ return $"{"AppDisplayName".GetLocalized()} - {version.Major}.{version.Minor}.{version.Build}";
}
public ElementTheme ElementTheme
{
diff --git a/Views/ShellPage.xaml b/Views/ShellPage.xaml
index c5b1a67..07d4203 100644
--- a/Views/ShellPage.xaml
+++ b/Views/ShellPage.xaml
@@ -24,6 +24,12 @@
Margin="34,0,0,0"
TextWrapping="NoWrap"
Style="{StaticResource CaptionTextBlockStyle}"/>
+
+
+
+
+
+
diff --git a/Views/ShellPage.xaml.cs b/Views/ShellPage.xaml.cs
index 2932be6..dfb73bf 100644
--- a/Views/ShellPage.xaml.cs
+++ b/Views/ShellPage.xaml.cs
@@ -6,7 +6,7 @@
using RyTuneX.Contracts.Services;
using RyTuneX.Helpers;
using RyTuneX.ViewModels;
-
+using Windows.ApplicationModel;
using Windows.System;
namespace RyTuneX.Views;
@@ -26,10 +26,8 @@ public ShellPage(ShellViewModel viewModel)
LogHelper.Log("Initializing ShellPage");
ViewModel.NavigationService.Frame = NavigationFrame;
ViewModel.NavigationViewService.Initialize(NavigationViewControl);
-
- // TODO: Set the title bar icon by updating /Assets/WindowIcon.ico.
- // A custom title bar is required for full window theme and Mica support.
- // https://docs.microsoft.com/windows/apps/develop/title-bar?tabs=winui3#full-customization
+ var packageVersion = Package.Current.Id.Version;
+ AppTitleBarVersion.Text = $"{packageVersion.Major}.{packageVersion.Minor}";
App.MainWindow.ExtendsContentIntoTitleBar = true;
App.MainWindow.SetTitleBar(AppTitleBar);
App.MainWindow.Activated += MainWindow_Activated;
diff --git a/app.manifest b/app.manifest
index 65cf28b..0a80c6d 100644
--- a/app.manifest
+++ b/app.manifest
@@ -1,6 +1,6 @@
-
+