diff --git a/.gitattributes b/.gitattributes
index 7bda456..bd5dd49 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -57,6 +57,6 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
-/Rebound11Files/AppPackages/ReboundDefrag.msix filter=lfs diff=lfs merge=lfs -text
-D:/Ivirius[[:space:]]Community/Source[[:space:]]Code/Current[[:space:]]Apps/Rebound[[:space:]]Hub/ReboundHub/Rebound11Files/Executables/QuickFullComputerCleanup.exe filter=lfs diff=lfs merge=lfs -text
+/Rebound11Files/AppPackages/Rebound.Defrag.msix filter=lfs diff=lfs merge=lfs -text
+D:/Ivirius[[:space:]]Community/Source[[:space:]]Code/Current[[:space:]]Apps/Rebound[[:space:]]Hub/Rebound/Rebound11Files/Executables/QuickFullComputerCleanup.exe filter=lfs diff=lfs merge=lfs -text
*.msix filter=lfs diff=lfs merge=lfs -text
diff --git a/README.md b/.github/README.md
similarity index 100%
rename from README.md
rename to .github/README.md
diff --git a/.gitignore b/.gitignore
index 5d33332..dbc17f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,11 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+# Custom files
+
+/Rebound/Rebound11Files/Executables/Quick Full Computer Cleanup.exe
+/Rebound/Rebound11Files/Executables/QuickFullComputerCleanup.exe
+
# User-specific files
*.rsuser
*.suo
@@ -361,5 +366,3 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
-/ReboundHub/Rebound11Files/Executables/Quick Full Computer Cleanup.exe
-/ReboundHub/Rebound11Files/Executables/QuickFullComputerCleanup.exe
diff --git a/About/App.xaml b/About/App.xaml
new file mode 100644
index 0000000..f9b8d88
--- /dev/null
+++ b/About/App.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/About/App.xaml.cs b/About/App.xaml.cs
new file mode 100644
index 0000000..c5b41a9
--- /dev/null
+++ b/About/App.xaml.cs
@@ -0,0 +1,50 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using Microsoft.UI.Xaml.Shapes;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Rebound.About
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ ///
+ /// Invoked when the application is launched.
+ ///
+ /// Details about the launch request and process.
+ protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
+ {
+ m_window = new MainWindow();
+ m_window.Activate();
+ }
+
+ private Window m_window;
+ }
+}
diff --git a/ReboundHub/Assets/LargeTile.scale-100.png b/About/Assets/LargeTile.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/LargeTile.scale-100.png
rename to About/Assets/LargeTile.scale-100.png
diff --git a/ReboundHub/Assets/LargeTile.scale-125.png b/About/Assets/LargeTile.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/LargeTile.scale-125.png
rename to About/Assets/LargeTile.scale-125.png
diff --git a/ReboundHub/Assets/LargeTile.scale-150.png b/About/Assets/LargeTile.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/LargeTile.scale-150.png
rename to About/Assets/LargeTile.scale-150.png
diff --git a/ReboundHub/Assets/LargeTile.scale-200.png b/About/Assets/LargeTile.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/LargeTile.scale-200.png
rename to About/Assets/LargeTile.scale-200.png
diff --git a/ReboundHub/Assets/LargeTile.scale-400.png b/About/Assets/LargeTile.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/LargeTile.scale-400.png
rename to About/Assets/LargeTile.scale-400.png
diff --git a/ReboundHub/Assets/LockScreenLogo.scale-200.png b/About/Assets/LockScreenLogo.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/LockScreenLogo.scale-200.png
rename to About/Assets/LockScreenLogo.scale-200.png
diff --git a/ReboundHub/Assets/AppIcons/ReboundHub.ico b/About/Assets/Rebound.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/ReboundHub.ico
rename to About/Assets/Rebound.ico
diff --git a/ReboundHub/Assets/SmallTile.scale-100.png b/About/Assets/SmallTile.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/SmallTile.scale-100.png
rename to About/Assets/SmallTile.scale-100.png
diff --git a/ReboundHub/Assets/SmallTile.scale-125.png b/About/Assets/SmallTile.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/SmallTile.scale-125.png
rename to About/Assets/SmallTile.scale-125.png
diff --git a/ReboundHub/Assets/SmallTile.scale-150.png b/About/Assets/SmallTile.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/SmallTile.scale-150.png
rename to About/Assets/SmallTile.scale-150.png
diff --git a/ReboundHub/Assets/SmallTile.scale-200.png b/About/Assets/SmallTile.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/SmallTile.scale-200.png
rename to About/Assets/SmallTile.scale-200.png
diff --git a/ReboundHub/Assets/SmallTile.scale-400.png b/About/Assets/SmallTile.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/SmallTile.scale-400.png
rename to About/Assets/SmallTile.scale-400.png
diff --git a/ReboundHub/Assets/SplashScreen.scale-100.png b/About/Assets/SplashScreen.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/SplashScreen.scale-100.png
rename to About/Assets/SplashScreen.scale-100.png
diff --git a/ReboundHub/Assets/SplashScreen.scale-125.png b/About/Assets/SplashScreen.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/SplashScreen.scale-125.png
rename to About/Assets/SplashScreen.scale-125.png
diff --git a/ReboundHub/Assets/SplashScreen.scale-150.png b/About/Assets/SplashScreen.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/SplashScreen.scale-150.png
rename to About/Assets/SplashScreen.scale-150.png
diff --git a/ReboundHub/Assets/SplashScreen.scale-200.png b/About/Assets/SplashScreen.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/SplashScreen.scale-200.png
rename to About/Assets/SplashScreen.scale-200.png
diff --git a/ReboundHub/Assets/SplashScreen.scale-400.png b/About/Assets/SplashScreen.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/SplashScreen.scale-400.png
rename to About/Assets/SplashScreen.scale-400.png
diff --git a/ReboundHub/Assets/Square150x150Logo.scale-100.png b/About/Assets/Square150x150Logo.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/Square150x150Logo.scale-100.png
rename to About/Assets/Square150x150Logo.scale-100.png
diff --git a/ReboundHub/Assets/Square150x150Logo.scale-125.png b/About/Assets/Square150x150Logo.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/Square150x150Logo.scale-125.png
rename to About/Assets/Square150x150Logo.scale-125.png
diff --git a/ReboundHub/Assets/Square150x150Logo.scale-150.png b/About/Assets/Square150x150Logo.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/Square150x150Logo.scale-150.png
rename to About/Assets/Square150x150Logo.scale-150.png
diff --git a/ReboundHub/Assets/Square150x150Logo.scale-200.png b/About/Assets/Square150x150Logo.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/Square150x150Logo.scale-200.png
rename to About/Assets/Square150x150Logo.scale-200.png
diff --git a/ReboundHub/Assets/Square150x150Logo.scale-400.png b/About/Assets/Square150x150Logo.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/Square150x150Logo.scale-400.png
rename to About/Assets/Square150x150Logo.scale-400.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/About/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
rename to About/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/About/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
rename to About/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/About/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
rename to About/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/About/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
rename to About/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/About/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
rename to About/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/About/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
rename to About/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/About/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
rename to About/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/About/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
rename to About/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
diff --git a/ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/About/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
rename to About/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
diff --git a/ReboundHub/Assets/Square44x44Logo.scale-100.png b/About/Assets/Square44x44Logo.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.scale-100.png
rename to About/Assets/Square44x44Logo.scale-100.png
diff --git a/ReboundHub/Assets/Square44x44Logo.scale-125.png b/About/Assets/Square44x44Logo.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.scale-125.png
rename to About/Assets/Square44x44Logo.scale-125.png
diff --git a/ReboundHub/Assets/Square44x44Logo.scale-150.png b/About/Assets/Square44x44Logo.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.scale-150.png
rename to About/Assets/Square44x44Logo.scale-150.png
diff --git a/ReboundHub/Assets/Square44x44Logo.scale-200.png b/About/Assets/Square44x44Logo.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.scale-200.png
rename to About/Assets/Square44x44Logo.scale-200.png
diff --git a/ReboundHub/Assets/Square44x44Logo.scale-400.png b/About/Assets/Square44x44Logo.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.scale-400.png
rename to About/Assets/Square44x44Logo.scale-400.png
diff --git a/ReboundHub/Assets/Square44x44Logo.targetsize-16.png b/About/Assets/Square44x44Logo.targetsize-16.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.targetsize-16.png
rename to About/Assets/Square44x44Logo.targetsize-16.png
diff --git a/ReboundHub/Assets/Square44x44Logo.targetsize-24.png b/About/Assets/Square44x44Logo.targetsize-24.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.targetsize-24.png
rename to About/Assets/Square44x44Logo.targetsize-24.png
diff --git a/ReboundHub/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/About/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
rename to About/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
diff --git a/ReboundHub/Assets/Square44x44Logo.targetsize-256.png b/About/Assets/Square44x44Logo.targetsize-256.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.targetsize-256.png
rename to About/Assets/Square44x44Logo.targetsize-256.png
diff --git a/ReboundHub/Assets/Square44x44Logo.targetsize-32.png b/About/Assets/Square44x44Logo.targetsize-32.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.targetsize-32.png
rename to About/Assets/Square44x44Logo.targetsize-32.png
diff --git a/ReboundHub/Assets/Square44x44Logo.targetsize-48.png b/About/Assets/Square44x44Logo.targetsize-48.png
similarity index 100%
rename from ReboundHub/Assets/Square44x44Logo.targetsize-48.png
rename to About/Assets/Square44x44Logo.targetsize-48.png
diff --git a/ReboundHub/Assets/StoreLogo.backup.png b/About/Assets/StoreLogo.backup.png
similarity index 100%
rename from ReboundHub/Assets/StoreLogo.backup.png
rename to About/Assets/StoreLogo.backup.png
diff --git a/ReboundHub/Assets/StoreLogo.scale-100.png b/About/Assets/StoreLogo.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/StoreLogo.scale-100.png
rename to About/Assets/StoreLogo.scale-100.png
diff --git a/ReboundHub/Assets/StoreLogo.scale-125.png b/About/Assets/StoreLogo.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/StoreLogo.scale-125.png
rename to About/Assets/StoreLogo.scale-125.png
diff --git a/ReboundHub/Assets/StoreLogo.scale-150.png b/About/Assets/StoreLogo.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/StoreLogo.scale-150.png
rename to About/Assets/StoreLogo.scale-150.png
diff --git a/ReboundHub/Assets/StoreLogo.scale-200.png b/About/Assets/StoreLogo.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/StoreLogo.scale-200.png
rename to About/Assets/StoreLogo.scale-200.png
diff --git a/ReboundHub/Assets/StoreLogo.scale-400.png b/About/Assets/StoreLogo.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/StoreLogo.scale-400.png
rename to About/Assets/StoreLogo.scale-400.png
diff --git a/ReboundHub/Assets/Wide310x150Logo.scale-100.png b/About/Assets/Wide310x150Logo.scale-100.png
similarity index 100%
rename from ReboundHub/Assets/Wide310x150Logo.scale-100.png
rename to About/Assets/Wide310x150Logo.scale-100.png
diff --git a/ReboundHub/Assets/Wide310x150Logo.scale-125.png b/About/Assets/Wide310x150Logo.scale-125.png
similarity index 100%
rename from ReboundHub/Assets/Wide310x150Logo.scale-125.png
rename to About/Assets/Wide310x150Logo.scale-125.png
diff --git a/ReboundHub/Assets/Wide310x150Logo.scale-150.png b/About/Assets/Wide310x150Logo.scale-150.png
similarity index 100%
rename from ReboundHub/Assets/Wide310x150Logo.scale-150.png
rename to About/Assets/Wide310x150Logo.scale-150.png
diff --git a/ReboundHub/Assets/Wide310x150Logo.scale-200.png b/About/Assets/Wide310x150Logo.scale-200.png
similarity index 100%
rename from ReboundHub/Assets/Wide310x150Logo.scale-200.png
rename to About/Assets/Wide310x150Logo.scale-200.png
diff --git a/ReboundHub/Assets/Wide310x150Logo.scale-400.png b/About/Assets/Wide310x150Logo.scale-400.png
similarity index 100%
rename from ReboundHub/Assets/Wide310x150Logo.scale-400.png
rename to About/Assets/Wide310x150Logo.scale-400.png
diff --git a/About/MainWindow.xaml b/About/MainWindow.xaml
new file mode 100644
index 0000000..942c9c9
--- /dev/null
+++ b/About/MainWindow.xaml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/About/MainWindow.xaml.cs b/About/MainWindow.xaml.cs
new file mode 100644
index 0000000..96c4cbf
--- /dev/null
+++ b/About/MainWindow.xaml.cs
@@ -0,0 +1,168 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Win32;
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Management;
+using System.Threading.Tasks;
+using Windows.ApplicationModel.DataTransfer;
+using WinUIEx;
+
+namespace Rebound.About
+{
+ public sealed partial class MainWindow : WindowEx
+ {
+ public MainWindow()
+ {
+ this.InitializeComponent();
+ this.AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ this.IsMaximizable = false;
+ this.IsMinimizable = false;
+ this.MinWidth = 650;
+ this.MoveAndResize(25, 25, 650, 690);
+ this.Title = "About Windows";
+ this.IsResizable = false;
+ this.SystemBackdrop = new MicaBackdrop();
+ this.SetIcon($"{AppContext.BaseDirectory}\\Assets\\Rebound.ico");
+ User.Text = GetCurrentUserName();
+ Version.Text = GetDetailedWindowsVersion();
+ LegalStuff.Text = GetLegalInfo();
+ Load();
+ }
+
+ public async void Load()
+ {
+ await Task.Delay(100);
+
+ this.SetWindowSize(WinverPanel.ActualWidth + 60, 690);
+ }
+
+ public static string GetDetailedWindowsVersion()
+ {
+ try
+ {
+ // Open the registry key
+ using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion"))
+ {
+ if (key != null)
+ {
+ // Retrieve build number and revision
+ var versionName = key.GetValue("DisplayVersion", "Unknown") as string;
+ var buildNumber = key.GetValue("CurrentBuildNumber", "Unknown") as string;
+ var buildLab = key.GetValue("UBR", "Unknown");
+
+ return $"Version {versionName} (OS Build {buildNumber}.{buildLab})";
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ return $"Error retrieving OS version details: {ex.Message}";
+ }
+
+ return "Registry key not found";
+ }
+
+ public string GetLegalInfo()
+ {
+ try
+ {
+ var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
+
+ foreach (ManagementObject os in searcher.Get().Cast())
+ {
+ var caption = os["Caption"];
+ var version = os["Version"];
+ var buildNumber = os["BuildNumber"];
+
+ if (caption.ToString().Contains("10")) windowsVer = "Windows 10";
+ else windowsVer = "Windows 11";
+
+ WindowsVer.Text = caption.ToString().Replace("Microsoft ", "");
+
+ return $"The {caption.ToString().Replace("Microsoft ", "")} operating system and its user interface are protected by trademark and other pending or existing intellectual property rights in the United States and other countries/regions.";
+ }
+ }
+ catch (Exception ex)
+ {
+ return $"Error retrieving OS edition details: {ex.Message}";
+ }
+
+ return "WMI query returned no results";
+ }
+
+ public static string GetCurrentUserName()
+ {
+ try
+ {
+ // Open the registry key
+ using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion"))
+ {
+ if (key != null)
+ {
+ // Retrieve build number and revision
+ var owner = key.GetValue("RegisteredOwner", "Unknown") as string;
+
+ return owner;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ return $"Error retrieving OS version details: {ex.Message}";
+ }
+
+ return "Registry key not found";
+ }
+
+ private async void Button_Click(object sender, RoutedEventArgs e)
+ {
+ var info = new ProcessStartInfo()
+ {
+ FileName = "powershell",
+ Arguments = "winver",
+ UseShellExecute = false,
+ CreateNoWindow = true
+ };
+
+ var proc = Process.Start(info);
+
+ await proc.WaitForExitAsync();
+
+ Close();
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ Close();
+ }
+
+ string windowsVer = "Windows";
+
+ private void Button_Click_2(object sender, RoutedEventArgs e)
+ {
+ string content = $@"==========================
+---Microsoft {windowsVer}---
+==========================
+
+{GetDetailedWindowsVersion()}
+� Microsoft Corporation. All rights reserved.
+
+{GetLegalInfo()}
+
+This product is licensed under the [Microsoft Software License Terms] (https://support.microsoft.com/en-us/windows/microsoft-software-license-terms-e26eedad-97a2-5250-2670-aad156b654bd) to: {GetCurrentUserName()}
+
+==========================
+--------Rebound 11--------
+==========================
+
+{ReboundVer.Text}
+
+Rebound 11 is a Windows mod that does not interfere with the system. The current Windows installation contains additional apps to run Rebound 11.";
+ var package = new DataPackage();
+ package.SetText(content);
+ Clipboard.SetContent(package);
+ }
+ }
+}
diff --git a/About/Package.appxmanifest b/About/Package.appxmanifest
new file mode 100644
index 0000000..5108d15
--- /dev/null
+++ b/About/Package.appxmanifest
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ Rebound.About
+ Lenovo
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/About/Properties/launchSettings.json b/About/Properties/launchSettings.json
new file mode 100644
index 0000000..8e92a6d
--- /dev/null
+++ b/About/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "Rebound.About (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "Rebound.About (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/About/Rebound.About.csproj b/About/Rebound.About.csproj
new file mode 100644
index 0000000..2482aea
--- /dev/null
+++ b/About/Rebound.About.csproj
@@ -0,0 +1,65 @@
+
+
+ WinExe
+ net8.0-windows10.0.19041.0
+ 10.0.17763.0
+ Rebound.About
+ app.manifest
+ x86;x64;ARM64
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ win-$(Platform).pubxml
+ true
+ true
+ 10.0.22621.35-preview
+ True
+ True
+ 3A171B4CC25BF8365620669A928F4BF543826E6F
+ SHA256
+ False
+ False
+ True
+ Never
+ C:/Users/Lenovo/Desktop
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/About/app.manifest b/About/app.manifest
new file mode 100644
index 0000000..6e338aa
--- /dev/null
+++ b/About/app.manifest
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
\ No newline at end of file
diff --git a/Cleanup/App.xaml b/Cleanup/App.xaml
new file mode 100644
index 0000000..bcef8ed
--- /dev/null
+++ b/Cleanup/App.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Cleanup/App.xaml.cs b/Cleanup/App.xaml.cs
new file mode 100644
index 0000000..69b9f78
--- /dev/null
+++ b/Cleanup/App.xaml.cs
@@ -0,0 +1,59 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using Microsoft.UI.Xaml.Shapes;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using System.Threading.Tasks;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Rebound.Cleanup
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ ///
+ /// Invoked when the application is launched.
+ ///
+ /// Details about the launch request and process.
+ protected override async void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
+ {
+ string commandArgs = string.Join(" ", Environment.GetCommandLineArgs().Skip(1));
+
+ m_window = new MainWindow(commandArgs);
+ m_window.Activate();
+
+ if (string.IsNullOrEmpty(commandArgs) != true)
+ {
+ await Task.Delay(100);
+ await (m_window as MainWindow).ArgumentsLaunch(commandArgs.Substring(0, 2));
+ }
+ }
+
+ private Window m_window;
+ }
+}
diff --git a/Cleanup/Assets/DDORes_2001.ico b/Cleanup/Assets/DDORes_2001.ico
new file mode 100644
index 0000000..c421be5
Binary files /dev/null and b/Cleanup/Assets/DDORes_2001.ico differ
diff --git a/ReboundHub/Assets/AppIcons/EventViewer.png b/Cleanup/Assets/EventViewer.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/EventViewer.png
rename to Cleanup/Assets/EventViewer.png
diff --git a/Cleanup/Assets/LargeTile.scale-100.png b/Cleanup/Assets/LargeTile.scale-100.png
new file mode 100644
index 0000000..aec1939
Binary files /dev/null and b/Cleanup/Assets/LargeTile.scale-100.png differ
diff --git a/Cleanup/Assets/LargeTile.scale-125.png b/Cleanup/Assets/LargeTile.scale-125.png
new file mode 100644
index 0000000..1e8ad5d
Binary files /dev/null and b/Cleanup/Assets/LargeTile.scale-125.png differ
diff --git a/Cleanup/Assets/LargeTile.scale-150.png b/Cleanup/Assets/LargeTile.scale-150.png
new file mode 100644
index 0000000..3016372
Binary files /dev/null and b/Cleanup/Assets/LargeTile.scale-150.png differ
diff --git a/Cleanup/Assets/LargeTile.scale-200.png b/Cleanup/Assets/LargeTile.scale-200.png
new file mode 100644
index 0000000..016c25d
Binary files /dev/null and b/Cleanup/Assets/LargeTile.scale-200.png differ
diff --git a/Cleanup/Assets/LargeTile.scale-400.png b/Cleanup/Assets/LargeTile.scale-400.png
new file mode 100644
index 0000000..c559409
Binary files /dev/null and b/Cleanup/Assets/LargeTile.scale-400.png differ
diff --git a/Cleanup/Assets/LockScreenLogo.scale-200.png b/Cleanup/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/Cleanup/Assets/LockScreenLogo.scale-200.png differ
diff --git a/Cleanup/Assets/SmallTile.scale-100.png b/Cleanup/Assets/SmallTile.scale-100.png
new file mode 100644
index 0000000..6e9b062
Binary files /dev/null and b/Cleanup/Assets/SmallTile.scale-100.png differ
diff --git a/Cleanup/Assets/SmallTile.scale-125.png b/Cleanup/Assets/SmallTile.scale-125.png
new file mode 100644
index 0000000..6963c03
Binary files /dev/null and b/Cleanup/Assets/SmallTile.scale-125.png differ
diff --git a/Cleanup/Assets/SmallTile.scale-150.png b/Cleanup/Assets/SmallTile.scale-150.png
new file mode 100644
index 0000000..5300196
Binary files /dev/null and b/Cleanup/Assets/SmallTile.scale-150.png differ
diff --git a/Cleanup/Assets/SmallTile.scale-200.png b/Cleanup/Assets/SmallTile.scale-200.png
new file mode 100644
index 0000000..4804b3a
Binary files /dev/null and b/Cleanup/Assets/SmallTile.scale-200.png differ
diff --git a/Cleanup/Assets/SmallTile.scale-400.png b/Cleanup/Assets/SmallTile.scale-400.png
new file mode 100644
index 0000000..d0ca1a8
Binary files /dev/null and b/Cleanup/Assets/SmallTile.scale-400.png differ
diff --git a/Cleanup/Assets/SplashScreen.scale-100.png b/Cleanup/Assets/SplashScreen.scale-100.png
new file mode 100644
index 0000000..82b5d40
Binary files /dev/null and b/Cleanup/Assets/SplashScreen.scale-100.png differ
diff --git a/Cleanup/Assets/SplashScreen.scale-125.png b/Cleanup/Assets/SplashScreen.scale-125.png
new file mode 100644
index 0000000..203dfa8
Binary files /dev/null and b/Cleanup/Assets/SplashScreen.scale-125.png differ
diff --git a/Cleanup/Assets/SplashScreen.scale-150.png b/Cleanup/Assets/SplashScreen.scale-150.png
new file mode 100644
index 0000000..9a255f4
Binary files /dev/null and b/Cleanup/Assets/SplashScreen.scale-150.png differ
diff --git a/Cleanup/Assets/SplashScreen.scale-200.png b/Cleanup/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..6d07ee9
Binary files /dev/null and b/Cleanup/Assets/SplashScreen.scale-200.png differ
diff --git a/Cleanup/Assets/SplashScreen.scale-400.png b/Cleanup/Assets/SplashScreen.scale-400.png
new file mode 100644
index 0000000..83df478
Binary files /dev/null and b/Cleanup/Assets/SplashScreen.scale-400.png differ
diff --git a/Cleanup/Assets/Square150x150Logo.scale-100.png b/Cleanup/Assets/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..156b041
Binary files /dev/null and b/Cleanup/Assets/Square150x150Logo.scale-100.png differ
diff --git a/Cleanup/Assets/Square150x150Logo.scale-125.png b/Cleanup/Assets/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..7afd577
Binary files /dev/null and b/Cleanup/Assets/Square150x150Logo.scale-125.png differ
diff --git a/Cleanup/Assets/Square150x150Logo.scale-150.png b/Cleanup/Assets/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..c7e4750
Binary files /dev/null and b/Cleanup/Assets/Square150x150Logo.scale-150.png differ
diff --git a/Cleanup/Assets/Square150x150Logo.scale-200.png b/Cleanup/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..d78f22d
Binary files /dev/null and b/Cleanup/Assets/Square150x150Logo.scale-200.png differ
diff --git a/Cleanup/Assets/Square150x150Logo.scale-400.png b/Cleanup/Assets/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..8ff9329
Binary files /dev/null and b/Cleanup/Assets/Square150x150Logo.scale-400.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..b6bcb7f
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..61a7d8a
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..6d983cb
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..1c989a4
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..e62ec2f
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..b6bcb7f
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..6d983cb
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..1c989a4
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..e62ec2f
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.scale-100.png b/Cleanup/Assets/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..85594ab
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.scale-100.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.scale-125.png b/Cleanup/Assets/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..3920f01
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.scale-125.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.scale-150.png b/Cleanup/Assets/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..0e14d6d
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.scale-150.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.scale-200.png b/Cleanup/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..081ff6d
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.scale-200.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.scale-400.png b/Cleanup/Assets/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..267d6d3
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.scale-400.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.targetsize-16.png b/Cleanup/Assets/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..d5e23d9
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.targetsize-16.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.targetsize-24.png b/Cleanup/Assets/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..de5bd14
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.targetsize-24.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Cleanup/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..61a7d8a
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.targetsize-256.png b/Cleanup/Assets/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..5e29b6e
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.targetsize-256.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.targetsize-32.png b/Cleanup/Assets/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..932386c
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.targetsize-32.png differ
diff --git a/Cleanup/Assets/Square44x44Logo.targetsize-48.png b/Cleanup/Assets/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..36f4b66
Binary files /dev/null and b/Cleanup/Assets/Square44x44Logo.targetsize-48.png differ
diff --git a/Cleanup/Assets/StoreLogo.backup.png b/Cleanup/Assets/StoreLogo.backup.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/Cleanup/Assets/StoreLogo.backup.png differ
diff --git a/Cleanup/Assets/StoreLogo.scale-100.png b/Cleanup/Assets/StoreLogo.scale-100.png
new file mode 100644
index 0000000..4c829d4
Binary files /dev/null and b/Cleanup/Assets/StoreLogo.scale-100.png differ
diff --git a/Cleanup/Assets/StoreLogo.scale-125.png b/Cleanup/Assets/StoreLogo.scale-125.png
new file mode 100644
index 0000000..ed7b937
Binary files /dev/null and b/Cleanup/Assets/StoreLogo.scale-125.png differ
diff --git a/Cleanup/Assets/StoreLogo.scale-150.png b/Cleanup/Assets/StoreLogo.scale-150.png
new file mode 100644
index 0000000..f25f3ae
Binary files /dev/null and b/Cleanup/Assets/StoreLogo.scale-150.png differ
diff --git a/Cleanup/Assets/StoreLogo.scale-200.png b/Cleanup/Assets/StoreLogo.scale-200.png
new file mode 100644
index 0000000..2d81107
Binary files /dev/null and b/Cleanup/Assets/StoreLogo.scale-200.png differ
diff --git a/Cleanup/Assets/StoreLogo.scale-400.png b/Cleanup/Assets/StoreLogo.scale-400.png
new file mode 100644
index 0000000..d032954
Binary files /dev/null and b/Cleanup/Assets/StoreLogo.scale-400.png differ
diff --git a/Cleanup/Assets/Wide310x150Logo.scale-100.png b/Cleanup/Assets/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..1d189db
Binary files /dev/null and b/Cleanup/Assets/Wide310x150Logo.scale-100.png differ
diff --git a/Cleanup/Assets/Wide310x150Logo.scale-125.png b/Cleanup/Assets/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..4e488d5
Binary files /dev/null and b/Cleanup/Assets/Wide310x150Logo.scale-125.png differ
diff --git a/Cleanup/Assets/Wide310x150Logo.scale-150.png b/Cleanup/Assets/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..a196a6f
Binary files /dev/null and b/Cleanup/Assets/Wide310x150Logo.scale-150.png differ
diff --git a/Cleanup/Assets/Wide310x150Logo.scale-200.png b/Cleanup/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..82b5d40
Binary files /dev/null and b/Cleanup/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/Cleanup/Assets/Wide310x150Logo.scale-400.png b/Cleanup/Assets/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..6d07ee9
Binary files /dev/null and b/Cleanup/Assets/Wide310x150Logo.scale-400.png differ
diff --git a/ReboundHub/Assets/AppIcons/cleanmgr.ico b/Cleanup/Assets/cleanmgr.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/cleanmgr.ico
rename to Cleanup/Assets/cleanmgr.ico
diff --git a/Cleanup/Assets/cleanmgr.png b/Cleanup/Assets/cleanmgr.png
new file mode 100644
index 0000000..6ee5316
Binary files /dev/null and b/Cleanup/Assets/cleanmgr.png differ
diff --git a/Cleanup/Assets/imageres_184.ico b/Cleanup/Assets/imageres_184.ico
new file mode 100644
index 0000000..09495fe
Binary files /dev/null and b/Cleanup/Assets/imageres_184.ico differ
diff --git a/Cleanup/Assets/imageres_2.ico b/Cleanup/Assets/imageres_2.ico
new file mode 100644
index 0000000..1f9c65c
Binary files /dev/null and b/Cleanup/Assets/imageres_2.ico differ
diff --git a/Cleanup/Assets/imageres_3.ico b/Cleanup/Assets/imageres_3.ico
new file mode 100644
index 0000000..f969029
Binary files /dev/null and b/Cleanup/Assets/imageres_3.ico differ
diff --git a/Cleanup/Assets/imageres_5364.ico b/Cleanup/Assets/imageres_5364.ico
new file mode 100644
index 0000000..e7b8e3a
Binary files /dev/null and b/Cleanup/Assets/imageres_5364.ico differ
diff --git a/Cleanup/Assets/imageres_54.ico b/Cleanup/Assets/imageres_54.ico
new file mode 100644
index 0000000..7bfd3dd
Binary files /dev/null and b/Cleanup/Assets/imageres_54.ico differ
diff --git a/Cleanup/Assets/imageres_59.ico b/Cleanup/Assets/imageres_59.ico
new file mode 100644
index 0000000..6b8d9f1
Binary files /dev/null and b/Cleanup/Assets/imageres_59.ico differ
diff --git a/ReboundHub/Rebound11Files/Rebound11/r11foldericon.ico b/Cleanup/Assets/r11imageres_101.ico
similarity index 100%
rename from ReboundHub/Rebound11Files/Rebound11/r11foldericon.ico
rename to Cleanup/Assets/r11imageres_101.ico
diff --git a/Cleanup/DiskWindow.xaml b/Cleanup/DiskWindow.xaml
new file mode 100644
index 0000000..6352780
--- /dev/null
+++ b/Cleanup/DiskWindow.xaml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Cleanup/DiskWindow.xaml.cs b/Cleanup/DiskWindow.xaml.cs
new file mode 100644
index 0000000..cd00c0e
--- /dev/null
+++ b/Cleanup/DiskWindow.xaml.cs
@@ -0,0 +1,1053 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Design;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Runtime.InteropServices.WindowsRuntime;
+using System.Security.Principal;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.Storage;
+using Windows.System;
+using Windows.UI.Shell;
+using Windows.UI.WindowManagement;
+using WinUIEx;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Rebound.Cleanup
+{
+ public class CleanItem
+ {
+ public string Name { get; set; }
+ public string ImagePath { get; set; }
+ public string ItemPath { get; set; }
+ public string Description { get; set; }
+ public string DisplaySize { get; set; }
+ public long Size { get; set; }
+ public bool IsChecked { get; set; }
+ }
+
+ ///
+ /// An empty window that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class DiskWindow : WindowEx
+ {
+ public long GetFolderLongSize(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return 0;
+ }
+
+ long totalSize = 0;
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ totalSize += fileInfo.Length;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return 0;
+ }
+ catch (IOException ex)
+ {
+ return 0;
+ }
+ catch (Exception ex)
+ {
+ return 0;
+ }
+
+ // Format the size into appropriate units
+ return totalSize;
+ }
+
+ private void CleanupDriverStore()
+ {
+ try
+ {
+ string driverStorePath = @"C:\Windows\System32\DriverStore\FileRepository";
+
+ // Fetch all directories in the DriverStore
+ var directories = Directory.GetDirectories(driverStorePath);
+
+ foreach (var dir in directories)
+ {
+ // Check if the directory is unused or old
+ // In this example, we assume that if a directory was last accessed over 30 days ago, it's unnecessary.
+ var lastAccessTime = Directory.GetLastAccessTime(dir);
+ if (lastAccessTime < DateTime.Now.AddDays(-30))
+ {
+ try
+ {
+ Directory.Delete(dir, true);
+ Debug.WriteLine($"Deleted: {dir}");
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"Error deleting {dir}: {ex.Message}");
+ }
+ }
+ }
+
+ Debug.WriteLine("Driver Store Cleanup Completed.");
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"An error occurred during cleanup: {ex.Message}");
+ }
+ }
+
+ public long GetFolderLongSizeDrivers(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return 0;
+ }
+
+ long totalSize = 0;
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ if (fileInfo.LastAccessTime < DateTime.Now.AddDays(-30)) totalSize += fileInfo.Length;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return 0;
+ }
+ catch (IOException ex)
+ {
+ return 0;
+ }
+ catch (Exception ex)
+ {
+ return 0;
+ }
+
+ // Format the size into appropriate units
+ return totalSize;
+ }
+
+ public string GetFolderSizeDrivers(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return "0 B";
+ }
+
+ long totalSize = 0;
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ if (fileInfo.LastAccessTime < DateTime.Now.AddDays(-30)) totalSize += fileInfo.Length;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return "0 B";
+ }
+ catch (IOException ex)
+ {
+ return "0 B";
+ }
+ catch (Exception ex)
+ {
+ return "0 B";
+ }
+
+ // Format the size into appropriate units
+ return FormatSize(totalSize);
+ }
+
+ public long GetFolderLongSizeDB(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return 0;
+ }
+
+ long totalSize = 0;
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ if (fileInfo.Extension.Contains("db") && fileInfo.Name.Contains("thumbcache") == true) totalSize += fileInfo.Length;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return 0;
+ }
+ catch (IOException ex)
+ {
+ return 0;
+ }
+ catch (Exception ex)
+ {
+ return 0;
+ }
+
+ // Format the size into appropriate units
+ return totalSize;
+ }
+
+ public string GetFolderSize(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return "0 B";
+ }
+
+ long totalSize = 0;
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ totalSize += fileInfo.Length;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return "Access Denied";
+ }
+ catch (IOException ex)
+ {
+ return "IO Error";
+ }
+ catch (Exception ex)
+ {
+ return "Unknown Error";
+ }
+
+ // Format the size into appropriate units
+ return FormatSize(totalSize);
+ }
+
+ public void DeleteFiles(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return;
+ }
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ File.Delete(file);
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return;
+ }
+ catch (IOException ex)
+ {
+ return;
+ }
+ catch (Exception ex)
+ {
+ return;
+ }
+ }
+
+ public void DeleteFilesDB(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return;
+ }
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ if (fileInfo.Extension.Contains("db") && fileInfo.Name.Contains("thumbcache") == true) File.Delete(file);
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return;
+ }
+ catch (IOException ex)
+ {
+ return;
+ }
+ catch (Exception ex)
+ {
+ return;
+ }
+ }
+
+ public string GetFolderSizeDB(string folderPath)
+ {
+ // Check if the directory exists
+ if (!Directory.Exists(folderPath))
+ {
+ return "0 B";
+ }
+
+ long totalSize = 0;
+
+ try
+ {
+ // Enumerate files and directories
+ foreach (var file in EnumerateFiles(folderPath))
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(file);
+ Debug.WriteLine($"NAME: {fileInfo.Name} || EXTENSION: {fileInfo.Extension}");
+ if (fileInfo.Extension.Contains("db") && fileInfo.Name.Contains("thumbcache") == true) totalSize += fileInfo.Length;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ Debug.WriteLine("ERR");
+ // Skip files we cannot access
+ }
+ catch (IOException ex)
+ {
+ Debug.WriteLine("ERR");
+ // Handle other IO exceptions
+ }
+ }
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return "Access Denied";
+ }
+ catch (IOException ex)
+ {
+ return "IO Error";
+ }
+ catch (Exception ex)
+ {
+ return "Unknown Error";
+ }
+
+ // Format the size into appropriate units
+ return FormatSize(totalSize);
+ }
+
+ private IEnumerable EnumerateFiles(string folderPath)
+ {
+ var directoriesToProcess = new Stack(new[] { folderPath });
+
+ while (directoriesToProcess.Count > 0)
+ {
+ string currentDir = directoriesToProcess.Pop();
+
+ IEnumerable files = GetFilesSafe(currentDir);
+ foreach (string file in files)
+ {
+ yield return file;
+ }
+
+ IEnumerable subDirs = GetDirectoriesSafe(currentDir);
+ foreach (string subDir in subDirs)
+ {
+ directoriesToProcess.Push(subDir);
+ }
+ }
+ }
+
+ private IEnumerable GetFilesSafe(string directory)
+ {
+ try
+ {
+ return Directory.EnumerateFiles(directory);
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip directories we cannot access
+ return Array.Empty();
+ }
+ catch (IOException ex)
+ {
+ // Handle IO exceptions for directory operations
+ return Array.Empty();
+ }
+ }
+
+ private IEnumerable GetDirectoriesSafe(string directory)
+ {
+ try
+ {
+ return Directory.EnumerateDirectories(directory);
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // Skip directories we cannot access
+ return Array.Empty();
+ }
+ catch (IOException ex)
+ {
+ // Handle IO exceptions for directory operations
+ return Array.Empty();
+ }
+ }
+
+ private string FormatSize(long sizeInBytes)
+ {
+ if (sizeInBytes < 1024)
+ return $"{sizeInBytes} B";
+ else if (sizeInBytes < 1024 * 1024)
+ return $"{sizeInBytes / 1024.0:F2} KB";
+ else if (sizeInBytes < 1024 * 1024 * 1024)
+ return $"{sizeInBytes / (1024.0 * 1024):F2} MB";
+ else if (sizeInBytes < 1024L * 1024 * 1024 * 1024)
+ return $"{sizeInBytes / (1024.0 * 1024 * 1024):F2} GB";
+ else if (sizeInBytes < 1024L * 1024 * 1024 * 1024 * 1024)
+ return $"{sizeInBytes / (1024.0 * 1024 * 1024 * 1024):F2} TB";
+ else
+ return $"{sizeInBytes / (1024.0 * 1024 * 1024 * 1024 * 1024):F2} PB";
+ }
+
+ public List items = new List();
+
+ public string Disk = "";
+
+ public DiskWindow(string disk)
+ {
+ Disk = disk;
+ this.InitializeComponent();
+ if (IsAdministrator() == true) SysFilesButton.Visibility = Visibility.Collapsed;
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Temporary Internet Files",
+ ItemPath = $@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\Windows\INetCache",
+ ImagePath = "ms-appx:///Assets/imageres_59.ico",
+ Size = GetFolderLongSize($@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\Windows\INetCache"),
+ DisplaySize = GetFolderSize($@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\Windows\INetCache"),
+ Description = "These files are cached copies of web pages, images, and other online media from websites you've visited. They help speed up loading times when you revisit those sites. Deleting these files will free up space but might slow down page loading temporarily until the cache is rebuilt.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Downloaded Program Files",
+ ItemPath = @"C:\Windows\Downloaded Program Files",
+ ImagePath = "ms-appx:///Assets/imageres_3.ico",
+ Size = GetFolderLongSize(@"C:\Windows\Downloaded Program Files"),
+ DisplaySize = GetFolderSize(@"C:\Windows\Downloaded Program Files"),
+ Description = "This category includes ActiveX controls and Java applets that were automatically downloaded from the Internet when you view certain web pages. These files are temporarily stored on your computer to speed up the loading of the pages when you revisit them. They can be safely deleted if not needed.",
+ IsChecked = true,
+ });
+ }
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Rebound 11 temporary files",
+ ItemPath = @"C:\Rebound11\Temp",
+ ImagePath = "ms-appx:///Assets/r11imageres_101.ico",
+ Size = GetFolderLongSize(@"C:\Rebound11\Temp"),
+ DisplaySize = GetFolderSize(@"C:\Rebound11\Temp"),
+ Description = "Rebound 11 might sometimes copy packages and other files to a special temp folder in order for PowerShell to read the paths easier when installing.",
+ IsChecked = true,
+ });
+ }
+ items.Add(new CleanItem
+ {
+ Name = $"Recycle Bin",
+ ItemPath = $@"{disk}\$Recycle.Bin",
+ ImagePath = "ms-appx:///Assets/imageres_54.ico",
+ Size = GetFolderLongSize($@"{disk}\$Recycle.Bin"),
+ DisplaySize = GetFolderSize($@"{disk}\$Recycle.Bin"),
+ Description = "The Recycle Bin stores files and folders that you�ve deleted from your computer. These items are not permanently removed until you empty the Recycle Bin. You can recover deleted items from here, but deleting them permanently frees up disk space.",
+ IsChecked = true,
+ });
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Temporary Files",
+ ItemPath = $@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Temp",
+ ImagePath = "ms-appx:///Assets/imageres_2.ico",
+ Size = GetFolderLongSize($@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Temp"),
+ DisplaySize = GetFolderSize($@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Temp"),
+ Description = "These are files created by the operating system and applications inside the AppData folder for temporary use. They are often created during the installation of software or while programs are running. These files can usually be safely deleted once the system or application is done with them.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Thumbnails",
+ ItemPath = $@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\Windows\Explorer",
+ ImagePath = "ms-appx:///Assets/imageres_2.ico",
+ Size = GetFolderLongSizeDB($@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\Windows\Explorer"),
+ DisplaySize = GetFolderSizeDB($@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\Microsoft\Windows\Explorer"),
+ Description = "Thumbnails are small images used to preview the content of files, such as pictures and videos, within folders. The system caches these images to display them quickly. Deleting thumbnail caches will free up space but will cause the system to regenerate them when needed.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"System Created Windows Error Reporting",
+ ItemPath = $@"C:\ProgramData\Microsoft\Windows\WER",
+ ImagePath = "ms-appx:///Assets/EventViewer.png",
+ Size = GetFolderLongSize($@"C:\ProgramData\Microsoft\Windows\WER"),
+ DisplaySize = GetFolderSize($@"C:\ProgramData\Microsoft\Windows\WER"),
+ Description = "These are files generated when your system encounters an error. They contain data that can be used to troubleshoot and diagnose issues with your system. If the reports have been sent to Microsoft or are no longer needed, they can be deleted to free up space.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:")
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Downloads Folder (Current User)",
+ ItemPath = $@"{KnownFolders.GetPath(KnownFolder.Downloads)}",
+ ImagePath = "ms-appx:///Assets/imageres_184.ico",
+ Size = GetFolderLongSize($@"{KnownFolders.GetPath(KnownFolder.Downloads)}"),
+ DisplaySize = GetFolderSize($@"{KnownFolders.GetPath(KnownFolder.Downloads)}"),
+ Description = "The current user's downloads folder. When you download a file from the web, it will usually be placed here.",
+ IsChecked = true,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"System Cache Files",
+ ItemPath = $@"C:\Windows\Prefetch\",
+ ImagePath = "ms-appx:///Assets/imageres_2.ico",
+ Size = GetFolderLongSize($@"C:\Windows\Prefetch\"),
+ DisplaySize = GetFolderSize($@"C:\Windows\Prefetch\"),
+ Description = "These include various files used by the system to speed up operations. Examples include prefetch files that help applications start faster and font cache files that speed up font rendering. Deleting these files can reclaim space but might temporarily slow down some operations.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Windows Update Cache Files",
+ ItemPath = $@"C:\Windows\SoftwareDistribution",
+ ImagePath = "ms-appx:///Assets/imageres_2.ico",
+ Size = GetFolderLongSize($@"C:\Windows\SoftwareDistribution"),
+ DisplaySize = GetFolderSize($@"C:\Windows\SoftwareDistribution"),
+ Description = "Disk Cleanup can remove files that are no longer needed after installing Windows updates. These include old versions of files that have been updated, which can sometimes take up significant disk space. Deleting these files will make it harder to uninstall updates.",
+ IsChecked = true,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Previous Windows Installations",
+ ItemPath = $@"C:\Windows.old",
+ ImagePath = "ms-appx:///Assets/imageres_2.ico",
+ Size = GetFolderLongSize($@"C:\Windows.old"),
+ DisplaySize = GetFolderSize($@"C:\Windows.old"),
+ Description = "If you�ve recently upgraded to a newer version of Windows, files from the previous installation are kept in the Windows.old folder in case you need to revert to the earlier version. Deleting these files will permanently remove the ability to roll back to the previous version.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"System Error Memory Dump Files",
+ ItemPath = $@"C:\Windows\MEMORY.DMP",
+ ImagePath = "ms-appx:///Assets/EventViewer.png",
+ Size = GetFolderLongSize($@"C:\Windows\MEMORY.DMP"),
+ DisplaySize = GetFolderSize($@"C:\Windows\MEMORY.DMP"),
+ Description = "These files are created when Windows crashes and contain a copy of the memory at the time of the crash. They can be used to diagnose the cause of the crash. Large memory dumps can take up significant space and can be safely deleted if no longer needed.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"System Error Minidump Files",
+ ItemPath = $@"C:\Windows\Minidump",
+ ImagePath = "ms-appx:///Assets/EventViewer.png",
+ Size = GetFolderLongSize($@"C:\Windows\Minidump"),
+ DisplaySize = GetFolderSize($@"C:\Windows\Minidump"),
+ Description = "Minidumps are smaller versions of memory dump files created when the system crashes. They contain essential information to diagnose the cause of the crash but are smaller in size than full memory dumps. These can be deleted if you no longer need to troubleshoot a crash.",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Temporary Windows Installation Files",
+ ItemPath = $@"C:\Windows\Temp",
+ ImagePath = "ms-appx:///Assets/imageres_2.ico",
+ Size = GetFolderLongSize($@"C:\Windows\Temp"),
+ DisplaySize = GetFolderSize($@"C:\Windows\Temp"),
+ Description = "These files are created during the installation or updating of Windows. They help ensure the installation process runs smoothly and are typically deleted once the process is complete. Deleting them frees up space without affecting system stability.\r\n",
+ IsChecked = false,
+ });
+ }
+ if (disk == "C:" && IsAdministrator() == true)
+ {
+ items.Add(new CleanItem
+ {
+ Name = $"Device Driver Packages",
+ ItemPath = @"C:\Windows\System32\DriverStore\FileRepository",
+ ImagePath = "ms-appx:///Assets/DDORes_2001.ico",
+ Size = GetFolderLongSizeDrivers(@"C:\Windows\System32\DriverStore\FileRepository"),
+ DisplaySize = GetFolderSizeDrivers(@"C:\Windows\System32\DriverStore\FileRepository"),
+ Description = "These are files related to hardware drivers installed on your system. They are used by Windows to manage hardware devices and ensure proper functionality. Over time, old or unused driver packages may accumulate and take up disk space. Cleaning up these packages can help free up storage and keep your system organized. Only outdated or redundant packages will be removed, while active drivers will remain unaffected.",
+ IsChecked = false,
+ });
+ }
+
+ long size = 0;
+
+ foreach (var item in items)
+ {
+ size += item.Size;
+ }
+
+ // Sort the list alphabetically by the Name property
+ items.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.Ordinal));
+ CleanItems.ItemsSource = items;
+
+ Title.Title = $"You can use Disk Cleanup to free up to {FormatSize(size)} of disk space on ({disk}).";
+
+ CleanItems.SelectedIndex = 0;
+
+ CheckItems();
+
+ string commandArgs = string.Join(" ", Environment.GetCommandLineArgs().Skip(1));
+
+ if (commandArgs.Contains("CLEANALL"))
+ {
+ RunFullOptimization();
+ }
+ }
+
+ public async void RunFullOptimization()
+ {
+ SelectAllBox.IsChecked = true;
+
+ await Task.Delay(500);
+
+ CleanItems.IsEnabled = false;
+ CleanButton.IsEnabled = false;
+ CancelButton.IsEnabled = false;
+ SelectAllBox.IsEnabled = false;
+ MoreOptions.IsEnabled = false;
+ ViewFiles.IsEnabled = false;
+ Working.IsIndeterminate = true;
+ (this as WindowEx).Title = $"Disk Cleanup : Cleaning drive ({Disk})... (This may take a while)";
+
+ await Task.Delay(100);
+
+ foreach (var item in items)
+ {
+ if (item.Name == "Thumbnails")
+ {
+ DeleteFilesDB(item.ItemPath);
+ }
+ else if (item.Name == "Device Driver Packages")
+ {
+ CleanupDriverStore();
+ }
+ else
+ {
+ DeleteFiles(item.ItemPath);
+ }
+ }
+
+ Close();
+ }
+
+ public enum KnownFolder
+ {
+ Contacts,
+ Downloads,
+ Favorites,
+ Links,
+ SavedGames,
+ SavedSearches
+ }
+
+ public static class KnownFolders
+ {
+ private static readonly Dictionary _guids = new()
+ {
+ [KnownFolder.Contacts] = new("56784854-C6CB-462B-8169-88E350ACB882"),
+ [KnownFolder.Downloads] = new("374DE290-123F-4565-9164-39C4925E467B"),
+ [KnownFolder.Favorites] = new("1777F761-68AD-4D8A-87BD-30B759FA33DD"),
+ [KnownFolder.Links] = new("BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968"),
+ [KnownFolder.SavedGames] = new("4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4"),
+ [KnownFolder.SavedSearches] = new("7D1D3A04-DEBB-4115-95CF-2F29DA2920DA")
+ };
+
+ public static string GetPath(KnownFolder knownFolder)
+ {
+ return SHGetKnownFolderPath(_guids[knownFolder], 0);
+ }
+
+ [DllImport("shell32",
+ CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)]
+ private static extern string SHGetKnownFolderPath(
+ [MarshalAs(UnmanagedType.LPStruct)] Guid rfid, uint dwFlags,
+ nint hToken = 0);
+ }
+
+ public async void CheckItems()
+ {
+ try
+ {
+ await Task.Delay(10);
+
+ int totalItems = 0;
+ int selectedItems = 0;
+
+ foreach (var item in items)
+ {
+ totalItems++;
+ if (item.IsChecked == true) selectedItems++;
+ }
+
+ if (CleanItems.SelectedIndex >= 0) ItemDetails.Text = items[CleanItems.SelectedIndex].Description;
+
+ if (selectedItems == 0)
+ {
+ SelectAllBox.IsChecked = false;
+ }
+ else if (selectedItems == totalItems)
+ {
+ SelectAllBox.IsChecked = true;
+ }
+ else
+ {
+ SelectAllBox.IsChecked = null;
+ }
+
+ CheckItems();
+ }
+ catch
+ {
+
+ }
+ }
+
+ private async void MenuFlyoutItem_Click(object sender, RoutedEventArgs e)
+ {
+ string customDefragPath = @"C:\Rebound11\rdfrgui.exe";
+ string systemDefragPath = @"C:\Windows\System32\dfrgui.exe";
+
+ try
+ {
+ if (File.Exists(customDefragPath))
+ {
+ // Launch the custom defrag tool
+ Process.Start(new ProcessStartInfo()
+ {
+ FileName = customDefragPath,
+ UseShellExecute = true,
+ Verb = "runas" // Ensure it runs with admin rights
+ });
+ }
+ else
+ {
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ UseShellExecute = false,
+ CreateNoWindow = true
+ };
+
+ startInfo.Arguments = $"Start-Process -FilePath \"dfrgui\"";
+
+ try
+ {
+ var res = Process.Start(startInfo);
+ await res.WaitForExitAsync();
+ if (res.ExitCode == 0) return;
+ else throw new Exception();
+ }
+ catch (Exception ex)
+ {
+ await this.ShowMessageDialogAsync($"The system cannot find the file specified or the command line arguments are invalid.", "Error");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"Exception: {ex.Message}");
+ ContentDialog noWifiDialog = new ContentDialog
+ {
+ Title = "Error",
+ Content = $"Could not launch Disk Defragmenter: {ex.Message}",
+ CloseButtonText = "Ok"
+ };
+
+ await noWifiDialog.ShowAsync(); // Showing the error dialog
+ }
+ }
+
+ private async void MenuFlyoutItem_Click_1(object sender, RoutedEventArgs e)
+ {
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ UseShellExecute = false,
+ CreateNoWindow = true
+ };
+
+ startInfo.Arguments = $"Start-Process -FilePath \"cleanmgr\"";
+
+ try
+ {
+ var res = Process.Start(startInfo);
+ await res.WaitForExitAsync();
+ if (res.ExitCode == 0) Close();
+ else throw new Exception();
+ }
+ catch (Exception ex)
+ {
+ await this.ShowMessageDialogAsync($"The system cannot find the file specified or the command line arguments are invalid.", "Error");
+ }
+ }
+
+ private async void MenuFlyoutItem_Click_2(object sender, RoutedEventArgs e)
+ {
+ await Launcher.LaunchUriAsync(new Uri("ms-settings:appsfeatures"));
+ }
+
+ private void CleanItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+
+ }
+
+ private void CheckBox_Click(object sender, RoutedEventArgs e)
+ {
+ if (SelectAllBox.IsChecked == true)
+ {
+ CleanItems.ItemsSource = null;
+ foreach (var item in items)
+ {
+ item.IsChecked = true;
+ }
+ CleanItems.ItemsSource = items;
+ CleanItems.SelectedIndex = 0;
+ }
+ if (SelectAllBox.IsChecked == false)
+ {
+ CleanItems.ItemsSource = null;
+ foreach (var item in items)
+ {
+ item.IsChecked = false;
+ }
+ CleanItems.ItemsSource = items;
+ CleanItems.SelectedIndex = 0;
+ }
+ }
+
+ public bool IsAdministrator()
+ {
+ var identity = WindowsIdentity.GetCurrent();
+ var principal = new WindowsPrincipal(identity);
+ return principal.IsInRole(WindowsBuiltInRole.Administrator);
+ }
+
+ private void CheckBox_Checked(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ Process.Start(new ProcessStartInfo()
+ {
+ FileName = "powershell.exe",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ Verb = "runas",
+ Arguments = @$"Start-Process ""shell:AppsFolder\e8dfd11c-954d-46a2-b700-9cbc6201f056_pthpn8nb9xcaa!App"" -ArgumentList ""{Disk}"" -Verb RunAs"
+ });
+ Close();
+ }
+
+ private async void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ CleanItems.IsEnabled = false;
+ CleanButton.IsEnabled = false;
+ CancelButton.IsEnabled = false;
+ SelectAllBox.IsEnabled = false;
+ MoreOptions.IsEnabled = false;
+ ViewFiles.IsEnabled = false;
+ Working.IsIndeterminate = true;
+ (this as WindowEx).Title = $"Disk Cleanup : Cleaning drive ({Disk})... (This may take a while)";
+
+ await Task.Delay(100);
+
+ foreach (var item in items)
+ {
+ if (item.IsChecked == true)
+ {
+ if (item.Name == "Thumbnails")
+ {
+ DeleteFilesDB(item.ItemPath);
+ }
+ else if (item.Name == "Device Driver Packages")
+ {
+ CleanupDriverStore();
+ }
+ else
+ {
+ DeleteFiles(item.ItemPath);
+ }
+ }
+ }
+
+ Close();
+ }
+
+ private void Button_Click_2(object sender, RoutedEventArgs e)
+ {
+ Close();
+ }
+
+ private async void ViewFiles_Click(object sender, RoutedEventArgs e)
+ {
+ if (items[CleanItems.SelectedIndex].ItemPath.Contains("Recycle.Bin"))
+ {
+ await Launcher.LaunchFolderPathAsync($"shell:RecycleBinFolder");
+ return;
+ }
+ await Launcher.LaunchFolderPathAsync($"{items[CleanItems.SelectedIndex].ItemPath}");
+ }
+ }
+}
diff --git a/Cleanup/MainWindow.xaml b/Cleanup/MainWindow.xaml
new file mode 100644
index 0000000..e198c53
--- /dev/null
+++ b/Cleanup/MainWindow.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Cleanup/MainWindow.xaml.cs b/Cleanup/MainWindow.xaml.cs
new file mode 100644
index 0000000..346d61d
--- /dev/null
+++ b/Cleanup/MainWindow.xaml.cs
@@ -0,0 +1,95 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using WinUIEx;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Rebound.Cleanup
+{
+ ///
+ /// An empty window that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class MainWindow : WindowEx
+ {
+ public MainWindow(string disk)
+ {
+ this.InitializeComponent();
+ this.AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ this.SetWindowSize(375, 235);
+ this.IsMaximizable = false;
+ this.IsMinimizable = false;
+ this.IsResizable = false;
+ this.CenterOnScreen();
+ this.Title = "Disk Cleanup : Drive Selection";
+ this.SystemBackdrop = new MicaBackdrop();
+ this.SetIcon($@"{AppContext.BaseDirectory}\Assets\cleanmgr.ico");
+ var x = Directory.GetLogicalDrives();
+ foreach (var i in x)
+ {
+ DrivesBox.Items.Add(i.Substring(0, 2));
+ }
+ DrivesBox.SelectedIndex = 0;
+ }
+
+ private async void Button_Click(object sender, RoutedEventArgs e)
+ {
+ Working.IsIndeterminate = true;
+ OkButton.IsEnabled = false;
+ CancelButton.IsEnabled = false;
+ await Task.Delay(50);
+
+ await OpenWindow(DrivesBox.SelectedItem.ToString());
+
+ this.Close();
+ }
+
+ public async Task ArgumentsLaunch(string disk)
+ {
+ Working.IsIndeterminate = true;
+ OkButton.IsEnabled = false;
+ CancelButton.IsEnabled = false;
+ await Task.Delay(50);
+
+ await OpenWindow(disk);
+
+ this.Close();
+ }
+
+ public Task OpenWindow(string disk)
+ {
+ this.Title = "Disk Cleanup : Calculating total cache size... (This may take a while)";
+ var win = new DiskWindow(disk);
+ win.AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ win.SetWindowSize(450, 640);
+ win.IsMaximizable = false;
+ win.IsMinimizable = false;
+ win.IsResizable = false;
+ win.Move(50, 50);
+ win.Title = $"Disk Cleanup for ({disk})";
+ win.SystemBackdrop = new MicaBackdrop();
+ win.SetIcon($@"{AppContext.BaseDirectory}\Assets\cleanmgr.ico");
+ win.Show();
+ return Task.CompletedTask;
+ }
+
+ private void CancelButton_Click(object sender, RoutedEventArgs e)
+ {
+ Process.GetCurrentProcess().Kill();
+ }
+ }
+}
diff --git a/Cleanup/Package.appxmanifest b/Cleanup/Package.appxmanifest
new file mode 100644
index 0000000..c0bb4a1
--- /dev/null
+++ b/Cleanup/Package.appxmanifest
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ Rebound.Cleanup
+ Lenovo
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Cleanup/Properties/launchSettings.json b/Cleanup/Properties/launchSettings.json
new file mode 100644
index 0000000..05d67f8
--- /dev/null
+++ b/Cleanup/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "Rebound.Cleanup (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "Rebound.Cleanup (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Cleanup/Rebound.Cleanup.csproj b/Cleanup/Rebound.Cleanup.csproj
new file mode 100644
index 0000000..7c0f829
--- /dev/null
+++ b/Cleanup/Rebound.Cleanup.csproj
@@ -0,0 +1,81 @@
+
+
+ WinExe
+ net8.0-windows10.0.22621.0
+ 10.0.17763.0 net8.0-windows10.0.22621.0
+
+ Rebound.Cleanup
+ app.manifest
+ x86;x64;ARM64
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ win-$(Platform).pubxml
+ true
+ true
+ 10.0.22621.35-preview
+ True
+ True
+ Rebound.Cleanup_TemporaryKey.pfx
+ SHA256
+ False
+ False
+ True
+ Never
+ C:\Users\Lenovo\Desktop
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/Cleanup/app.manifest b/Cleanup/app.manifest
new file mode 100644
index 0000000..f092a7e
--- /dev/null
+++ b/Cleanup/app.manifest
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
\ No newline at end of file
diff --git a/Defrag/App.xaml b/Defrag/App.xaml
new file mode 100644
index 0000000..da0b911
--- /dev/null
+++ b/Defrag/App.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Defrag/App.xaml.cs b/Defrag/App.xaml.cs
new file mode 100644
index 0000000..7960138
--- /dev/null
+++ b/Defrag/App.xaml.cs
@@ -0,0 +1,109 @@
+using Microsoft.UI.Xaml;
+using System;
+using System.Linq;
+
+namespace Rebound.Defrag
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override async void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ m_window = new MainWindow();
+ m_window.Activate();
+ await (m_window as MainWindow).LoadAppAsync();
+
+ string commandArgs = string.Join(" ", Environment.GetCommandLineArgs().Skip(1));
+
+ if (commandArgs.Contains("TASK"))
+ {
+ try
+ {
+ (m_window as MainWindow).OpenTaskWindow();
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ if (commandArgs.Contains("SELECTED-SYSTEM"))
+ {
+ try
+ {
+ // Extract the index after "SELECTED "
+ int selectedIndex = int.Parse(commandArgs[(commandArgs.IndexOf("SELECTED-SYSTEM") + 16)..].Trim());
+ (m_window as MainWindow).MyListView.SelectedIndex = selectedIndex;
+ (m_window as MainWindow).OptimizeSelected(true);
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ else if (commandArgs.Contains("SELECTED"))
+ {
+ try
+ {
+ // Extract the index after "SELECTED "
+ int selectedIndex = int.Parse(commandArgs[(commandArgs.IndexOf("SELECTED") + 9)..].Trim());
+ (m_window as MainWindow).MyListView.SelectedIndex = selectedIndex;
+ (m_window as MainWindow).OptimizeSelected(false);
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ else if (commandArgs == "OPTIMIZEALL-SYSTEM")
+ {
+ try
+ {
+ (m_window as MainWindow).OptimizeAll(false, true);
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ else if (commandArgs == "OPTIMIZEALL")
+ {
+ try
+ {
+ (m_window as MainWindow).OptimizeAll(false, false);
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ else if (commandArgs == "OPTIMIZEALLANDCLOSE-SYSTEM")
+ {
+ try
+ {
+ (m_window as MainWindow).OptimizeAll(true, true);
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ else if (commandArgs == "OPTIMIZEALLANDCLOSE")
+ {
+ try
+ {
+ (m_window as MainWindow).OptimizeAll(true, false);
+ }
+ catch (Exception ex)
+ {
+ await (m_window as MainWindow).ShowMessageDialogAsync(ex.Message);
+ }
+ }
+ }
+
+ private Window m_window;
+ }
+}
diff --git a/Defrag/Assets/Administrator.png b/Defrag/Assets/Administrator.png
new file mode 100644
index 0000000..d3a6be1
Binary files /dev/null and b/Defrag/Assets/Administrator.png differ
diff --git a/Defrag/Assets/Drive.png b/Defrag/Assets/Drive.png
new file mode 100644
index 0000000..a7e7383
Binary files /dev/null and b/Defrag/Assets/Drive.png differ
diff --git a/Defrag/Assets/DriveFloppy.png b/Defrag/Assets/DriveFloppy.png
new file mode 100644
index 0000000..3c9c37b
Binary files /dev/null and b/Defrag/Assets/DriveFloppy.png differ
diff --git a/Defrag/Assets/DriveOptical.png b/Defrag/Assets/DriveOptical.png
new file mode 100644
index 0000000..ec22a2a
Binary files /dev/null and b/Defrag/Assets/DriveOptical.png differ
diff --git a/Defrag/Assets/DriveRemovable.png b/Defrag/Assets/DriveRemovable.png
new file mode 100644
index 0000000..8fbd15f
Binary files /dev/null and b/Defrag/Assets/DriveRemovable.png differ
diff --git a/Defrag/Assets/DriveSystem.png b/Defrag/Assets/DriveSystem.png
new file mode 100644
index 0000000..ac024a0
Binary files /dev/null and b/Defrag/Assets/DriveSystem.png differ
diff --git a/Defrag/Assets/DriveUnknown.png b/Defrag/Assets/DriveUnknown.png
new file mode 100644
index 0000000..c5e0eca
Binary files /dev/null and b/Defrag/Assets/DriveUnknown.png differ
diff --git a/Defrag/Assets/DriveWindows.png b/Defrag/Assets/DriveWindows.png
new file mode 100644
index 0000000..0213be0
Binary files /dev/null and b/Defrag/Assets/DriveWindows.png differ
diff --git a/Defrag/Assets/LargeTile.scale-100.png b/Defrag/Assets/LargeTile.scale-100.png
new file mode 100644
index 0000000..1fe7f16
Binary files /dev/null and b/Defrag/Assets/LargeTile.scale-100.png differ
diff --git a/Defrag/Assets/LargeTile.scale-125.png b/Defrag/Assets/LargeTile.scale-125.png
new file mode 100644
index 0000000..3e560ad
Binary files /dev/null and b/Defrag/Assets/LargeTile.scale-125.png differ
diff --git a/Defrag/Assets/LargeTile.scale-150.png b/Defrag/Assets/LargeTile.scale-150.png
new file mode 100644
index 0000000..e7ee31d
Binary files /dev/null and b/Defrag/Assets/LargeTile.scale-150.png differ
diff --git a/Defrag/Assets/LargeTile.scale-200.png b/Defrag/Assets/LargeTile.scale-200.png
new file mode 100644
index 0000000..d0c2d70
Binary files /dev/null and b/Defrag/Assets/LargeTile.scale-200.png differ
diff --git a/Defrag/Assets/LargeTile.scale-400.png b/Defrag/Assets/LargeTile.scale-400.png
new file mode 100644
index 0000000..8effeab
Binary files /dev/null and b/Defrag/Assets/LargeTile.scale-400.png differ
diff --git a/Defrag/Assets/LockScreenLogo.scale-200.png b/Defrag/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/Defrag/Assets/LockScreenLogo.scale-200.png differ
diff --git a/Defrag/Assets/Rebound.Defrag.ico b/Defrag/Assets/Rebound.Defrag.ico
new file mode 100644
index 0000000..a58321e
Binary files /dev/null and b/Defrag/Assets/Rebound.Defrag.ico differ
diff --git a/Defrag/Assets/Rebound.Defrag.png b/Defrag/Assets/Rebound.Defrag.png
new file mode 100644
index 0000000..1b5a84c
Binary files /dev/null and b/Defrag/Assets/Rebound.Defrag.png differ
diff --git a/Defrag/Assets/SmallTile.scale-100.png b/Defrag/Assets/SmallTile.scale-100.png
new file mode 100644
index 0000000..471626b
Binary files /dev/null and b/Defrag/Assets/SmallTile.scale-100.png differ
diff --git a/Defrag/Assets/SmallTile.scale-125.png b/Defrag/Assets/SmallTile.scale-125.png
new file mode 100644
index 0000000..a1efd3d
Binary files /dev/null and b/Defrag/Assets/SmallTile.scale-125.png differ
diff --git a/Defrag/Assets/SmallTile.scale-150.png b/Defrag/Assets/SmallTile.scale-150.png
new file mode 100644
index 0000000..d554853
Binary files /dev/null and b/Defrag/Assets/SmallTile.scale-150.png differ
diff --git a/Defrag/Assets/SmallTile.scale-200.png b/Defrag/Assets/SmallTile.scale-200.png
new file mode 100644
index 0000000..cb075aa
Binary files /dev/null and b/Defrag/Assets/SmallTile.scale-200.png differ
diff --git a/Defrag/Assets/SmallTile.scale-400.png b/Defrag/Assets/SmallTile.scale-400.png
new file mode 100644
index 0000000..1260ebb
Binary files /dev/null and b/Defrag/Assets/SmallTile.scale-400.png differ
diff --git a/Defrag/Assets/SplashScreen.scale-100.png b/Defrag/Assets/SplashScreen.scale-100.png
new file mode 100644
index 0000000..1b742d2
Binary files /dev/null and b/Defrag/Assets/SplashScreen.scale-100.png differ
diff --git a/Defrag/Assets/SplashScreen.scale-125.png b/Defrag/Assets/SplashScreen.scale-125.png
new file mode 100644
index 0000000..ba90d0d
Binary files /dev/null and b/Defrag/Assets/SplashScreen.scale-125.png differ
diff --git a/Defrag/Assets/SplashScreen.scale-150.png b/Defrag/Assets/SplashScreen.scale-150.png
new file mode 100644
index 0000000..71a7c5c
Binary files /dev/null and b/Defrag/Assets/SplashScreen.scale-150.png differ
diff --git a/Defrag/Assets/SplashScreen.scale-200.png b/Defrag/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..ac89399
Binary files /dev/null and b/Defrag/Assets/SplashScreen.scale-200.png differ
diff --git a/Defrag/Assets/SplashScreen.scale-400.png b/Defrag/Assets/SplashScreen.scale-400.png
new file mode 100644
index 0000000..ec62ee2
Binary files /dev/null and b/Defrag/Assets/SplashScreen.scale-400.png differ
diff --git a/Defrag/Assets/Square150x150Logo.scale-100.png b/Defrag/Assets/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..5c14540
Binary files /dev/null and b/Defrag/Assets/Square150x150Logo.scale-100.png differ
diff --git a/Defrag/Assets/Square150x150Logo.scale-125.png b/Defrag/Assets/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..b4d5586
Binary files /dev/null and b/Defrag/Assets/Square150x150Logo.scale-125.png differ
diff --git a/Defrag/Assets/Square150x150Logo.scale-150.png b/Defrag/Assets/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..cb8e028
Binary files /dev/null and b/Defrag/Assets/Square150x150Logo.scale-150.png differ
diff --git a/Defrag/Assets/Square150x150Logo.scale-200.png b/Defrag/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..8f0f7ee
Binary files /dev/null and b/Defrag/Assets/Square150x150Logo.scale-200.png differ
diff --git a/Defrag/Assets/Square150x150Logo.scale-400.png b/Defrag/Assets/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..55c84d5
Binary files /dev/null and b/Defrag/Assets/Square150x150Logo.scale-400.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..4f8816a
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..11bd08d
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..37d359a
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..3034977
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..6650759
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..4f8816a
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..37d359a
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..3034977
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..6650759
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/Defrag/Assets/Square44x44Logo.scale-100.png b/Defrag/Assets/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..47874c3
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.scale-100.png differ
diff --git a/Defrag/Assets/Square44x44Logo.scale-125.png b/Defrag/Assets/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..c2a76b7
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.scale-125.png differ
diff --git a/Defrag/Assets/Square44x44Logo.scale-150.png b/Defrag/Assets/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..69163cb
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.scale-150.png differ
diff --git a/Defrag/Assets/Square44x44Logo.scale-200.png b/Defrag/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..baf7592
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.scale-200.png differ
diff --git a/Defrag/Assets/Square44x44Logo.scale-400.png b/Defrag/Assets/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..85bda33
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.scale-400.png differ
diff --git a/Defrag/Assets/Square44x44Logo.targetsize-16.png b/Defrag/Assets/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..98051ab
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.targetsize-16.png differ
diff --git a/Defrag/Assets/Square44x44Logo.targetsize-24.png b/Defrag/Assets/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..bc8921d
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.targetsize-24.png differ
diff --git a/Defrag/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Defrag/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..11bd08d
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/Defrag/Assets/Square44x44Logo.targetsize-256.png b/Defrag/Assets/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..e813e6d
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.targetsize-256.png differ
diff --git a/Defrag/Assets/Square44x44Logo.targetsize-32.png b/Defrag/Assets/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..e0d900f
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.targetsize-32.png differ
diff --git a/Defrag/Assets/Square44x44Logo.targetsize-48.png b/Defrag/Assets/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..cfd00f5
Binary files /dev/null and b/Defrag/Assets/Square44x44Logo.targetsize-48.png differ
diff --git a/Defrag/Assets/StoreLogo.backup.png b/Defrag/Assets/StoreLogo.backup.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/Defrag/Assets/StoreLogo.backup.png differ
diff --git a/Defrag/Assets/StoreLogo.scale-100.png b/Defrag/Assets/StoreLogo.scale-100.png
new file mode 100644
index 0000000..bfc57a6
Binary files /dev/null and b/Defrag/Assets/StoreLogo.scale-100.png differ
diff --git a/Defrag/Assets/StoreLogo.scale-125.png b/Defrag/Assets/StoreLogo.scale-125.png
new file mode 100644
index 0000000..4cfbf63
Binary files /dev/null and b/Defrag/Assets/StoreLogo.scale-125.png differ
diff --git a/Defrag/Assets/StoreLogo.scale-150.png b/Defrag/Assets/StoreLogo.scale-150.png
new file mode 100644
index 0000000..aa52753
Binary files /dev/null and b/Defrag/Assets/StoreLogo.scale-150.png differ
diff --git a/Defrag/Assets/StoreLogo.scale-200.png b/Defrag/Assets/StoreLogo.scale-200.png
new file mode 100644
index 0000000..7c0dce6
Binary files /dev/null and b/Defrag/Assets/StoreLogo.scale-200.png differ
diff --git a/Defrag/Assets/StoreLogo.scale-400.png b/Defrag/Assets/StoreLogo.scale-400.png
new file mode 100644
index 0000000..6df73df
Binary files /dev/null and b/Defrag/Assets/StoreLogo.scale-400.png differ
diff --git a/Defrag/Assets/Wide310x150Logo.scale-100.png b/Defrag/Assets/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..db187f7
Binary files /dev/null and b/Defrag/Assets/Wide310x150Logo.scale-100.png differ
diff --git a/Defrag/Assets/Wide310x150Logo.scale-125.png b/Defrag/Assets/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..1939a43
Binary files /dev/null and b/Defrag/Assets/Wide310x150Logo.scale-125.png differ
diff --git a/Defrag/Assets/Wide310x150Logo.scale-150.png b/Defrag/Assets/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..552be65
Binary files /dev/null and b/Defrag/Assets/Wide310x150Logo.scale-150.png differ
diff --git a/Defrag/Assets/Wide310x150Logo.scale-200.png b/Defrag/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..1b742d2
Binary files /dev/null and b/Defrag/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/Defrag/Assets/Wide310x150Logo.scale-400.png b/Defrag/Assets/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..ac89399
Binary files /dev/null and b/Defrag/Assets/Wide310x150Logo.scale-400.png differ
diff --git a/Defrag/Helpers/DefragHelper.cs b/Defrag/Helpers/DefragHelper.cs
new file mode 100644
index 0000000..81df1a9
--- /dev/null
+++ b/Defrag/Helpers/DefragHelper.cs
@@ -0,0 +1,65 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Management;
+
+#nullable enable
+
+namespace Rebound.Defrag.Helpers
+{
+ public class VolumeInfo
+ {
+ public string? GUID { get; set; }
+ public string? FileSystem { get; set; }
+ public ulong Size { get; set; }
+ public string? FriendlyName { get; set; }
+ }
+
+ public class SystemVolumes
+ {
+ public static List GetSystemVolumes()
+ {
+ List volumes = [];
+
+ // WMI query to get all volumes, including GUID paths
+ string query = "SELECT * FROM Win32_Volume WHERE DriveLetter IS NULL";
+ using (ManagementObjectSearcher searcher = new(query))
+ {
+ foreach (ManagementObject volume in searcher.Get().Cast())
+ {
+ string? volumePath = volume["DeviceID"].ToString(); // This gives the \\?\Volume{GUID} path
+ string fileSystem = volume["FileSystem"]?.ToString() ?? "Unknown";
+ ulong size = (ulong)volume["Capacity"];
+
+ // We can further refine this by querying for EFI, Recovery, etc., based on size and file system
+ string friendlyName;
+ if (fileSystem == "FAT32" && size < 512 * 1024 * 1024)
+ {
+ friendlyName = "EFI System Partition";
+ }
+ else if (fileSystem == "NTFS" && size > 500 * 1024 * 1024)
+ {
+ friendlyName = "Recovery Partition";
+ }
+ else if (fileSystem == "NTFS" && size < 500 * 1024 * 1024)
+ {
+ friendlyName = "System Reserved Partition";
+ }
+ else
+ {
+ friendlyName = "Unknown System Partition";
+ }
+
+ volumes.Add(new VolumeInfo
+ {
+ GUID = volumePath,
+ FileSystem = fileSystem,
+ Size = size,
+ FriendlyName = friendlyName
+ });
+ }
+ }
+
+ return volumes;
+ }
+ }
+}
diff --git a/Defrag/Helpers/Win32Helper.cs b/Defrag/Helpers/Win32Helper.cs
new file mode 100644
index 0000000..50c8b43
--- /dev/null
+++ b/Defrag/Helpers/Win32Helper.cs
@@ -0,0 +1,143 @@
+using Microsoft.UI.Windowing;
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using WinUIEx.Messaging;
+using WinUIEx;
+using System.Threading.Tasks;
+
+#nullable enable
+#pragma warning disable SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
+#pragma warning disable CA1401 // P/Invokes should not be visible
+
+namespace Rebound.Defrag.Helpers
+{
+ public static partial class Win32Helper
+ {
+ public const int WM_DEVICECHANGE = 0x0219;
+ public const int DBT_DEVICEARRIVAL = 0x8000;
+ public const int DBT_DEVICEREMOVECOMPLETE = 0x8004;
+
+ [DllImport("kernel32.dll", SetLastError = true)]
+ public static extern uint GetLogicalDrives();
+
+ [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
+ public static extern bool GetVolumeInformation(
+ string lpRootPathName,
+ StringBuilder lpVolumeNameBuffer,
+ int nVolumeNameSize,
+ out uint lpVolumeSerialNumber,
+ out uint lpMaximumComponentLength,
+ out uint lpFileSystemFlags,
+ StringBuilder lpFileSystemNameBuffer,
+ int nFileSystemNameSize);
+
+ [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern DriveType GetDriveType(string lpRootPathName);
+
+ public enum DriveType : uint
+ {
+ DRIVE_UNKNOWN = 0,
+ DRIVE_NO_ROOT_DIR = 1,
+ DRIVE_REMOVABLE = 2,
+ DRIVE_FIXED = 3,
+ DRIVE_REMOTE = 4,
+ DRIVE_CDROM = 5,
+ DRIVE_RAMDISK = 6
+ }
+
+ public static void RemoveIcon(WindowEx window)
+ {
+ IntPtr hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
+ SetWindowLongPtr(hWnd, -20, 0x00000001L);
+ }
+
+ [DllImport("user32.dll", SetLastError = true)]
+ static extern IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, long dwNewLong);
+
+ [DllImport("dwmapi.dll", SetLastError = true)]
+ public static extern int DwmSetWindowAttribute(IntPtr hwnd, int dwAttribute, ref int pvAttribute, int cbAttribute);
+
+ public static void SetDarkMode(WindowEx window)
+ {
+ int i = 1;
+ if (App.Current.RequestedTheme == Microsoft.UI.Xaml.ApplicationTheme.Light)
+ {
+ i = 0;
+ }
+ IntPtr hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
+ DwmSetWindowAttribute(hWnd, 20, ref i, sizeof(int));
+ CheckTheme();
+ async void CheckTheme()
+ {
+ await Task.Delay(100);
+ try
+ {
+ int i = 1;
+ if (App.Current.RequestedTheme == Microsoft.UI.Xaml.ApplicationTheme.Light)
+ {
+ i = 0;
+ }
+ IntPtr hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
+ DwmSetWindowAttribute(hWnd, 20, ref i, sizeof(int));
+ CheckTheme();
+ }
+ catch
+ {
+
+ }
+ }
+ }
+
+ [DllImport("User32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ private static extern bool EnableWindow(IntPtr hWnd, bool bEnable);
+
+ private const int GWL_HWNDPARENT = (-8);
+
+ private static IntPtr SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong)
+ {
+ if (IntPtr.Size == 4)
+ {
+ return SetWindowLongPtr32(hWnd, nIndex, dwNewLong);
+ }
+ return SetWindowLongPtr64(hWnd, nIndex, dwNewLong);
+ }
+
+ [DllImport("User32.dll", CharSet = CharSet.Auto, EntryPoint = "SetWindowLong")]
+ private static extern IntPtr SetWindowLongPtr32(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
+
+ [DllImport("User32.dll", CharSet = CharSet.Auto, EntryPoint = "SetWindowLongPtr")]
+ private static extern IntPtr SetWindowLongPtr64(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
+
+ public static void CreateModalWindow(WindowEx parentWindow, WindowEx childWindow, bool summonWindowAutomatically = true, bool blockInput = false)
+ {
+ IntPtr hWndChildWindow = WinRT.Interop.WindowNative.GetWindowHandle(childWindow);
+ IntPtr hWndParentWindow = WinRT.Interop.WindowNative.GetWindowHandle(parentWindow);
+ SetWindowLong(hWndChildWindow, GWL_HWNDPARENT, hWndParentWindow);
+ ((OverlappedPresenter)childWindow.AppWindow.Presenter).IsModal = true;
+ if (blockInput == true)
+ {
+ EnableWindow(hWndParentWindow, false);
+ childWindow.Closed += ChildWindow_Closed;
+ void ChildWindow_Closed(object sender, Microsoft.UI.Xaml.WindowEventArgs args)
+ {
+ EnableWindow(hWndParentWindow, true);
+ }
+ }
+ if (summonWindowAutomatically == true) childWindow.Show();
+ WindowMessageMonitor _msgMonitor;
+
+ _msgMonitor = new WindowMessageMonitor(childWindow);
+ _msgMonitor.WindowMessageReceived += (_, e) =>
+ {
+ const int WM_NCLBUTTONDBLCLK = 0x00A3;
+ if (e.Message.MessageId == WM_NCLBUTTONDBLCLK)
+ {
+ // Disable double click on title bar to maximize window
+ e.Result = 0;
+ e.Handled = true;
+ }
+ };
+ }
+ }
+}
diff --git a/Defrag/Item.cs b/Defrag/Item.cs
new file mode 100644
index 0000000..5929fb9
--- /dev/null
+++ b/Defrag/Item.cs
@@ -0,0 +1,9 @@
+namespace Rebound.Defrag
+{
+ public class Item
+ {
+ public string Name { get; set; }
+ public string ImagePath { get; set; }
+ }
+
+}
diff --git a/Defrag/MainWindow.xaml b/Defrag/MainWindow.xaml
new file mode 100644
index 0000000..40e83b4
--- /dev/null
+++ b/Defrag/MainWindow.xaml
@@ -0,0 +1,364 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Defrag/MainWindow.xaml.cs b/Defrag/MainWindow.xaml.cs
new file mode 100644
index 0000000..a6a1407
--- /dev/null
+++ b/Defrag/MainWindow.xaml.cs
@@ -0,0 +1,1160 @@
+using Microsoft.UI.Windowing;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Win32.TaskScheduler;
+using Microsoft.WindowsAPICodePack.Taskbar;
+using Rebound.Defrag.Helpers;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.Eventing.Reader;
+using System.IO;
+using System.Linq;
+using System.Management;
+using System.Security.Principal;
+using System.Text;
+using System.Threading.Tasks;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Core;
+using Windows.Storage;
+using Windows.System;
+using WinUIEx;
+using WinUIEx.Messaging;
+using Task = System.Threading.Tasks.Task;
+
+#nullable enable
+#pragma warning disable CA1854 // Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
+
+namespace Rebound.Defrag
+{
+ public sealed partial class MainWindow : WindowEx
+ {
+ public MainWindow()
+ {
+ this?.InitializeComponent();
+ // Set window backdrop to Mica for a modern translucent effect
+ SystemBackdrop = new MicaBackdrop();
+
+ // Set the window title
+ Title = "Optimize Drives - Beta v0.1.0";
+
+ // Window customization
+ IsMaximizable = false;
+ this.SetWindowSize(800, 670);
+ IsResizable = false;
+ AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ this.CenterOnScreen();
+ this.SetIcon(@$"{AppContext.BaseDirectory}/Assets/Rebound.Defrag.ico");
+ }
+
+ public async Task LoadAppAsync()
+ {
+ AdvancedView.IsOn = GetBoolFromLocalSettings("Advanced");
+
+ // Load data based on the current state of 'AdvancedView'
+ await LoadData(AdvancedView.IsOn);
+
+ // Begin monitoring window messages (such as device changes)
+ var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
+ WindowMessageMonitor mon = new(hWnd);
+
+ // Subscribe to the WindowMessageReceived event
+ mon.WindowMessageReceived += MessageReceived;
+
+ // Set up a timer to periodically refresh the message listener every 5 seconds
+ var timer = new DispatcherTimer
+ {
+ Interval = TimeSpan.FromSeconds(5) // Timer interval set to 5 seconds
+ };
+
+ // Timer event handler
+ timer.Tick += (sender, e) =>
+ {
+ mon.WindowMessageReceived += MessageReceived; // Re-subscribe to the event to keep monitoring
+ };
+
+ // Start the timer
+ timer.Start();
+
+ // Check if the application is running with administrator privileges
+ IsAdministrator();
+ CheckTask();
+ }
+
+ public static void SetProgressState(TaskbarProgressBarState state)
+ {
+ TaskbarManager.Instance.SetProgressState(state);
+ }
+
+ public static void SetProgressValue(int completed, int total)
+ {
+ TaskbarManager.Instance.SetProgressValue(completed, total);
+ }
+
+ private async void MessageReceived(object? sender, WindowMessageEventArgs e)
+ {
+ // Handle incoming messages
+ switch (e.Message.MessageId)
+ {
+ default:
+ {
+ // No relevant message, break
+ break;
+ }
+ case Win32Helper.WM_DEVICECHANGE:
+ {
+ // Handle specific device changes
+ switch ((int)e.Message.WParam)
+ {
+ case Win32Helper.DBT_DEVICEARRIVAL:
+ {
+ // Device or partition inserted
+ MyListView.ItemsSource = null; // Clear existing list
+ await LoadData(AdvancedView.IsOn); // Reload data based on AdvancedView state
+ break;
+ }
+ case Win32Helper.DBT_DEVICEREMOVECOMPLETE:
+ {
+ // Device or partition removed
+ MyListView.ItemsSource = null; // Clear existing list
+ await LoadData(AdvancedView.IsOn); // Reload data based on AdvancedView state
+ break;
+ }
+ default:
+ {
+ // Handle any other device action
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ public class DiskItem : Item
+ {
+ public string? DriveLetter { get; set; }
+ public string? MediaType { get; set; }
+ public int ProgressValue { get; set; }
+ public bool IsChecked { get; set; }
+ }
+
+ public bool IsAdministrator()
+ {
+ var identity = WindowsIdentity.GetCurrent();
+ var principal = new WindowsPrincipal(identity);
+ if (principal.IsInRole(WindowsBuiltInRole.Administrator))
+ {
+ Admin1.Visibility = Visibility.Collapsed;
+ Admin2.Visibility = Visibility.Collapsed;
+ Admin3.Visibility = Visibility.Collapsed;
+ Admin4.Visibility = Visibility.Collapsed;
+ }
+ return principal.IsInRole(WindowsBuiltInRole.Administrator);
+ }
+
+ private void ListviewSelectionChange(object sender, SelectionChangedEventArgs args)
+ {
+ LoadSelectedItemInfo(GetStatus());
+ }
+
+ public string GetLastOptimizeDate()
+ {
+ if (MyListView.SelectedItem != null)
+ {
+ DiskItem? selectedItem = MyListView.SelectedItem as DiskItem;
+ // Handle the selection change event
+
+ try
+ {
+ List i = DefragInfo.GetEventLogEntriesForID(258);
+ return i.Last(s => s.Contains($"({selectedItem?.DriveLetter?.ToString().Remove(2, 1)})"));
+ }
+ catch
+ {
+ return "Never....";
+ }
+ }
+ else return "Unknown....";
+ }
+
+ public void LoadSelectedItemInfo(string status, string info = "....")
+ {
+ if (info == "....")
+ {
+ info = GetLastOptimizeDate();
+ }
+ else
+ {
+ info = "Unknown....";
+ }
+ if (MyListView.SelectedItem != null)
+ {
+ DiskItem? selectedItem = MyListView.SelectedItem as DiskItem;
+ DetailsBar.Title = selectedItem?.Name;
+ DetailsBar.Message = $"Media type: {selectedItem?.MediaType}\nLast analyzed or optimized: {info[..^4]}\nCurrent status: {status}";
+ DetailsBar.Severity = InfoBarSeverity.Informational;
+ OptimizeButton.IsEnabled = AdvancedView.IsEnabled;
+ if (status.Contains("Needs optimization"))
+ {
+ DetailsBar.Severity = InfoBarSeverity.Warning;
+ }
+ if (selectedItem?.MediaType == "CD-ROM")
+ {
+ DetailsBar.Message = "Media type: CD-ROM\nLast analyzed or optimized: Never\nCurrent status: cannot be optimized";
+ DetailsBar.Severity = InfoBarSeverity.Error;
+ VisualStateManager.GoToState(OptimizeButton, "Disabled", true);
+ OptimizeButton.IsEnabled = false;
+ }
+ if (selectedItem?.Name == "EFI System Partition")
+ {
+ DetailsBar.Message = $"Media type: {selectedItem.MediaType}\nLast analyzed or optimized: Never\nCurrent status: cannot be optimized (EFI System Partition)";
+ DetailsBar.Severity = InfoBarSeverity.Informational;
+ }
+ if (selectedItem?.Name == "Recovery Partition")
+ {
+ DetailsBar.Message = $"Media type: {selectedItem.MediaType}\nLast analyzed or optimized: Never\nCurrent status: cannot be optimized (Recovery Partition)";
+ DetailsBar.Severity = InfoBarSeverity.Error;
+ VisualStateManager.GoToState(OptimizeButton, "Disabled", true);
+ OptimizeButton.IsEnabled = false;
+ }
+ }
+ }
+
+ public string GetStatus()
+ {
+ string status = string.Empty;
+
+ try
+ {
+ if (MyListView.SelectedItem != null)
+ {
+ List i = DefragInfo.GetEventLogEntriesForID(258);
+ var selectedItem = MyListView.SelectedItem as DiskItem;
+
+ var selI = i.Last(s => s.Contains($"({selectedItem?.DriveLetter?.ToString().Remove(2, 1)})"));
+
+ var localDate = DateTime.Parse(selI[..^4]);
+
+ // Get the current local date and time
+ DateTime currentDate = DateTime.Now;
+
+ // Calculate the days passed
+ TimeSpan timeSpan = currentDate - localDate;
+ int daysPassed = timeSpan.Days;
+
+ if (daysPassed == 0)
+ {
+ //return $"OK (Last optimized: today)";
+ return $"OK";
+ }
+
+ if (daysPassed == 1)
+ {
+ //return $"OK (Last optimized: yesterday)";
+ return $"OK";
+ }
+
+ if (daysPassed < 50)
+ {
+ //return $"OK (Last optimized: {daysPassed} days ago)";
+ return $"OK";
+ }
+
+ if (daysPassed >= 50)
+ {
+ //return $"Needs optimization (Last optimized: {daysPassed} days ago)";
+ return $"Needs optimization";
+ }
+
+ else return "Unknown";
+ }
+ else
+ {
+ return "Please select an item to proceed.";
+ }
+ }
+ catch
+ {
+ return "Needs optimization";
+ }
+ }
+
+ public void Lock(bool areItemsEnabled, string message = "", bool indeterminate = true)
+ {
+ AnalyzeButton.IsEnabled = areItemsEnabled;
+ OptimizeButton.IsEnabled = areItemsEnabled;
+ MyListView.IsEnabled = areItemsEnabled;
+ AdvancedView.IsEnabled = areItemsEnabled;
+ CurrentDisk.Visibility = areItemsEnabled == true ? Visibility.Collapsed : Visibility.Visible;
+ if (!string.IsNullOrWhiteSpace(message)) CurrentDisk.Text = message;
+ if (indeterminate == true) CurrentProgress.IsIndeterminate = !areItemsEnabled;
+ else CurrentProgress.IsIndeterminate = false;
+ VisualStateManager.GoToState(OptimizeButton, areItemsEnabled == true ? "Normal" : "Disabled", true);
+ }
+
+ public async Task LoadData(bool loadSystemPartitions)
+ {
+ Lock(false, "Loading drive information...");
+
+ // Initial delay
+ // Essential for ensuring the UI loads before starting tasks
+ await Task.Delay(100);
+
+ List items = [];
+
+ // Get the logical drives bitmask
+ uint drivesBitMask = Win32Helper.GetLogicalDrives();
+ if (drivesBitMask == 0)
+ {
+ return;
+ }
+
+ for (char driveLetter = 'A'; driveLetter <= 'Z'; driveLetter++)
+ {
+ uint mask = 1u << (driveLetter - 'A');
+ if ((drivesBitMask & mask) != 0)
+ {
+ string drive = $"{driveLetter}:\\";
+
+ StringBuilder volumeName = new(261);
+ StringBuilder fileSystemName = new(261);
+ if (Win32Helper.GetVolumeInformation(drive, volumeName, volumeName.Capacity, out _, out _, out _, fileSystemName, fileSystemName.Capacity))
+ {
+ var newDriveLetter = drive.ToString().Remove(2, 1);
+ string mediaType = GetDriveTypeDescriptionAsync(drive);
+
+ if (volumeName.ToString() != string.Empty)
+ {
+ var item = new DiskItem
+ {
+ Name = $"{volumeName} ({newDriveLetter})",
+ ImagePath = "ms-appx:///Assets/Drive.png",
+ MediaType = mediaType,
+ DriveLetter = drive,
+ };
+ if (item.MediaType == "Removable")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveRemovable.png";
+ }
+ if (item.MediaType == "Unknown")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveUnknown.png";
+ }
+ if (item.MediaType == "CD-ROM")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveOptical.png";
+ }
+ if (item.DriveLetter.Contains('C'))
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveWindows.png";
+ }
+ item.IsChecked = GetBoolFromLocalSettings(ConvertStringToNumericRepresentation(drive));
+ items.Add(item);
+ }
+ else
+ {
+ var item = new DiskItem
+ {
+ Name = $"({newDriveLetter})",
+ ImagePath = "ms-appx:///Assets/Drive.png",
+ MediaType = mediaType,
+ DriveLetter = drive,
+ };
+ if (item.MediaType == "Removable")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveRemovable.png";
+ }
+ if (item.MediaType == "Unknown")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveUnknown.png";
+ }
+ if (item.MediaType == "CD-ROM")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveOptical.png";
+ }
+ if (item.DriveLetter.Contains('C'))
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveWindows.png";
+ }
+ item.IsChecked = GetBoolFromLocalSettings(ConvertStringToNumericRepresentation(drive));
+ items.Add(item);
+ }
+ }
+ else
+ {
+ Debug.WriteLine($" Failed to get volume information for {drive}");
+ }
+ }
+ }
+
+ if (loadSystemPartitions)
+ {
+ var syspart = SystemVolumes.GetSystemVolumes();
+
+ // Add system partitions to the items list
+ foreach (var result in syspart)
+ {
+ string? driveType = string.Empty;
+ foreach (var diskitem in items)
+ {
+ if (diskitem.DriveLetter != null && diskitem.DriveLetter.Contains('C'))
+ {
+ driveType = diskitem.MediaType;
+ }
+ }
+ var item = new DiskItem
+ {
+ Name = result.FriendlyName,
+ ImagePath = "ms-appx:///Assets/DriveSystem.png",
+ MediaType = driveType,
+ DriveLetter = result.GUID,
+ };
+ if (result.GUID != null) item.IsChecked = GetBoolFromLocalSettings(ConvertStringToNumericRepresentation(result.GUID));
+ items.Add(item);
+ }
+ }
+
+ int selIndex = MyListView.SelectedIndex is not -1 ? MyListView.SelectedIndex : 0;
+
+ // Set the list view's item source
+ MyListView.ItemsSource = items;
+
+ MyListView.SelectedIndex = selIndex >= items.Count ? items.Count - 1 : selIndex;
+
+ Lock(true);
+ }
+
+ public static string ConvertStringToNumericRepresentation(string input)
+ {
+ // Create a StringBuilder to store the numeric representation
+ StringBuilder numericRepresentation = new();
+
+ // Iterate over each character in the string
+ foreach (char c in input)
+ {
+ // Convert the character to its ASCII value and append it
+ numericRepresentation.Append((int)c);
+ }
+
+ // Return the numeric representation as a string
+ return numericRepresentation.ToString();
+ }
+
+ // Method to read a bool value from LocalSettings
+ public static bool GetBoolFromLocalSettings(string name)
+ {
+ // Access the local settings
+ var localSettings = ApplicationData.Current.LocalSettings;
+
+ // Check if the key exists and return the bool value if it does
+ if (localSettings.Values.ContainsKey(name))
+ {
+ // Try to get the value and cast it to bool
+ if (localSettings.Values[name] is bool value)
+ {
+ return value;
+ }
+ }
+
+ // Return false if the key does not exist or is not a bool
+ return false;
+ }
+
+ // Method to write a bool value to LocalSettings
+ public static bool WriteBoolToLocalSettings(string name, bool value)
+ {
+ try
+ {
+ // Access the local settings
+ var localSettings = ApplicationData.Current.LocalSettings;
+
+ // Write the bool value to the settings with the given key
+ localSettings.Values[name] = value;
+
+ return true; // Return true if write is successful
+ }
+ catch
+ {
+ return false; // Return false if an error occurs
+ }
+ }
+
+ public static string GetDiskDriveFromLetter(string driveLetter)
+ {
+ try
+ {
+ var FULLSEARCHER = new ManagementObjectSearcher("root\\Microsoft\\Windows\\Storage", "SELECT * FROM MSFT_PhysicalDisk");
+ foreach (ManagementObject queryObj in FULLSEARCHER.Get().Cast())
+ {
+ string? MEDIATYPE = queryObj["MediaType"].ToString();
+ string? DEVICEID = queryObj["DeviceID"].ToString();
+
+ // Create a ManagementObjectSearcher to query the Win32_DiskDrive class
+ ManagementObjectSearcher searcher2 = new("SELECT * FROM Win32_DiskDrive");
+
+ foreach (ManagementObject disk in searcher2.Get().Cast())
+ {
+ // Get the device ID of the disk
+ string? deviceID2 = disk["DeviceID"].ToString();
+
+ // Create a ManagementObjectSearcher to query the Win32_LogicalDiskToPartition class
+ ManagementObjectSearcher partitionSearcher = new(
+ $"ASSOCIATORS OF {{Win32_DiskDrive.DeviceID='{deviceID2}'}} WHERE AssocClass=Win32_DiskDriveToDiskPartition");
+
+ foreach (ManagementObject partition in partitionSearcher.Get().Cast())
+ {
+ // Create a ManagementObjectSearcher to query the Win32_LogicalDisk class
+ ManagementObjectSearcher logicalDiskSearcher = new(
+ $"ASSOCIATORS OF {{Win32_DiskPartition.DeviceID='{partition["DeviceID"]}'}} WHERE AssocClass=Win32_LogicalDiskToPartition");
+
+ foreach (ManagementObject logicalDisk in logicalDiskSearcher.Get().Cast())
+ {
+ // Check if the logical disk is drive C
+ if (logicalDisk["DeviceID"].ToString() == driveLetter.Replace(@"\", ""))
+ {
+ if (deviceID2 != null && DEVICEID != null && deviceID2.Contains(DEVICEID))
+ {
+ string driveType = MEDIATYPE switch
+ {
+ "3" => "HDD (Hard Disk Drive)",
+ "4" => "SSD (Solid State Drive)",
+ _ => "Unknown"
+ };
+
+ return driveType;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch
+ {
+
+ }
+ return "Error";
+ }
+
+ private static async Task GetDeviceIdFromDriveAsync(string driveRoot)
+ {
+ string driveLetter = driveRoot.TrimEnd('\\'); // Clean the input
+
+ return await Task.Run(async () =>
+ {
+ string query = $"SELECT * FROM Win32_DiskDrive";
+ using (var searcher = new ManagementObjectSearcher(query))
+ {
+ foreach (ManagementObject logicalDisk in searcher.Get().Cast())
+ {
+ if ((string)logicalDisk["DeviceID"] == await GetDeviceIdFromDriveAsync(driveRoot))
+ return logicalDisk["DeviceID"]?.ToString(); // Return the DeviceID of the disk drive
+ }
+ }
+ return "Unknown"; // Fallback if not found
+ });
+ }
+
+ public static string GetDriveTypeDescriptionAsync(string driveRoot)
+ {
+ Win32Helper.DriveType driveType = Win32Helper.GetDriveType(driveRoot);
+
+ return driveType switch
+ {
+ Win32Helper.DriveType.DRIVE_REMOVABLE => "Removable",
+ Win32Helper.DriveType.DRIVE_FIXED => GetDiskDriveFromLetter(driveRoot),
+ Win32Helper.DriveType.DRIVE_REMOTE => "Network",
+ Win32Helper.DriveType.DRIVE_CDROM => "CD-ROM",
+ Win32Helper.DriveType.DRIVE_RAMDISK => "RAM Disk",
+ Win32Helper.DriveType.DRIVE_NO_ROOT_DIR => "No Root Directory",
+ _ => "Unknown",
+ };
+ }
+
+ private void Button_Click(object sender, SplitButtonClickEventArgs e)
+ {
+ OptimizeSelected(AdvancedView.IsOn);
+ }
+
+ public static void RestartAsAdmin(string args)
+ {
+ var packageName = Package.Current.Id.FamilyName;
+ var appId = CoreApplication.Id;
+
+ // Request elevation
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ Arguments = $"-Command \"Start-Process 'shell:AppsFolder\\{packageName}!{appId}' -ArgumentList @('{args}') -Verb RunAs\"",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ Verb = "runas"
+ };
+
+ try
+ {
+ Process.Start(startInfo);
+ App.Current.Exit();
+ }
+ catch
+ {
+
+ }
+ }
+
+ public async void OptimizeSelected(bool systemPartitions)
+ {
+ AdvancedView.IsOn = systemPartitions;
+
+ if (!IsAdministrator())
+ {
+ RestartAsAdmin($"SELECTED{(systemPartitions ? "-SYSTEM" : "")} {MyListView.SelectedIndex}");
+ return;
+ }
+
+ foreach (var item in (List)MyListView.ItemsSource)
+ {
+ if (item?.IsChecked == true)
+ {
+ Lock(false, "Loading...", true);
+
+ MyListView.SelectedIndex = ((List)MyListView.ItemsSource).IndexOf(item);
+
+ string scriptPath = "C:\\Rebound11\\rdfrgui.ps1";
+ string? volume = item?.DriveLetter?.ToString().Remove(1, 2);
+ string arguments = $@"
+$job = Start-Job -ScriptBlock {{
+ $global:OutputLines = @()
+
+ # Capture all output including verbose messages
+ Optimize-Volume -DriveLetter {volume} -Defrag -Verbose | ForEach-Object {{
+ # Check if it's a progress update
+ if ($_ -like ""*Progress*"") {{
+ Write-Output ""Progress: $_"" # Modify to capture progress as needed
+ }} else {{
+ $global:OutputLines += $_
+ Write-Output $_ # Output normal messages
+ }}
+ }}
+}}
+
+while ($job.State -eq 'Running') {{
+ Clear-Host
+ Start-Sleep -Seconds 0.01
+ $output = Receive-Job -Id $job.Id -Keep
+ if ($output) {{
+ Write-Output $output[-1] # Output the last line
+ }}
+}}
+
+# Final output after the job completes
+Receive-Job -Id $job.Id | ForEach-Object {{ Write-Output $_ }}
+
+";
+
+ // Ensure the script is written before proceeding
+ await File.WriteAllTextAsync(scriptPath, arguments);
+
+ try
+ {
+ if (DetailsBar.Severity == InfoBarSeverity.Error)
+ {
+ LoadSelectedItemInfo("Cannot be optimized. Skipping...");
+ await Task.Delay(1000);
+ continue;
+ }
+ var processInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ Arguments = $"-ExecutionPolicy Bypass -File \"{scriptPath}\"", // Use -File to execute the script
+ RedirectStandardOutput = true,
+ RedirectStandardError = true,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ Verb = "runas" // Run as administrator
+ };
+
+ using var process = new Process { StartInfo = processInfo };
+
+ string outputData = "0";
+ bool updateData = true;
+
+ var alreadyUsed = new List();
+
+ process.OutputDataReceived += UpdateOutput;
+
+ void UpdateOutput(object sender, DataReceivedEventArgs args)
+ {
+ // Only process if there's data
+ if (!string.IsNullOrEmpty(args.Data))
+ {
+ // Use the dispatcher to update the UI
+ DispatcherQueue.TryEnqueue(() => { UpdateIO(args.Data); });
+
+ // Store the output data
+ outputData = "\n" + args.Data;
+ }
+ }
+
+ process.Start();
+ process.BeginOutputReadLine();
+
+ Lock(false, "", true);
+ LoadSelectedItemInfo("Optimizing...");
+
+ void UpdateIO(string data)
+ {
+ if (!updateData) return;
+
+ if (data.Contains("VERBOSE: ") && data.Contains(" complete."))
+ {
+ string a = data[data.LastIndexOf("VERBOSE: ")..].Replace("VERBOSE: ", string.Empty);
+
+ string dataToReplace = " complete.";
+
+ DispatcherQueue.TryEnqueue(() => { RunUpdate(a, dataToReplace); });
+ }
+ }
+
+ void RunUpdate(string a, string dataToReplace)
+ {
+ if (alreadyUsed.Contains(a) != true)
+ {
+ alreadyUsed.Add(a);
+ CurrentProgress.Value = GetMaxPercentage(a);
+ CurrentProgress.IsIndeterminate = false;
+ SetProgressState(TaskbarProgressBarState.Normal);
+ SetProgressValue((int)CurrentProgress.Value, (int)CurrentProgress.Maximum);
+ if (a.Contains(" complete..."))
+ {
+ dataToReplace = " complete...";
+ if (item?.DriveLetter?.ToString().Contains('}') != true) CurrentDisk.Text = $"Drive {volume}: - {a.Remove(a.IndexOf(" complete..."))}";
+ else CurrentDisk.Text = $"{((DiskItem)MyListView.SelectedItem).Name} - {a.Remove(a.IndexOf(" complete..."))}";
+ }
+ else if (a.Contains(" complete."))
+ {
+ dataToReplace = " complete.";
+ if (item?.DriveLetter?.ToString().Contains('}') != true) CurrentDisk.Text = $"Drive {volume}: - {a.Remove(a.IndexOf(" complete."))}";
+ else CurrentDisk.Text = $"{((DiskItem)MyListView.SelectedItem).Name} - {a.Remove(a.IndexOf(" complete."))}";
+
+ }
+ }
+ }
+
+ await process.WaitForExitAsync();
+
+ updateData = false;
+ Lock(true);
+ LoadSelectedItemInfo(GetStatus());
+ File.Delete(scriptPath);
+ alreadyUsed.Clear();
+ CurrentProgress.Value = 0;
+ SetProgressState(TaskbarProgressBarState.NoProgress);
+ }
+ catch (System.ComponentModel.Win32Exception ex) when (ex.NativeErrorCode == 1223)
+ {
+ ShowMessage("Defragmentation was canceled by the user.");
+ }
+ catch (Exception ex)
+ {
+ ShowMessage($"Error: {ex.Message}");
+ }
+ }
+ }
+ }
+
+ private static int GetMaxPercentage(string data)
+ {
+ static string KeepOnlyNumbers(string input)
+ {
+ StringBuilder sb = new();
+
+ foreach (char c in input)
+ {
+ if (char.IsDigit(c))
+ {
+ sb.Append(c);
+ }
+ }
+
+ return sb.ToString();
+ }
+ var match = KeepOnlyNumbers(data);
+ return int.Parse(match);
+ }
+
+ public async void OptimizeAll(bool close, bool systemPartitions)
+ {
+ AdvancedView.IsOn = systemPartitions;
+
+ await LoadData(systemPartitions);
+
+ MyListView.IsEnabled = false;
+
+ if (!IsAdministrator())
+ {
+ if (close == true) RestartAsAdmin($"OPTIMIZEALLANDCLOSE{(systemPartitions ? "-SYSTEM" : "")}");
+ else RestartAsAdmin($"OPTIMIZEALL{(systemPartitions ? "-SYSTEM" : "")}");
+ return;
+ }
+
+ int i = 0;
+ int j = ((List)MyListView.ItemsSource).Count;
+
+ MyListView.SelectedIndex = 0;
+
+ foreach (var item in (List)MyListView.ItemsSource)
+ {
+ Lock(false, "Optimizing...", true);
+
+ string scriptPath = "C:\\Rebound11\\rdfrgui.ps1";
+ string? volume = item.DriveLetter?.ToString().Remove(1, 2);
+ string arguments = $@"
+$job = Start-Job -ScriptBlock {{
+ $global:OutputLines = @()
+
+ # Capture all output including verbose messages
+ Optimize-Volume -DriveLetter {volume} -Defrag -Verbose | ForEach-Object {{
+ # Check if it's a progress update
+ if ($_ -like ""*Progress*"") {{
+ Write-Output ""Progress: $_"" # Modify to capture progress as needed
+ }} else {{
+ $global:OutputLines += $_
+ Write-Output $_ # Output normal messages
+ }}
+ }}
+}}
+
+while ($job.State -eq 'Running') {{
+ Clear-Host
+ Start-Sleep -Seconds 0.01
+ $output = Receive-Job -Id $job.Id -Keep
+ if ($output) {{
+ Write-Output $output[-1] # Output the last line
+ }}
+}}
+
+# Final output after the job completes
+Receive-Job -Id $job.Id | ForEach-Object {{ Write-Output $_ }}
+
+";
+
+ // Ensure the script is written before proceeding
+ await File.WriteAllTextAsync(scriptPath, arguments);
+
+ try
+ {
+ i++;
+
+ if (DetailsBar.Severity == InfoBarSeverity.Error)
+ {
+ LoadSelectedItemInfo("Cannot be optimized. Skipping...");
+ await Task.Delay(1000);
+ if (MyListView.SelectedIndex + 1 != j) MyListView.SelectedIndex++;
+ continue;
+ }
+ var processInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ Arguments = $"-ExecutionPolicy Bypass -File \"{scriptPath}\"", // Use -File to execute the script
+ RedirectStandardOutput = true,
+ RedirectStandardError = true,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ Verb = "runas" // Run as administrator
+ };
+
+ using var process = new Process { StartInfo = processInfo };
+
+ string outputData = "0";
+ bool updateData = true;
+
+ var alreadyUsed = new List();
+
+ process.OutputDataReceived += UpdateOutput;
+
+ void UpdateOutput(object sender, DataReceivedEventArgs args)
+ {
+ // Only process if there's data
+ if (!string.IsNullOrEmpty(args.Data))
+ {
+ // Use the dispatcher to update the UI
+ DispatcherQueue.TryEnqueue(() => { UpdateIO(args.Data); });
+
+ // Store the output data
+ outputData = "\n" + args.Data;
+ }
+ }
+
+ process.Start();
+ process.BeginOutputReadLine();
+
+ Lock(false, "", true);
+ LoadSelectedItemInfo("Optimizing...");
+
+ void UpdateIO(string data)
+ {
+ if (!updateData) return;
+
+ if (data.Contains("VERBOSE: ") && data.Contains(" complete."))
+ {
+ string a = data[data.LastIndexOf("VERBOSE: ")..].Replace("VERBOSE: ", string.Empty);
+
+ string dataToReplace = " complete.";
+
+ DispatcherQueue.TryEnqueue(() => { RunUpdate(a, dataToReplace); });
+ }
+ }
+
+ void RunUpdate(string a, string dataToReplace)
+ {
+ if (alreadyUsed.Contains(a) != true)
+ {
+ alreadyUsed.Add(a);
+ CurrentProgress.IsIndeterminate = false;
+ CurrentProgress.Value = GetMaxPercentage(a);
+ SetProgressState(TaskbarProgressBarState.Normal);
+ SetProgressValue((int)CurrentProgress.Value, (int)CurrentProgress.Maximum);
+ if (a.Contains(" complete..."))
+ {
+ dataToReplace = " complete...";
+ if (item.DriveLetter?.ToString().Contains('}') != true) CurrentDisk.Text = $"Drive {i}/{j} ({volume}:) - {a.Remove(a.IndexOf(" complete..."))}";
+ else CurrentDisk.Text = $"{((DiskItem)MyListView.SelectedItem).Name} ({i}/{j}) - {a.Remove(a.IndexOf(" complete..."))}";
+ }
+ else if (a.Contains(" complete."))
+ {
+ dataToReplace = " complete.";
+ if (item.DriveLetter?.ToString().Contains('}') != true) CurrentDisk.Text = $"Drive {i}/{j} ({volume}:) - {a.Remove(a.IndexOf(" complete."))}";
+ else CurrentDisk.Text = $"{((DiskItem)MyListView.SelectedItem).Name} ({i}/{j}) - {a.Remove(a.IndexOf(" complete."))}";
+
+ }
+ }
+ }
+
+ await process.WaitForExitAsync();
+
+ updateData = false;
+ Lock(true, "", false);
+ LoadSelectedItemInfo(GetStatus());
+ File.Delete(scriptPath);
+ alreadyUsed.Clear();
+ CurrentProgress.Value = 0;
+ SetProgressState(TaskbarProgressBarState.NoProgress);
+ if (MyListView.SelectedIndex + 1 != j) MyListView.SelectedIndex++;
+ }
+ catch (System.ComponentModel.Win32Exception ex) when (ex.NativeErrorCode == 1223)
+ {
+ ShowMessage("Defragmentation was canceled by the user.");
+ }
+ catch (Exception ex)
+ {
+ ShowMessage($"Error: {ex.Message}");
+ }
+ }
+
+ i = 0;
+
+ MyListView.IsEnabled = true;
+
+ if (close == true) Close();
+ }
+
+ private async void ShowMessage(string message)
+ {
+ try
+ {
+ var dialog = new ContentDialog
+ {
+ Title = "Defragmentation",
+ Content = message,
+ CloseButtonText = "OK",
+ XamlRoot = Content.XamlRoot
+ };
+ _ = await dialog.ShowAsync();
+ }
+ catch
+ {
+
+ }
+ }
+
+ private void MenuFlyoutItem_Click(object sender, RoutedEventArgs e)
+ {
+ OptimizeSelected(AdvancedView.IsOn);
+ }
+
+ private void MenuFlyoutItem_Click_1(object sender, RoutedEventArgs e)
+ {
+ OptimizeAll(false, AdvancedView.IsOn);
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ if (IsAdministrator() != true)
+ {
+ RestartAsAdmin($"TASK");
+ return;
+ }
+
+ OpenTaskWindow();
+ }
+
+ public async void CheckTask()
+ {
+ await Task.Delay(100);
+ try
+ {
+ ScheduledOptimizationDetails.Text = GetTaskFrequency();
+ if (GetTaskFrequency() is not "Off")
+ {
+ ScheduledTaskText.Text = "Configure";
+ }
+ else
+ {
+ ScheduledTaskText.Text = "Turn on";
+ }
+
+ CheckTask();
+ }
+ catch
+ {
+
+ }
+ }
+
+ public void OpenTaskWindow()
+ {
+ var win = new ScheduledOptimization(this.AppWindow.Position.X, this.AppWindow.Position.Y);
+ Win32Helper.CreateModalWindow(this, win, true, true);
+ }
+
+ private void Button_Click_2(object sender, RoutedEventArgs e)
+ {
+ LoadSelectedItemInfo(GetStatus());
+ }
+
+ private async void AdvancedView_Toggled(object sender, RoutedEventArgs e)
+ {
+ WriteBoolToLocalSettings("Advanced", AdvancedView.IsOn);
+ await LoadData(AdvancedView.IsOn);
+ }
+
+ private async void MenuFlyoutItem_Click_2(object sender, RoutedEventArgs e)
+ {
+ await Launcher.LaunchUriAsync(new Uri("https://ivirius.vercel.app/docs/rebound11/defragment-and-optimize-drives/"));
+ }
+
+ private void CheckBox_Click(object? sender, RoutedEventArgs e)
+ {
+ var name = ((DiskItem?)((CheckBox?)sender)?.DataContext)?.DriveLetter;
+ var isChecked = ((CheckBox?)sender)?.IsChecked;
+ if (name != null && isChecked != null) WriteBoolToLocalSettings(ConvertStringToNumericRepresentation(name), (bool)isChecked);
+ }
+
+ public static string GetTaskFrequency()
+ {
+ using (TaskService ts = new())
+ {
+ // Specify the path to the task in Task Scheduler
+ TaskFolder defragFolder = ts.GetFolder(@"Microsoft\Windows\Defrag");
+
+ // Retrieve the scheduled task
+ Microsoft.Win32.TaskScheduler.Task task = defragFolder.GetTasks()["ScheduledDefrag"];
+
+ if (task.Enabled != true)
+ {
+ return $"Off";
+ }
+
+ if (task != null)
+ {
+ // Check the triggers for their type
+ foreach (var trigger in task.Definition.Triggers)
+ {
+ switch (trigger)
+ {
+ case DailyTrigger _:
+ return "On (Frequency: daily)";
+ case WeeklyTrigger _:
+ return "On (Frequency: weekly)";
+ case MonthlyTrigger _:
+ return "On (Frequency: monthly)";
+ }
+ }
+
+ return "On (Frequency: unknown)";
+ }
+ else
+ {
+ return $"Off";
+ }
+ }
+ }
+
+ public static string GetTaskCommand()
+ {
+ using (TaskService ts = new())
+ {
+ // Specify the path to the task in Task Scheduler
+ TaskFolder defragFolder = ts.GetFolder(@"Microsoft\Windows\Defrag");
+
+ // Retrieve the scheduled task
+ Microsoft.Win32.TaskScheduler.Task task = defragFolder.GetTasks()["ScheduledDefrag"];
+
+ if (task != null)
+ {
+ // Check the triggers for their type
+ foreach (var action in task.Definition.Actions)
+ {
+ if (action is ExecAction ex)
+ {
+ return ex.Arguments;
+ }
+ }
+
+ return "None";
+ }
+ else
+ {
+ return $"None";
+ }
+ }
+ }
+
+ private void MenuFlyoutItem_Click_3(object sender, RoutedEventArgs e)
+ {
+ Process.Start("dfrgui.exe");
+ Close();
+ }
+ }
+
+ public class DefragInfo
+ {
+ public static List GetEventLogEntriesForID(int eventID)
+ {
+ List eventMessages = [];
+
+ // Define the query
+ string logName = "Application"; // Windows Logs > Application
+ string queryStr = "*[System/EventID=" + eventID + "]";
+
+ EventLogQuery query = new(logName, PathType.LogName, queryStr);
+
+ // Create the reader
+ using (EventLogReader reader = new(query))
+ {
+ for (EventRecord eventInstance = reader.ReadEvent(); eventInstance != null; eventInstance = reader.ReadEvent())
+ {
+ // Extract the message from the event
+ string sb = string.Concat(eventInstance.TimeCreated.ToString(), eventInstance.FormatDescription().ToString().AsSpan(eventInstance.FormatDescription().ToString().Length - 4));
+
+ eventMessages.Add(sb.ToString());
+ }
+ }
+
+ return eventMessages;
+ }
+ }
+}
diff --git a/Defrag/Package.appxmanifest b/Defrag/Package.appxmanifest
new file mode 100644
index 0000000..8f362b3
--- /dev/null
+++ b/Defrag/Package.appxmanifest
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+ Rebound.Defrag
+ Lenovo
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Defrag/Properties/launchSettings.json b/Defrag/Properties/launchSettings.json
new file mode 100644
index 0000000..aae6a54
--- /dev/null
+++ b/Defrag/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "Rebound.Defrag (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "Rebound.Defrag (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Defrag/Rebound.Defrag.csproj b/Defrag/Rebound.Defrag.csproj
new file mode 100644
index 0000000..e4355ce
--- /dev/null
+++ b/Defrag/Rebound.Defrag.csproj
@@ -0,0 +1,98 @@
+
+
+ WinExe
+ net8.0-windows10.0.19041.0
+ 10.0.17763.0
+ Rebound.Defrag
+ app.manifest
+ x86;x64;ARM64
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ win-$(Platform).pubxml
+ true
+ true
+ 10.0.22621.35-preview
+ True
+ True
+ SHA256
+ False
+ False
+ True
+ Never
+ C:\Users\Lenovo\Desktop\rdfrgui
+ 0
+ Rebound.Defrag.ico
+ 805D9FAF3E251362A569D694C3D7834BE80FE5B8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/Defrag/Rebound.Defrag.ico b/Defrag/Rebound.Defrag.ico
new file mode 100644
index 0000000..a58321e
Binary files /dev/null and b/Defrag/Rebound.Defrag.ico differ
diff --git a/Defrag/ScheduledOptimization.xaml b/Defrag/ScheduledOptimization.xaml
new file mode 100644
index 0000000..356ba9b
--- /dev/null
+++ b/Defrag/ScheduledOptimization.xaml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Defrag/ScheduledOptimization.xaml.cs b/Defrag/ScheduledOptimization.xaml.cs
new file mode 100644
index 0000000..e5ae4fc
--- /dev/null
+++ b/Defrag/ScheduledOptimization.xaml.cs
@@ -0,0 +1,424 @@
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Win32.TaskScheduler;
+using Rebound.Defrag.Helpers;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Text;
+using WinUIEx;
+using static Rebound.Defrag.MainWindow;
+using Task = System.Threading.Tasks.Task;
+
+#nullable enable
+
+namespace Rebound.Defrag
+{
+ public sealed partial class ScheduledOptimization : WindowEx
+ {
+ public ScheduledOptimization(int parentX, int parentY)
+ {
+ this.InitializeComponent();
+ Win32Helper.RemoveIcon(this);
+ IsMaximizable = false;
+ IsMinimizable = false;
+ this.MoveAndResize(parentX + 50, parentY + 50, 550, 600);
+ IsResizable = false;
+ Title = "Scheduled optimization";
+ SystemBackdrop = new MicaBackdrop();
+ AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ LoadData();
+ if (GetTaskFrequency() is not "Off")
+ {
+ EnableTaskSwitch.IsOn = true;
+ if (GetTaskFrequency().Contains("daily", StringComparison.CurrentCultureIgnoreCase))
+ {
+ Frequency.SelectedIndex = 0;
+ }
+ if (GetTaskFrequency().Contains("weekly", StringComparison.CurrentCultureIgnoreCase))
+ {
+ Frequency.SelectedIndex = 1;
+ }
+ if (GetTaskFrequency().Contains("monthly", StringComparison.CurrentCultureIgnoreCase))
+ {
+ Frequency.SelectedIndex = 2;
+ }
+ }
+ CheckIsOn();
+ CheckData();
+ }
+
+ public async void CheckData()
+ {
+ await Task.Delay(500);
+
+ if (GetTaskCommand().Contains("/E"))
+ {
+ OptimizeNew.IsChecked = true;
+ foreach (var disk in (List)MyListView.ItemsSource)
+ {
+ string? letter;
+ if (disk.DriveLetter != null && disk.DriveLetter.EndsWith('\\'))
+ {
+ letter = disk.DriveLetter[..^1];
+ }
+ else
+ {
+ letter = disk.DriveLetter;
+ }
+ if (letter != null && GetTaskCommand().Contains(letter))
+ {
+ disk.IsChecked = false;
+ }
+ else
+ {
+ disk.IsChecked = true;
+ }
+ }
+ }
+ else
+ {
+ OptimizeNew.IsChecked = false;
+ foreach (var disk in (List)MyListView.ItemsSource)
+ {
+ string? letter;
+ if (disk.DriveLetter != null && disk.DriveLetter.EndsWith('\\'))
+ {
+ letter = disk.DriveLetter[..^1];
+ }
+ else
+ {
+ letter = disk.DriveLetter;
+ }
+ if (letter != null && GetTaskCommand().Contains(letter))
+ {
+ disk.IsChecked = true;
+ }
+ else
+ {
+ disk.IsChecked = false;
+ }
+ }
+ }
+ CheckSelectAll();
+ }
+
+ public static void ScheduleDefragTask(List items, bool optimizeNewDrives, string scheduleFrequency)
+ {
+ using (TaskService ts = new())
+ {
+ // Create or open the Defrag folder in Task Scheduler
+ TaskFolder defragFolder = ts.GetFolder(@"\Microsoft\Windows\Defrag");
+
+ // Retrieve the ScheduledDefrag task if it exists
+ Microsoft.Win32.TaskScheduler.Task scheduledDefrag = defragFolder.GetTasks()["ScheduledDefrag"];
+
+ // If the task exists, we'll modify it
+ TaskDefinition td;
+ if (scheduledDefrag != null)
+ {
+ td = scheduledDefrag.Definition;
+ }
+ else
+ {
+ td = ts.NewTask();
+ td.RegistrationInfo.Description = "Scheduled Defrag Task";
+ td.Settings.Priority = ProcessPriorityClass.High;
+ td.Settings.Volatile = false;
+ td.Settings.RunOnlyIfLoggedOn = false;
+ }
+
+ // Set triggers based on the scheduleFrequency input
+ td.Triggers.Clear();
+ switch (scheduleFrequency.ToLower())
+ {
+ case "daily":
+ td.Triggers.Add(new DailyTrigger { DaysInterval = 1 });
+ break;
+ case "weekly":
+ td.Triggers.Add(new WeeklyTrigger { DaysOfWeek = DaysOfTheWeek.Sunday });
+ break;
+ case "monthly":
+ td.Triggers.Add(new MonthlyTrigger { DaysOfMonth = [1] });
+ break;
+ default:
+ throw new ArgumentException("Invalid schedule frequency");
+ }
+
+ // Build the defrag command with selected drives
+ if (optimizeNewDrives == true)
+ {
+ List drives = [];
+ foreach (DiskItem disk in items)
+ {
+ if (disk.IsChecked == false)
+ {
+ string? letter;
+ if (disk.DriveLetter != null && disk.DriveLetter.EndsWith('\\'))
+ {
+ letter = disk.DriveLetter[..^1];
+ }
+ else
+ {
+ letter = disk.DriveLetter;
+ }
+ if (letter != null) drives.Add(letter);
+ }
+ }
+ string defragCommand = string.Join(" ", drives);
+ td.Actions.Clear();
+ td.Actions.Add(new ExecAction("%SystemRoot%\\System32\\defrag.exe", $"/E {defragCommand}", null)); // Optimizing the drives
+ }
+ else
+ {
+ List drives = [];
+ foreach (DiskItem disk in items)
+ {
+ if (disk.IsChecked == true)
+ {
+ string? letter;
+ if (disk.DriveLetter != null && disk.DriveLetter.EndsWith('\\'))
+ {
+ letter = disk.DriveLetter[..^1];
+ }
+ else
+ {
+ letter = disk.DriveLetter;
+ }
+ if (letter != null) drives.Add(letter);
+ }
+ }
+ string defragCommand = string.Join(" ", drives);
+ td.Actions.Clear();
+ td.Actions.Add(new ExecAction("%SystemRoot%\\System32\\defrag.exe", $"{defragCommand} /O", null)); // Optimizing the drives
+ }
+
+ // Register or update the task
+ defragFolder.RegisterTaskDefinition("ScheduledDefrag", td);
+
+ // Retrieve the ScheduledDefrag task if it exists
+ Microsoft.Win32.TaskScheduler.Task newScheduledDefrag = defragFolder.GetTasks()["ScheduledDefrag"];
+
+ newScheduledDefrag.Enabled = true;
+ }
+ }
+
+ public static void TurnOffDefragTask()
+ {
+ using (TaskService ts = new())
+ {
+ // Create or open the Defrag folder in Task Scheduler
+ TaskFolder defragFolder = ts.GetFolder(@"\Microsoft\Windows\Defrag");
+
+ // Retrieve the ScheduledDefrag task if it exists
+ Microsoft.Win32.TaskScheduler.Task scheduledDefrag = defragFolder.GetTasks()["ScheduledDefrag"];
+
+ scheduledDefrag.Enabled = false;
+ }
+ }
+
+ public async void LoadData()
+ {
+ // Initial delay
+ // Essential for ensuring the UI loads before starting tasks
+ await Task.Delay(100);
+
+ List items = [];
+
+ // Get the logical drives bitmask
+ uint drivesBitMask = Win32Helper.GetLogicalDrives();
+ if (drivesBitMask == 0)
+ {
+ return;
+ }
+
+ for (char driveLetter = 'A'; driveLetter <= 'Z'; driveLetter++)
+ {
+ uint mask = 1u << (driveLetter - 'A');
+ if ((drivesBitMask & mask) != 0)
+ {
+ string drive = $"{driveLetter}:\\";
+
+ StringBuilder volumeName = new(261);
+ StringBuilder fileSystemName = new(261);
+ if (Win32Helper.GetVolumeInformation(drive, volumeName, volumeName.Capacity, out _, out _, out _, fileSystemName, fileSystemName.Capacity))
+ {
+ var newDriveLetter = drive.ToString().Remove(2, 1);
+ string mediaType = GetDriveTypeDescriptionAsync(drive);
+
+ if (volumeName.ToString() != string.Empty)
+ {
+ var item = new DiskItem
+ {
+ Name = $"{volumeName} ({newDriveLetter})",
+ ImagePath = "ms-appx:///Assets/Drive.png",
+ MediaType = mediaType,
+ DriveLetter = drive,
+ };
+ if (item.MediaType == "Removable")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveRemovable.png";
+ }
+ if (item.MediaType == "Unknown")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveUnknown.png";
+ }
+ if (item.MediaType == "CD-ROM")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveOptical.png";
+ }
+ if (item.DriveLetter.Contains('C'))
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveWindows.png";
+ }
+ items.Add(item);
+ }
+ else
+ {
+ var item = new DiskItem
+ {
+ Name = $"({newDriveLetter})",
+ ImagePath = "ms-appx:///Assets/Drive.png",
+ MediaType = mediaType,
+ DriveLetter = drive,
+ };
+ if (item.MediaType == "Removable")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveRemovable.png";
+ }
+ if (item.MediaType == "Unknown")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveUnknown.png";
+ }
+ if (item.MediaType == "CD-ROM")
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveOptical.png";
+ }
+ if (item.DriveLetter.Contains('C'))
+ {
+ item.ImagePath = "ms-appx:///Assets/DriveWindows.png";
+ }
+ items.Add(item);
+ }
+ }
+ else
+ {
+ Debug.WriteLine($" Failed to get volume information for {drive}");
+ }
+ }
+ }
+
+ int selIndex = MyListView.SelectedIndex is not -1 ? MyListView.SelectedIndex : 0;
+
+ // Set the list view's item source
+ MyListView.ItemsSource = items;
+
+ MyListView.SelectedIndex = selIndex >= items.Count ? items.Count - 1 : selIndex;
+ }
+
+ private void Button_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
+ {
+ OptimizeNew.IsChecked ??= true;
+
+ var frequencyItem = Frequency.SelectedItem as ComboBoxItem;
+ string frequencyContent = frequencyItem?.Content?.ToString() ?? string.Empty;
+
+ if (EnableTaskSwitch.IsOn == true)
+ {
+ ScheduleDefragTask((List?)MyListView.ItemsSource ?? [], OptimizeNew.IsChecked ?? false, frequencyContent);
+ Close();
+ return;
+ }
+ else
+ {
+ TurnOffDefragTask();
+ Close();
+ return;
+ }
+ }
+
+ private void Button_Click_1(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
+ {
+ Close();
+ }
+
+ private void EnableTaskSwitch_Toggled(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
+ {
+ CheckIsOn();
+ }
+
+ public void CheckIsOn()
+ {
+ MyListView.IsEnabled = Frequency.IsEnabled = OptimizeNew.IsEnabled = SelectAllBox.IsEnabled = EnableTaskSwitch.IsOn;
+ }
+
+ private async void CheckBox_Checked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
+ {
+ await Task.Delay(50);
+ CheckSelectAll();
+ }
+
+ public void CheckSelectAll()
+ {
+ int checkedItems = 0;
+ foreach (var item in (List)MyListView.ItemsSource)
+ {
+ if (item.IsChecked == true)
+ checkedItems++;
+ }
+ if (checkedItems == ((List)MyListView.ItemsSource).Count)
+ {
+ SelectAllBox.IsChecked = true;
+ return;
+ }
+ else if (checkedItems == 0)
+ {
+ SelectAllBox.IsChecked = false;
+ return;
+ }
+ else
+ {
+ SelectAllBox.IsChecked = null;
+ return;
+ }
+ }
+
+ private async void CheckBox_Checked_1(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
+ {
+ await Task.Delay(50);
+ List list = [];
+ if (SelectAllBox.IsChecked == true)
+ {
+ foreach (var item in (List)MyListView.ItemsSource)
+ {
+ list.Add(new()
+ {
+ DriveLetter = item.DriveLetter,
+ ImagePath = item.ImagePath,
+ IsChecked = true,
+ MediaType = item.MediaType,
+ Name = item.Name,
+ ProgressValue = item.ProgressValue,
+ });
+ }
+ }
+ else if (SelectAllBox.IsChecked == false)
+ {
+ foreach (var item in (List)MyListView.ItemsSource)
+ {
+ list.Add(new()
+ {
+ DriveLetter = item.DriveLetter,
+ ImagePath = item.ImagePath,
+ IsChecked = false,
+ MediaType = item.MediaType,
+ Name = item.Name,
+ ProgressValue = item.ProgressValue,
+ });
+ }
+ }
+ MyListView.ItemsSource = list;
+ CheckSelectAll();
+ }
+ }
+}
diff --git a/Defrag/app.manifest b/Defrag/app.manifest
new file mode 100644
index 0000000..4fac49d
--- /dev/null
+++ b/Defrag/app.manifest
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Rebound.sln b/Rebound.sln
new file mode 100644
index 0000000..711317c
--- /dev/null
+++ b/Rebound.sln
@@ -0,0 +1,163 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34616.47
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound", "Rebound\Rebound.csproj", "{4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound.Defrag", "Defrag\Rebound.Defrag.csproj", "{86C0359D-C08A-4963-9B77-2400F5039232}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound.Cleanup", "Cleanup\Rebound.Cleanup.csproj", "{C946D646-4659-4B05-91A2-15FF51D736D5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound.Run", "Run\Rebound.Run.csproj", "{632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound.SysInfo", "SysInfo\Rebound.SysInfo.csproj", "{389B26A3-70CA-4200-8CFA-88A131E909E2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound.TrustedPlatform", "TrustedPlatform\Rebound.TrustedPlatform.csproj", "{27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rebound.About", "About\Rebound.About.csproj", "{BF701670-43B6-4621-9564-84215313590C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|ARM64.Build.0 = Debug|ARM64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x64.ActiveCfg = Debug|x64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x64.Build.0 = Debug|x64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x64.Deploy.0 = Debug|x64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x86.ActiveCfg = Debug|x86
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x86.Build.0 = Debug|x86
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x86.Deploy.0 = Debug|x86
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|ARM64.ActiveCfg = Release|ARM64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|ARM64.Build.0 = Release|ARM64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|ARM64.Deploy.0 = Release|ARM64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x64.ActiveCfg = Release|x64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x64.Build.0 = Release|x64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x64.Deploy.0 = Release|x64
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x86.ActiveCfg = Release|x86
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x86.Build.0 = Release|x86
+ {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x86.Deploy.0 = Release|x86
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|ARM64.Build.0 = Debug|ARM64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|x64.ActiveCfg = Debug|x64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|x64.Build.0 = Debug|x64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|x64.Deploy.0 = Debug|x64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|x86.ActiveCfg = Debug|x86
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|x86.Build.0 = Debug|x86
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Debug|x86.Deploy.0 = Debug|x86
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|ARM64.ActiveCfg = Release|ARM64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|ARM64.Build.0 = Release|ARM64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|ARM64.Deploy.0 = Release|ARM64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|x64.ActiveCfg = Release|x64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|x64.Build.0 = Release|x64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|x64.Deploy.0 = Release|x64
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|x86.ActiveCfg = Release|x86
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|x86.Build.0 = Release|x86
+ {86C0359D-C08A-4963-9B77-2400F5039232}.Release|x86.Deploy.0 = Release|x86
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|ARM64.Build.0 = Debug|ARM64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|x64.ActiveCfg = Debug|x64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|x64.Build.0 = Debug|x64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|x64.Deploy.0 = Debug|x64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|x86.ActiveCfg = Debug|x86
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|x86.Build.0 = Debug|x86
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Debug|x86.Deploy.0 = Debug|x86
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|ARM64.ActiveCfg = Release|ARM64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|ARM64.Build.0 = Release|ARM64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|ARM64.Deploy.0 = Release|ARM64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|x64.ActiveCfg = Release|x64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|x64.Build.0 = Release|x64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|x64.Deploy.0 = Release|x64
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|x86.ActiveCfg = Release|x86
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|x86.Build.0 = Release|x86
+ {C946D646-4659-4B05-91A2-15FF51D736D5}.Release|x86.Deploy.0 = Release|x86
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|ARM64.Build.0 = Debug|ARM64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|x64.ActiveCfg = Debug|x64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|x64.Build.0 = Debug|x64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|x64.Deploy.0 = Debug|x64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|x86.ActiveCfg = Debug|x86
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|x86.Build.0 = Debug|x86
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Debug|x86.Deploy.0 = Debug|x86
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|ARM64.ActiveCfg = Release|ARM64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|ARM64.Build.0 = Release|ARM64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|ARM64.Deploy.0 = Release|ARM64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|x64.ActiveCfg = Release|x64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|x64.Build.0 = Release|x64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|x64.Deploy.0 = Release|x64
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|x86.ActiveCfg = Release|x86
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|x86.Build.0 = Release|x86
+ {632D4E75-5E9A-4F8E-A80D-F88C5EB8BD66}.Release|x86.Deploy.0 = Release|x86
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|ARM64.Build.0 = Debug|ARM64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|x64.ActiveCfg = Debug|x64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|x64.Build.0 = Debug|x64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|x64.Deploy.0 = Debug|x64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|x86.ActiveCfg = Debug|x86
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|x86.Build.0 = Debug|x86
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Debug|x86.Deploy.0 = Debug|x86
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|ARM64.ActiveCfg = Release|ARM64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|ARM64.Build.0 = Release|ARM64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|ARM64.Deploy.0 = Release|ARM64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|x64.ActiveCfg = Release|x64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|x64.Build.0 = Release|x64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|x64.Deploy.0 = Release|x64
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|x86.ActiveCfg = Release|x86
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|x86.Build.0 = Release|x86
+ {389B26A3-70CA-4200-8CFA-88A131E909E2}.Release|x86.Deploy.0 = Release|x86
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|ARM64.ActiveCfg = Debug|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|ARM64.Build.0 = Debug|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|ARM64.Deploy.0 = Debug|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|x64.ActiveCfg = Debug|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|x64.Build.0 = Debug|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|x64.Deploy.0 = Debug|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|x86.ActiveCfg = Debug|x86
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|x86.Build.0 = Debug|x86
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Debug|x86.Deploy.0 = Debug|x86
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|ARM64.ActiveCfg = Release|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|ARM64.Build.0 = Release|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|ARM64.Deploy.0 = Release|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|x64.ActiveCfg = Release|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|x64.Build.0 = Release|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|x64.Deploy.0 = Release|x64
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|x86.ActiveCfg = Release|x86
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|x86.Build.0 = Release|x86
+ {27052CF4-EC88-4FCB-8B2C-6D45ABFA7BB6}.Release|x86.Deploy.0 = Release|x86
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|ARM64.Build.0 = Debug|ARM64
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|x64.ActiveCfg = Debug|x64
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|x64.Build.0 = Debug|x64
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|x64.Deploy.0 = Debug|x64
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|x86.ActiveCfg = Debug|x86
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|x86.Build.0 = Debug|x86
+ {BF701670-43B6-4621-9564-84215313590C}.Debug|x86.Deploy.0 = Debug|x86
+ {BF701670-43B6-4621-9564-84215313590C}.Release|ARM64.ActiveCfg = Release|ARM64
+ {BF701670-43B6-4621-9564-84215313590C}.Release|ARM64.Build.0 = Release|ARM64
+ {BF701670-43B6-4621-9564-84215313590C}.Release|ARM64.Deploy.0 = Release|ARM64
+ {BF701670-43B6-4621-9564-84215313590C}.Release|x64.ActiveCfg = Release|x64
+ {BF701670-43B6-4621-9564-84215313590C}.Release|x64.Build.0 = Release|x64
+ {BF701670-43B6-4621-9564-84215313590C}.Release|x64.Deploy.0 = Release|x64
+ {BF701670-43B6-4621-9564-84215313590C}.Release|x86.ActiveCfg = Release|x86
+ {BF701670-43B6-4621-9564-84215313590C}.Release|x86.Build.0 = Release|x86
+ {BF701670-43B6-4621-9564-84215313590C}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F46D9F10-D75A-4C1E-99F0-14EE79D20EDE}
+ EndGlobalSection
+EndGlobal
diff --git a/ReboundHub/App.xaml b/Rebound/App.xaml
similarity index 90%
rename from ReboundHub/App.xaml
rename to Rebound/App.xaml
index 7818e8e..11b1efa 100644
--- a/ReboundHub/App.xaml
+++ b/Rebound/App.xaml
@@ -1,9 +1,9 @@
+ xmlns:local="using:Rebound">
diff --git a/ReboundHub/App.xaml.cs b/Rebound/App.xaml.cs
similarity index 99%
rename from ReboundHub/App.xaml.cs
rename to Rebound/App.xaml.cs
index 14014c5..9d744c8 100644
--- a/ReboundHub/App.xaml.cs
+++ b/Rebound/App.xaml.cs
@@ -24,7 +24,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub;
+namespace Rebound;
///
/// Provides application-specific behavior to supplement the default Application class.
///
diff --git a/ReboundHub/Assets/AppIcons/CompManagement.png b/Rebound/Assets/AppIcons/CompManagement.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/CompManagement.png
rename to Rebound/Assets/AppIcons/CompManagement.png
diff --git a/ReboundHub/Assets/AppIcons/CrimsonUIGlyph.png b/Rebound/Assets/AppIcons/CrimsonUIGlyph.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/CrimsonUIGlyph.png
rename to Rebound/Assets/AppIcons/CrimsonUIGlyph.png
diff --git a/ReboundHub/Assets/AppIcons/DDORes_2001.png b/Rebound/Assets/AppIcons/DDORes_2001.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/DDORes_2001.png
rename to Rebound/Assets/AppIcons/DDORes_2001.png
diff --git a/ReboundHub/Assets/AppIcons/DDORes_2102.png b/Rebound/Assets/AppIcons/DDORes_2102.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/DDORes_2102.png
rename to Rebound/Assets/AppIcons/DDORes_2102.png
diff --git a/ReboundHub/Assets/AppIcons/DDORes_2413.ico b/Rebound/Assets/AppIcons/DDORes_2413.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/DDORes_2413.ico
rename to Rebound/Assets/AppIcons/DDORes_2413.ico
diff --git a/Rebound/Assets/AppIcons/EventViewer.png b/Rebound/Assets/AppIcons/EventViewer.png
new file mode 100644
index 0000000..93376df
Binary files /dev/null and b/Rebound/Assets/AppIcons/EventViewer.png differ
diff --git a/ReboundHub/Assets/AppIcons/FilesLogo.ico b/Rebound/Assets/AppIcons/FilesLogo.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/FilesLogo.ico
rename to Rebound/Assets/AppIcons/FilesLogo.ico
diff --git a/ReboundHub/Assets/AppIcons/GitHub_Invertocat_Logo.svg.png b/Rebound/Assets/AppIcons/GitHub_Invertocat_Logo.svg.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/GitHub_Invertocat_Logo.svg.png
rename to Rebound/Assets/AppIcons/GitHub_Invertocat_Logo.svg.png
diff --git a/ReboundHub/Assets/AppIcons/HyperV.png b/Rebound/Assets/AppIcons/HyperV.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/HyperV.png
rename to Rebound/Assets/AppIcons/HyperV.png
diff --git a/ReboundHub/Assets/AppIcons/HyperVQC.png b/Rebound/Assets/AppIcons/HyperVQC.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/HyperVQC.png
rename to Rebound/Assets/AppIcons/HyperVQC.png
diff --git a/ReboundHub/Assets/AppIcons/IviriusCommunityIcon.png b/Rebound/Assets/AppIcons/IviriusCommunityIcon.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/IviriusCommunityIcon.png
rename to Rebound/Assets/AppIcons/IviriusCommunityIcon.png
diff --git a/ReboundHub/Assets/AppIcons/Ivr+.png b/Rebound/Assets/AppIcons/Ivr+.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/Ivr+.png
rename to Rebound/Assets/AppIcons/Ivr+.png
diff --git a/ReboundHub/Assets/AppIcons/Ivrfree.png b/Rebound/Assets/AppIcons/Ivrfree.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/Ivrfree.png
rename to Rebound/Assets/AppIcons/Ivrfree.png
diff --git a/ReboundHub/Assets/AppIcons/LocalSecPolicy.png b/Rebound/Assets/AppIcons/LocalSecPolicy.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/LocalSecPolicy.png
rename to Rebound/Assets/AppIcons/LocalSecPolicy.png
diff --git a/ReboundHub/Assets/AppIcons/ManagementConsole.png b/Rebound/Assets/AppIcons/ManagementConsole.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/ManagementConsole.png
rename to Rebound/Assets/AppIcons/ManagementConsole.png
diff --git a/ReboundHub/Assets/AppIcons/Monitor.ico b/Rebound/Assets/AppIcons/Monitor.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/Monitor.ico
rename to Rebound/Assets/AppIcons/Monitor.ico
diff --git a/ReboundHub/Assets/AppIcons/ODBC.png b/Rebound/Assets/AppIcons/ODBC.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/ODBC.png
rename to Rebound/Assets/AppIcons/ODBC.png
diff --git a/ReboundHub/Assets/AppIcons/PCUnit.png b/Rebound/Assets/AppIcons/PCUnit.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/PCUnit.png
rename to Rebound/Assets/AppIcons/PCUnit.png
diff --git a/ReboundHub/Assets/AppIcons/Rebound logo.png b/Rebound/Assets/AppIcons/Rebound logo.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/Rebound logo.png
rename to Rebound/Assets/AppIcons/Rebound logo.png
diff --git a/Rebound/Assets/AppIcons/Rebound.ico b/Rebound/Assets/AppIcons/Rebound.ico
new file mode 100644
index 0000000..4c7b366
Binary files /dev/null and b/Rebound/Assets/AppIcons/Rebound.ico differ
diff --git a/ReboundHub/Assets/AppIcons/Rebound11Icon.png b/Rebound/Assets/AppIcons/Rebound11Icon.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/Rebound11Icon.png
rename to Rebound/Assets/AppIcons/Rebound11Icon.png
diff --git a/ReboundHub/Assets/AppIcons/ResourceMonitor.png b/Rebound/Assets/AppIcons/ResourceMonitor.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/ResourceMonitor.png
rename to Rebound/Assets/AppIcons/ResourceMonitor.png
diff --git a/ReboundHub/Assets/AppIcons/RunBox.ico b/Rebound/Assets/AppIcons/RunBox.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/RunBox.ico
rename to Rebound/Assets/AppIcons/RunBox.ico
diff --git a/ReboundHub/Assets/AppIcons/Services.png b/Rebound/Assets/AppIcons/Services.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/Services.png
rename to Rebound/Assets/AppIcons/Services.png
diff --git a/ReboundHub/Assets/AppIcons/TaskScheduler.png b/Rebound/Assets/AppIcons/TaskScheduler.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/TaskScheduler.png
rename to Rebound/Assets/AppIcons/TaskScheduler.png
diff --git a/Rebound/Assets/AppIcons/cleanmgr.ico b/Rebound/Assets/AppIcons/cleanmgr.ico
new file mode 100644
index 0000000..c166de1
Binary files /dev/null and b/Rebound/Assets/AppIcons/cleanmgr.ico differ
diff --git a/ReboundHub/Assets/AppIcons/imageres_1029.ico b/Rebound/Assets/AppIcons/imageres_1029.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_1029.ico
rename to Rebound/Assets/AppIcons/imageres_1029.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_105.ico b/Rebound/Assets/AppIcons/imageres_105.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_105.ico
rename to Rebound/Assets/AppIcons/imageres_105.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_120.ico b/Rebound/Assets/AppIcons/imageres_120.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_120.ico
rename to Rebound/Assets/AppIcons/imageres_120.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_144.ico b/Rebound/Assets/AppIcons/imageres_144.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_144.ico
rename to Rebound/Assets/AppIcons/imageres_144.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_149.ico b/Rebound/Assets/AppIcons/imageres_149.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_149.ico
rename to Rebound/Assets/AppIcons/imageres_149.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_15.png b/Rebound/Assets/AppIcons/imageres_15.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_15.png
rename to Rebound/Assets/AppIcons/imageres_15.png
diff --git a/ReboundHub/Assets/AppIcons/imageres_161.ico b/Rebound/Assets/AppIcons/imageres_161.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_161.ico
rename to Rebound/Assets/AppIcons/imageres_161.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_195.ico b/Rebound/Assets/AppIcons/imageres_195.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_195.ico
rename to Rebound/Assets/AppIcons/imageres_195.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_196.ico b/Rebound/Assets/AppIcons/imageres_196.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_196.ico
rename to Rebound/Assets/AppIcons/imageres_196.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_197.ico b/Rebound/Assets/AppIcons/imageres_197.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_197.ico
rename to Rebound/Assets/AppIcons/imageres_197.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_25.ico b/Rebound/Assets/AppIcons/imageres_25.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_25.ico
rename to Rebound/Assets/AppIcons/imageres_25.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_32.ico b/Rebound/Assets/AppIcons/imageres_32.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_32.ico
rename to Rebound/Assets/AppIcons/imageres_32.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_34.ico b/Rebound/Assets/AppIcons/imageres_34.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_34.ico
rename to Rebound/Assets/AppIcons/imageres_34.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_5323.ico b/Rebound/Assets/AppIcons/imageres_5323.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_5323.ico
rename to Rebound/Assets/AppIcons/imageres_5323.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_5372.png b/Rebound/Assets/AppIcons/imageres_5372.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_5372.png
rename to Rebound/Assets/AppIcons/imageres_5372.png
diff --git a/ReboundHub/Assets/AppIcons/imageres_59.png b/Rebound/Assets/AppIcons/imageres_59.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_59.png
rename to Rebound/Assets/AppIcons/imageres_59.png
diff --git a/ReboundHub/Assets/AppIcons/imageres_78.ico b/Rebound/Assets/AppIcons/imageres_78.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_78.ico
rename to Rebound/Assets/AppIcons/imageres_78.ico
diff --git a/ReboundHub/Assets/AppIcons/imageres_86.ico b/Rebound/Assets/AppIcons/imageres_86.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/imageres_86.ico
rename to Rebound/Assets/AppIcons/imageres_86.ico
diff --git a/ReboundHub/Assets/AppIcons/logo-winui.png b/Rebound/Assets/AppIcons/logo-winui.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/logo-winui.png
rename to Rebound/Assets/AppIcons/logo-winui.png
diff --git a/ReboundHub/Assets/AppIcons/rcontrol.ico b/Rebound/Assets/AppIcons/rcontrol.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/rcontrol.ico
rename to Rebound/Assets/AppIcons/rcontrol.ico
diff --git a/ReboundHub/Assets/AppIcons/rcontrol.png b/Rebound/Assets/AppIcons/rcontrol.png
similarity index 100%
rename from ReboundHub/Assets/AppIcons/rcontrol.png
rename to Rebound/Assets/AppIcons/rcontrol.png
diff --git a/ReboundHub/Assets/AppIcons/rdfrgui.ico b/Rebound/Assets/AppIcons/rdfrgui.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/rdfrgui.ico
rename to Rebound/Assets/AppIcons/rdfrgui.ico
diff --git a/ReboundHub/Assets/AppIcons/rosk_130.ico b/Rebound/Assets/AppIcons/rosk_130.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/rosk_130.ico
rename to Rebound/Assets/AppIcons/rosk_130.ico
diff --git a/ReboundHub/Assets/AppIcons/rtpm_130.ico b/Rebound/Assets/AppIcons/rtpm_130.ico
similarity index 100%
rename from ReboundHub/Assets/AppIcons/rtpm_130.ico
rename to Rebound/Assets/AppIcons/rtpm_130.ico
diff --git a/ReboundHub/Assets/Backgrounds/BackgroundDark.png b/Rebound/Assets/Backgrounds/BackgroundDark.png
similarity index 100%
rename from ReboundHub/Assets/Backgrounds/BackgroundDark.png
rename to Rebound/Assets/Backgrounds/BackgroundDark.png
diff --git a/ReboundHub/Assets/Backgrounds/BackgroundLight.png b/Rebound/Assets/Backgrounds/BackgroundLight.png
similarity index 100%
rename from ReboundHub/Assets/Backgrounds/BackgroundLight.png
rename to Rebound/Assets/Backgrounds/BackgroundLight.png
diff --git a/Rebound/Assets/LargeTile.scale-100.png b/Rebound/Assets/LargeTile.scale-100.png
new file mode 100644
index 0000000..841188a
Binary files /dev/null and b/Rebound/Assets/LargeTile.scale-100.png differ
diff --git a/Rebound/Assets/LargeTile.scale-125.png b/Rebound/Assets/LargeTile.scale-125.png
new file mode 100644
index 0000000..fec90d4
Binary files /dev/null and b/Rebound/Assets/LargeTile.scale-125.png differ
diff --git a/Rebound/Assets/LargeTile.scale-150.png b/Rebound/Assets/LargeTile.scale-150.png
new file mode 100644
index 0000000..9ecf8d9
Binary files /dev/null and b/Rebound/Assets/LargeTile.scale-150.png differ
diff --git a/Rebound/Assets/LargeTile.scale-200.png b/Rebound/Assets/LargeTile.scale-200.png
new file mode 100644
index 0000000..069b85e
Binary files /dev/null and b/Rebound/Assets/LargeTile.scale-200.png differ
diff --git a/Rebound/Assets/LargeTile.scale-400.png b/Rebound/Assets/LargeTile.scale-400.png
new file mode 100644
index 0000000..03c6fef
Binary files /dev/null and b/Rebound/Assets/LargeTile.scale-400.png differ
diff --git a/Rebound/Assets/LockScreenLogo.scale-200.png b/Rebound/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/Rebound/Assets/LockScreenLogo.scale-200.png differ
diff --git a/Rebound/Assets/SmallTile.scale-100.png b/Rebound/Assets/SmallTile.scale-100.png
new file mode 100644
index 0000000..2edecf8
Binary files /dev/null and b/Rebound/Assets/SmallTile.scale-100.png differ
diff --git a/Rebound/Assets/SmallTile.scale-125.png b/Rebound/Assets/SmallTile.scale-125.png
new file mode 100644
index 0000000..02ae580
Binary files /dev/null and b/Rebound/Assets/SmallTile.scale-125.png differ
diff --git a/Rebound/Assets/SmallTile.scale-150.png b/Rebound/Assets/SmallTile.scale-150.png
new file mode 100644
index 0000000..cada77d
Binary files /dev/null and b/Rebound/Assets/SmallTile.scale-150.png differ
diff --git a/Rebound/Assets/SmallTile.scale-200.png b/Rebound/Assets/SmallTile.scale-200.png
new file mode 100644
index 0000000..5b5b572
Binary files /dev/null and b/Rebound/Assets/SmallTile.scale-200.png differ
diff --git a/Rebound/Assets/SmallTile.scale-400.png b/Rebound/Assets/SmallTile.scale-400.png
new file mode 100644
index 0000000..847b0c7
Binary files /dev/null and b/Rebound/Assets/SmallTile.scale-400.png differ
diff --git a/Rebound/Assets/SplashScreen.scale-100.png b/Rebound/Assets/SplashScreen.scale-100.png
new file mode 100644
index 0000000..8a916f5
Binary files /dev/null and b/Rebound/Assets/SplashScreen.scale-100.png differ
diff --git a/Rebound/Assets/SplashScreen.scale-125.png b/Rebound/Assets/SplashScreen.scale-125.png
new file mode 100644
index 0000000..e8f04c6
Binary files /dev/null and b/Rebound/Assets/SplashScreen.scale-125.png differ
diff --git a/Rebound/Assets/SplashScreen.scale-150.png b/Rebound/Assets/SplashScreen.scale-150.png
new file mode 100644
index 0000000..51bfb70
Binary files /dev/null and b/Rebound/Assets/SplashScreen.scale-150.png differ
diff --git a/Rebound/Assets/SplashScreen.scale-200.png b/Rebound/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..d08d36c
Binary files /dev/null and b/Rebound/Assets/SplashScreen.scale-200.png differ
diff --git a/Rebound/Assets/SplashScreen.scale-400.png b/Rebound/Assets/SplashScreen.scale-400.png
new file mode 100644
index 0000000..7df0442
Binary files /dev/null and b/Rebound/Assets/SplashScreen.scale-400.png differ
diff --git a/Rebound/Assets/Square150x150Logo.scale-100.png b/Rebound/Assets/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..1396d35
Binary files /dev/null and b/Rebound/Assets/Square150x150Logo.scale-100.png differ
diff --git a/Rebound/Assets/Square150x150Logo.scale-125.png b/Rebound/Assets/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..98cff9d
Binary files /dev/null and b/Rebound/Assets/Square150x150Logo.scale-125.png differ
diff --git a/Rebound/Assets/Square150x150Logo.scale-150.png b/Rebound/Assets/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..1440932
Binary files /dev/null and b/Rebound/Assets/Square150x150Logo.scale-150.png differ
diff --git a/Rebound/Assets/Square150x150Logo.scale-200.png b/Rebound/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..cd8d100
Binary files /dev/null and b/Rebound/Assets/Square150x150Logo.scale-200.png differ
diff --git a/Rebound/Assets/Square150x150Logo.scale-400.png b/Rebound/Assets/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..3179135
Binary files /dev/null and b/Rebound/Assets/Square150x150Logo.scale-400.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..be758ce
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..ffc34be
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..29fe11e
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..b8b2a03
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..d46952a
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..be758ce
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..29fe11e
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..b8b2a03
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..d46952a
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/Rebound/Assets/Square44x44Logo.scale-100.png b/Rebound/Assets/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..374bdc5
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.scale-100.png differ
diff --git a/Rebound/Assets/Square44x44Logo.scale-125.png b/Rebound/Assets/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..cc46207
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.scale-125.png differ
diff --git a/Rebound/Assets/Square44x44Logo.scale-150.png b/Rebound/Assets/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..e33d6ec
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.scale-150.png differ
diff --git a/Rebound/Assets/Square44x44Logo.scale-200.png b/Rebound/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..0f924b4
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.scale-200.png differ
diff --git a/Rebound/Assets/Square44x44Logo.scale-400.png b/Rebound/Assets/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..d1aed3c
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.scale-400.png differ
diff --git a/Rebound/Assets/Square44x44Logo.targetsize-16.png b/Rebound/Assets/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..33b0e35
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.targetsize-16.png differ
diff --git a/Rebound/Assets/Square44x44Logo.targetsize-24.png b/Rebound/Assets/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..9b72845
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.targetsize-24.png differ
diff --git a/Rebound/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Rebound/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..ffc34be
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/Rebound/Assets/Square44x44Logo.targetsize-256.png b/Rebound/Assets/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..e256146
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.targetsize-256.png differ
diff --git a/Rebound/Assets/Square44x44Logo.targetsize-32.png b/Rebound/Assets/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..4ebc28c
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.targetsize-32.png differ
diff --git a/Rebound/Assets/Square44x44Logo.targetsize-48.png b/Rebound/Assets/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..1174208
Binary files /dev/null and b/Rebound/Assets/Square44x44Logo.targetsize-48.png differ
diff --git a/Rebound/Assets/StoreLogo.backup.png b/Rebound/Assets/StoreLogo.backup.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/Rebound/Assets/StoreLogo.backup.png differ
diff --git a/Rebound/Assets/StoreLogo.scale-100.png b/Rebound/Assets/StoreLogo.scale-100.png
new file mode 100644
index 0000000..febde64
Binary files /dev/null and b/Rebound/Assets/StoreLogo.scale-100.png differ
diff --git a/Rebound/Assets/StoreLogo.scale-125.png b/Rebound/Assets/StoreLogo.scale-125.png
new file mode 100644
index 0000000..1d3a2a0
Binary files /dev/null and b/Rebound/Assets/StoreLogo.scale-125.png differ
diff --git a/Rebound/Assets/StoreLogo.scale-150.png b/Rebound/Assets/StoreLogo.scale-150.png
new file mode 100644
index 0000000..68299c6
Binary files /dev/null and b/Rebound/Assets/StoreLogo.scale-150.png differ
diff --git a/Rebound/Assets/StoreLogo.scale-200.png b/Rebound/Assets/StoreLogo.scale-200.png
new file mode 100644
index 0000000..d59a20b
Binary files /dev/null and b/Rebound/Assets/StoreLogo.scale-200.png differ
diff --git a/Rebound/Assets/StoreLogo.scale-400.png b/Rebound/Assets/StoreLogo.scale-400.png
new file mode 100644
index 0000000..b4dcf45
Binary files /dev/null and b/Rebound/Assets/StoreLogo.scale-400.png differ
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperCyanDark8bit.png b/Rebound/Assets/Wallpapers/WallpaperCyanDark8bit.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperCyanDark8bit.png
rename to Rebound/Assets/Wallpapers/WallpaperCyanDark8bit.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperCyanLight8bit.png b/Rebound/Assets/Wallpapers/WallpaperCyanLight8bit.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperCyanLight8bit.png
rename to Rebound/Assets/Wallpapers/WallpaperCyanLight8bit.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperDarkBlue.png b/Rebound/Assets/Wallpapers/WallpaperDarkBlue.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperDarkBlue.png
rename to Rebound/Assets/Wallpapers/WallpaperDarkBlue.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperDarkCrimson.png b/Rebound/Assets/Wallpapers/WallpaperDarkCrimson.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperDarkCrimson.png
rename to Rebound/Assets/Wallpapers/WallpaperDarkCrimson.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperDarkPurple.png b/Rebound/Assets/Wallpapers/WallpaperDarkPurple.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperDarkPurple.png
rename to Rebound/Assets/Wallpapers/WallpaperDarkPurple.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperLightBlue.png b/Rebound/Assets/Wallpapers/WallpaperLightBlue.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperLightBlue.png
rename to Rebound/Assets/Wallpapers/WallpaperLightBlue.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperLightCrimson.png b/Rebound/Assets/Wallpapers/WallpaperLightCrimson.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperLightCrimson.png
rename to Rebound/Assets/Wallpapers/WallpaperLightCrimson.png
diff --git a/ReboundHub/Assets/Wallpapers/WallpaperLightPurple.png b/Rebound/Assets/Wallpapers/WallpaperLightPurple.png
similarity index 100%
rename from ReboundHub/Assets/Wallpapers/WallpaperLightPurple.png
rename to Rebound/Assets/Wallpapers/WallpaperLightPurple.png
diff --git a/Rebound/Assets/Wide310x150Logo.scale-100.png b/Rebound/Assets/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..88a3862
Binary files /dev/null and b/Rebound/Assets/Wide310x150Logo.scale-100.png differ
diff --git a/Rebound/Assets/Wide310x150Logo.scale-125.png b/Rebound/Assets/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..12d399c
Binary files /dev/null and b/Rebound/Assets/Wide310x150Logo.scale-125.png differ
diff --git a/Rebound/Assets/Wide310x150Logo.scale-150.png b/Rebound/Assets/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..8492fb3
Binary files /dev/null and b/Rebound/Assets/Wide310x150Logo.scale-150.png differ
diff --git a/Rebound/Assets/Wide310x150Logo.scale-200.png b/Rebound/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..8a916f5
Binary files /dev/null and b/Rebound/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/Rebound/Assets/Wide310x150Logo.scale-400.png b/Rebound/Assets/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..d08d36c
Binary files /dev/null and b/Rebound/Assets/Wide310x150Logo.scale-400.png differ
diff --git a/ReboundHub/ControlPanelWindow.xaml b/Rebound/ControlPanelWindow.xaml
similarity index 99%
rename from ReboundHub/ControlPanelWindow.xaml
rename to Rebound/ControlPanelWindow.xaml
index 480c1d7..cbbc548 100644
--- a/ReboundHub/ControlPanelWindow.xaml
+++ b/Rebound/ControlPanelWindow.xaml
@@ -1,9 +1,9 @@
/// An empty window that can be used on its own or navigated to within a Frame.
///
@@ -347,9 +347,9 @@ await InstallExeWithShortcut(
if (Defrag == true)
{
await InstallAppPackage(
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundDefrag.msix",
- "C:\\Rebound11\\ReboundDefrag.msix",
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundDefrag.cer",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.Defrag.msix",
+ "C:\\Rebound11\\Rebound.Defrag.msix",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.Defrag.cer",
"Rebound Defragment and Optimize Drives",
$"{AppContext.BaseDirectory}\\Rebound11Files\\Executables\\rdfrgui.exe",
$"C:\\Rebound11\\rdfrgui.exe",
@@ -366,9 +366,9 @@ await InstallAppPackage(
if (Winver == true)
{
await InstallAppPackage(
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundWinver.msix",
- "C:\\Rebound11\\ReboundWinver.msix",
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundWinver.cer",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.About.msix",
+ "C:\\Rebound11\\Rebound.About.msix",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.About.cer",
"Rebound Winver",
$"{AppContext.BaseDirectory}\\Rebound11Files\\Executables\\rwinver.exe",
$"C:\\Rebound11\\rwinver.exe",
@@ -411,9 +411,9 @@ await InstallExeWithShortcut(
if (Run == true)
{
await InstallAppPackage(
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundRun.msix",
- "C:\\Rebound11\\ReboundRun.msix",
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundRun.cer",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.Run.msix",
+ "C:\\Rebound11\\Rebound.Run.msix",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.Run.cer",
"Rebound Run",
$"{AppContext.BaseDirectory}\\Rebound11Files\\Executables\\rrun.exe",
$"C:\\Rebound11\\rrun.exe",
@@ -428,10 +428,10 @@ await InstallExeWithShortcut(
"Rebound Run Startup Task",
$"{AppContext.BaseDirectory}\\Rebound11Files\\Executables\\rrunSTARTUP.exe",
$"C:\\Rebound11\\rrunSTARTUP.exe",
- $"{AppContext.BaseDirectory}\\Rebound11Files\\shcre11\\ReboundRunStartup.lnk",
- $"{startupFolderPath}\\ReboundRunStartup.lnk",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\shcre11\\Rebound.RunStartup.lnk",
+ $"{startupFolderPath}\\Rebound.RunStartup.lnk",
"rrunSTARTUP",
- "ReboundRunStartup");
+ "Rebound.RunStartup");
}
#endregion Run
@@ -441,9 +441,9 @@ await InstallExeWithShortcut(
if (DiskCleanup == true)
{
await InstallAppPackage(
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundDiskCleanup.msix",
- "C:\\Rebound11\\ReboundDiskCleanup.msix",
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundDiskCleanup.cer",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.Cleanup.msix",
+ "C:\\Rebound11\\Rebound.Cleanup.msix",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.Cleanup.cer",
"Rebound Disk Cleanup",
$"{AppContext.BaseDirectory}\\Rebound11Files\\Executables\\rcleanmgr.exe",
$"C:\\Rebound11\\rcleanmgr.exe",
@@ -460,9 +460,9 @@ await InstallAppPackage(
if (TPM == true)
{
await InstallAppPackage(
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundTpm.msix",
- "C:\\Rebound11\\ReboundTpm.msix",
- $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\ReboundTpm.cer",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.TrustedPlatform.msix",
+ "C:\\Rebound11\\Rebound.TrustedPlatform.msix",
+ $"{AppContext.BaseDirectory}\\Rebound11Files\\AppPackages\\Rebound.TrustedPlatform.cer",
"Rebound TPM Management",
$"{AppContext.BaseDirectory}\\Rebound11Files\\Executables\\rtpm.exe",
$"C:\\Rebound11\\rtpm.exe",
diff --git a/ReboundHub/MainWindow.xaml b/Rebound/MainWindow.xaml
similarity index 99%
rename from ReboundHub/MainWindow.xaml
rename to Rebound/MainWindow.xaml
index 0807c02..2a1b295 100644
--- a/ReboundHub/MainWindow.xaml
+++ b/Rebound/MainWindow.xaml
@@ -1,9 +1,9 @@
-
+
diff --git a/ReboundHub/MainWindow.xaml.cs b/Rebound/MainWindow.xaml.cs
similarity index 99%
rename from ReboundHub/MainWindow.xaml.cs
rename to Rebound/MainWindow.xaml.cs
index 4df8585..127ffaf 100644
--- a/ReboundHub/MainWindow.xaml.cs
+++ b/Rebound/MainWindow.xaml.cs
@@ -12,8 +12,8 @@
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
-using ReboundHub.ReboundHub.Core.Helpers;
-using ReboundHub.ReboundHub.Pages;
+using Rebound.Rebound.Core.Helpers;
+using Rebound.Rebound.Pages;
using Windows.Foundation;
using Windows.Foundation.Collections;
using WinUIEx;
@@ -31,7 +31,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub;
+namespace Rebound;
///
/// An empty window that can be used on its own or navigated to within a Frame.
///
@@ -102,7 +102,7 @@ public MainWindow()
this.AppWindow.TitleBar.ButtonHoverBackgroundColor = Windows.UI.Color.FromArgb(25, 200, 200, 200);
this.AppWindow.TitleBar.ButtonPressedBackgroundColor = Windows.UI.Color.FromArgb(15, 200, 200, 200);
this.AppWindow.Title = "Rebound Hub";
- this.SetIcon($"{AppContext.BaseDirectory}\\Assets\\AppIcons\\ReboundHub.ico");
+ this.SetIcon($"{AppContext.BaseDirectory}\\Assets\\AppIcons\\Rebound.ico");
_msgMonitor ??= new WindowMessageMonitor(this);
_msgMonitor.WindowMessageReceived -= Event;
diff --git a/ReboundHub/Package.appxmanifest b/Rebound/Package.appxmanifest
similarity index 98%
rename from ReboundHub/Package.appxmanifest
rename to Rebound/Package.appxmanifest
index 46cc6d8..6d7f973 100644
--- a/ReboundHub/Package.appxmanifest
+++ b/Rebound/Package.appxmanifest
@@ -15,7 +15,7 @@
- ReboundHub
+ Rebound
Lenovo
Assets\StoreLogo.png
diff --git a/ReboundHub/Properties/launchSettings.json b/Rebound/Properties/launchSettings.json
similarity index 61%
rename from ReboundHub/Properties/launchSettings.json
rename to Rebound/Properties/launchSettings.json
index 612bacd..b5aa339 100644
--- a/ReboundHub/Properties/launchSettings.json
+++ b/Rebound/Properties/launchSettings.json
@@ -1,9 +1,9 @@
{
"profiles": {
- "ReboundHub (Package)": {
+ "Rebound (Package)": {
"commandName": "MsixPackage"
},
- "ReboundHub (Unpackaged)": {
+ "Rebound (Unpackaged)": {
"commandName": "Project"
}
}
diff --git a/ReboundHub/ReboundHub.Core/Helpers/SettingsHelper.cs b/Rebound/Rebound.Core/Helpers/SettingsHelper.cs
similarity index 96%
rename from ReboundHub/ReboundHub.Core/Helpers/SettingsHelper.cs
rename to Rebound/Rebound.Core/Helpers/SettingsHelper.cs
index 6c0ea01..3dd27d0 100644
--- a/ReboundHub/ReboundHub.Core/Helpers/SettingsHelper.cs
+++ b/Rebound/Rebound.Core/Helpers/SettingsHelper.cs
@@ -5,7 +5,7 @@
using System.Threading.Tasks;
using Windows.Storage;
-namespace ReboundHub.ReboundHub.Core.Helpers;
+namespace Rebound.Rebound.Core.Helpers;
public static class SettingsHelper
{
diff --git a/ReboundHub/ReboundHub.csproj b/Rebound/Rebound.csproj
similarity index 83%
rename from ReboundHub/ReboundHub.csproj
rename to Rebound/Rebound.csproj
index 6d105af..e7f7245 100644
--- a/ReboundHub/ReboundHub.csproj
+++ b/Rebound/Rebound.csproj
@@ -4,7 +4,7 @@
net8.0-windows10.0.22621.0
10.0.17763.0
10.0.22621.35-preview
- ReboundHub
+ Rebound
app.manifest
x86;x64;ARM64
win-x86;win-x64;win-arm64
@@ -67,16 +67,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -100,7 +100,7 @@
-
+
@@ -112,15 +112,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -133,16 +133,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
Always
@@ -165,7 +165,7 @@
-
+
@@ -203,7 +203,7 @@
-
+
MSBuild:Compile
@@ -239,10 +239,10 @@
False
-
+
-
+
@@ -250,7 +250,7 @@
-
+
MSBuild:Compile
@@ -260,17 +260,17 @@
-
+
MSBuild:Compile
-
+
MSBuild:Compile
-
+
MSBuild:Compile
@@ -280,7 +280,7 @@
-
+
MSBuild:Compile
@@ -304,12 +304,12 @@
-
+
MSBuild:Compile
-
+
MSBuild:Compile
diff --git a/ReboundHub/ReboundHub/Pages/ControlPanel/AppearanceAndPersonalization.xaml b/Rebound/Rebound/Pages/ControlPanel/AppearanceAndPersonalization.xaml
similarity index 99%
rename from ReboundHub/ReboundHub/Pages/ControlPanel/AppearanceAndPersonalization.xaml
rename to Rebound/Rebound/Pages/ControlPanel/AppearanceAndPersonalization.xaml
index d5ccdff..2dd3c8f 100644
--- a/ReboundHub/ReboundHub/Pages/ControlPanel/AppearanceAndPersonalization.xaml
+++ b/Rebound/Rebound/Pages/ControlPanel/AppearanceAndPersonalization.xaml
@@ -1,9 +1,9 @@
/// An empty page that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/ReboundHub/Pages/ControlPanel/HomePage.xaml b/Rebound/Rebound/Pages/ControlPanel/HomePage.xaml
similarity index 98%
rename from ReboundHub/ReboundHub/Pages/ControlPanel/HomePage.xaml
rename to Rebound/Rebound/Pages/ControlPanel/HomePage.xaml
index 3dc45e1..b190265 100644
--- a/ReboundHub/ReboundHub/Pages/ControlPanel/HomePage.xaml
+++ b/Rebound/Rebound/Pages/ControlPanel/HomePage.xaml
@@ -1,9 +1,9 @@
diff --git a/ReboundHub/ReboundHub/Pages/ControlPanel/HomePage.xaml.cs b/Rebound/Rebound/Pages/ControlPanel/HomePage.xaml.cs
similarity index 98%
rename from ReboundHub/ReboundHub/Pages/ControlPanel/HomePage.xaml.cs
rename to Rebound/Rebound/Pages/ControlPanel/HomePage.xaml.cs
index 9e7e63f..ed047ed 100644
--- a/ReboundHub/ReboundHub/Pages/ControlPanel/HomePage.xaml.cs
+++ b/Rebound/Rebound/Pages/ControlPanel/HomePage.xaml.cs
@@ -22,7 +22,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub.ReboundHub.Pages.ControlPanel
+namespace Rebound.Rebound.Pages.ControlPanel
{
///
/// An empty page that can be used on its own or navigated to within a Frame.
diff --git a/ReboundHub/ReboundHub/Pages/ControlPanel/ModernHomePage.xaml b/Rebound/Rebound/Pages/ControlPanel/ModernHomePage.xaml
similarity index 98%
rename from ReboundHub/ReboundHub/Pages/ControlPanel/ModernHomePage.xaml
rename to Rebound/Rebound/Pages/ControlPanel/ModernHomePage.xaml
index 229a9aa..556247d 100644
--- a/ReboundHub/ReboundHub/Pages/ControlPanel/ModernHomePage.xaml
+++ b/Rebound/Rebound/Pages/ControlPanel/ModernHomePage.xaml
@@ -1,9 +1,9 @@
/// An empty page that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/ReboundHub/Pages/ControlPanel/SystemAndSecurity.xaml b/Rebound/Rebound/Pages/ControlPanel/SystemAndSecurity.xaml
similarity index 99%
rename from ReboundHub/ReboundHub/Pages/ControlPanel/SystemAndSecurity.xaml
rename to Rebound/Rebound/Pages/ControlPanel/SystemAndSecurity.xaml
index f8a13d6..4f05bc7 100644
--- a/ReboundHub/ReboundHub/Pages/ControlPanel/SystemAndSecurity.xaml
+++ b/Rebound/Rebound/Pages/ControlPanel/SystemAndSecurity.xaml
@@ -1,9 +1,9 @@
/// An empty page that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/ReboundHub/Pages/ControlPanel/WindowsTools.xaml b/Rebound/Rebound/Pages/ControlPanel/WindowsTools.xaml
similarity index 95%
rename from ReboundHub/ReboundHub/Pages/ControlPanel/WindowsTools.xaml
rename to Rebound/Rebound/Pages/ControlPanel/WindowsTools.xaml
index db22e13..f5cd9f4 100644
--- a/ReboundHub/ReboundHub/Pages/ControlPanel/WindowsTools.xaml
+++ b/Rebound/Rebound/Pages/ControlPanel/WindowsTools.xaml
@@ -1,9 +1,9 @@
/// An empty page that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/ReboundHub/Pages/HomePage.xaml b/Rebound/Rebound/Pages/HomePage.xaml
similarity index 99%
rename from ReboundHub/ReboundHub/Pages/HomePage.xaml
rename to Rebound/Rebound/Pages/HomePage.xaml
index 1ad6f17..613dd73 100644
--- a/ReboundHub/ReboundHub/Pages/HomePage.xaml
+++ b/Rebound/Rebound/Pages/HomePage.xaml
@@ -1,9 +1,9 @@
-
+
diff --git a/ReboundHub/ReboundHub/Pages/HomePage.xaml.cs b/Rebound/Rebound/Pages/HomePage.xaml.cs
similarity index 98%
rename from ReboundHub/ReboundHub/Pages/HomePage.xaml.cs
rename to Rebound/Rebound/Pages/HomePage.xaml.cs
index 4551144..7a7ba63 100644
--- a/ReboundHub/ReboundHub/Pages/HomePage.xaml.cs
+++ b/Rebound/Rebound/Pages/HomePage.xaml.cs
@@ -21,7 +21,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub.ReboundHub.Pages;
+namespace Rebound.Rebound.Pages;
///
/// An empty page that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/ReboundHub/Pages/Rebound11Page.xaml b/Rebound/Rebound/Pages/Rebound11Page.xaml
similarity index 99%
rename from ReboundHub/ReboundHub/Pages/Rebound11Page.xaml
rename to Rebound/Rebound/Pages/Rebound11Page.xaml
index 77fdb46..a7517c9 100644
--- a/ReboundHub/ReboundHub/Pages/Rebound11Page.xaml
+++ b/Rebound/Rebound/Pages/Rebound11Page.xaml
@@ -1,9 +1,9 @@
-
+
diff --git a/ReboundHub/ReboundHub/Pages/Rebound11Page.xaml.cs b/Rebound/Rebound/Pages/Rebound11Page.xaml.cs
similarity index 98%
rename from ReboundHub/ReboundHub/Pages/Rebound11Page.xaml.cs
rename to Rebound/Rebound/Pages/Rebound11Page.xaml.cs
index 89b10b4..dda2e12 100644
--- a/ReboundHub/ReboundHub/Pages/Rebound11Page.xaml.cs
+++ b/Rebound/Rebound/Pages/Rebound11Page.xaml.cs
@@ -24,7 +24,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub.ReboundHub.Pages;
+namespace Rebound.Rebound.Pages;
///
/// An empty page that can be used on its own or navigated to within a Frame.
///
@@ -106,7 +106,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
private async Task CheckForUpdatesAsync()
{
// URL of the text file containing the latest version number
- string versionUrl = "https://ivirius.vercel.app/reboundhubversion.txt";
+ string versionUrl = "https://ivirius.vercel.app/Reboundversion.txt";
// Use HttpClient to fetch the content
using HttpClient client = new HttpClient();
diff --git a/ReboundHub/ReboundHub/Pages/ShellPage.xaml b/Rebound/Rebound/Pages/ShellPage.xaml
similarity index 97%
rename from ReboundHub/ReboundHub/Pages/ShellPage.xaml
rename to Rebound/Rebound/Pages/ShellPage.xaml
index 339d944..bd44297 100644
--- a/ReboundHub/ReboundHub/Pages/ShellPage.xaml
+++ b/Rebound/Rebound/Pages/ShellPage.xaml
@@ -1,9 +1,9 @@
diff --git a/ReboundHub/ReboundHub/Pages/ShellPage.xaml.cs b/Rebound/Rebound/Pages/ShellPage.xaml.cs
similarity index 98%
rename from ReboundHub/ReboundHub/Pages/ShellPage.xaml.cs
rename to Rebound/Rebound/Pages/ShellPage.xaml.cs
index ef45a62..0ae9bd1 100644
--- a/ReboundHub/ReboundHub/Pages/ShellPage.xaml.cs
+++ b/Rebound/Rebound/Pages/ShellPage.xaml.cs
@@ -19,7 +19,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub.ReboundHub.Pages;
+namespace Rebound.Rebound.Pages;
///
/// An empty page that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/ReboundHub/UserControls/HomePageHeaderImage.xaml b/Rebound/Rebound/UserControls/HomePageHeaderImage.xaml
similarity index 100%
rename from ReboundHub/ReboundHub/UserControls/HomePageHeaderImage.xaml
rename to Rebound/Rebound/UserControls/HomePageHeaderImage.xaml
diff --git a/ReboundHub/ReboundHub/UserControls/HomePageHeaderImage.xaml.cs b/Rebound/Rebound/UserControls/HomePageHeaderImage.xaml.cs
similarity index 100%
rename from ReboundHub/ReboundHub/UserControls/HomePageHeaderImage.xaml.cs
rename to Rebound/Rebound/UserControls/HomePageHeaderImage.xaml.cs
diff --git a/ReboundHub/Rebound11Files/Executables/rcleanmgr.exe b/Rebound/Rebound11Files/Executables/rcleanmgr.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rcleanmgr.exe
rename to Rebound/Rebound11Files/Executables/rcleanmgr.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rcontrol.exe b/Rebound/Rebound11Files/Executables/rcontrol.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rcontrol.exe
rename to Rebound/Rebound11Files/Executables/rcontrol.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rdfrgui.exe b/Rebound/Rebound11Files/Executables/rdfrgui.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rdfrgui.exe
rename to Rebound/Rebound11Files/Executables/rdfrgui.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rosk.exe b/Rebound/Rebound11Files/Executables/rosk.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rosk.exe
rename to Rebound/Rebound11Files/Executables/rosk.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rrun.exe b/Rebound/Rebound11Files/Executables/rrun.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rrun.exe
rename to Rebound/Rebound11Files/Executables/rrun.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rrunSTARTUP.exe b/Rebound/Rebound11Files/Executables/rrunSTARTUP.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rrunSTARTUP.exe
rename to Rebound/Rebound11Files/Executables/rrunSTARTUP.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rtpm.exe b/Rebound/Rebound11Files/Executables/rtpm.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rtpm.exe
rename to Rebound/Rebound11Files/Executables/rtpm.exe
diff --git a/ReboundHub/Rebound11Files/Executables/ruacsettings.exe b/Rebound/Rebound11Files/Executables/ruacsettings.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/ruacsettings.exe
rename to Rebound/Rebound11Files/Executables/ruacsettings.exe
diff --git a/ReboundHub/Rebound11Files/Executables/rwinver.exe b/Rebound/Rebound11Files/Executables/rwinver.exe
similarity index 100%
rename from ReboundHub/Rebound11Files/Executables/rwinver.exe
rename to Rebound/Rebound11Files/Executables/rwinver.exe
diff --git a/ReboundHub/Rebound11Files/Rebound11/desktop2.ini b/Rebound/Rebound11Files/Rebound11/desktop2.ini
similarity index 100%
rename from ReboundHub/Rebound11Files/Rebound11/desktop2.ini
rename to Rebound/Rebound11Files/Rebound11/desktop2.ini
diff --git a/Rebound/Rebound11Files/Rebound11/r11foldericon.ico b/Rebound/Rebound11Files/Rebound11/r11foldericon.ico
new file mode 100644
index 0000000..ec71303
Binary files /dev/null and b/Rebound/Rebound11Files/Rebound11/r11foldericon.ico differ
diff --git a/ReboundHub/Rebound11Files/Rebound11/r11imageres.dll b/Rebound/Rebound11Files/Rebound11/r11imageres.dll
similarity index 100%
rename from ReboundHub/Rebound11Files/Rebound11/r11imageres.dll
rename to Rebound/Rebound11Files/Rebound11/r11imageres.dll
diff --git a/ReboundHub/Rebound11Files/Scripts/CREATERE11TOOLSFOLDER.ps1 b/Rebound/Rebound11Files/Scripts/CREATERE11TOOLSFOLDER.ps1
similarity index 100%
rename from ReboundHub/Rebound11Files/Scripts/CREATERE11TOOLSFOLDER.ps1
rename to Rebound/Rebound11Files/Scripts/CREATERE11TOOLSFOLDER.ps1
diff --git a/ReboundHub/Rebound11Files/shcre11/Change User Account Control settings.lnk b/Rebound/Rebound11Files/shcre11/Change User Account Control settings.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/Change User Account Control settings.lnk
rename to Rebound/Rebound11Files/shcre11/Change User Account Control settings.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/Control Panel.lnk b/Rebound/Rebound11Files/shcre11/Control Panel.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/Control Panel.lnk
rename to Rebound/Rebound11Files/shcre11/Control Panel.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/Disk Cleanup.lnk b/Rebound/Rebound11Files/shcre11/Disk Cleanup.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/Disk Cleanup.lnk
rename to Rebound/Rebound11Files/shcre11/Disk Cleanup.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/On-Screen Keyboard.lnk b/Rebound/Rebound11Files/shcre11/On-Screen Keyboard.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/On-Screen Keyboard.lnk
rename to Rebound/Rebound11Files/shcre11/On-Screen Keyboard.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/Rebound 11 Quick Full Computer Cleanup.lnk b/Rebound/Rebound11Files/shcre11/Rebound 11 Quick Full Computer Cleanup.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/Rebound 11 Quick Full Computer Cleanup.lnk
rename to Rebound/Rebound11Files/shcre11/Rebound 11 Quick Full Computer Cleanup.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/ReboundRunStartup.lnk b/Rebound/Rebound11Files/shcre11/Rebound.RunStartup.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/ReboundRunStartup.lnk
rename to Rebound/Rebound11Files/shcre11/Rebound.RunStartup.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/Run.lnk b/Rebound/Rebound11Files/shcre11/Run.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/Run.lnk
rename to Rebound/Rebound11Files/shcre11/Run.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/dfrgui.lnk b/Rebound/Rebound11Files/shcre11/dfrgui.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/dfrgui.lnk
rename to Rebound/Rebound11Files/shcre11/dfrgui.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/tpm.msc.lnk b/Rebound/Rebound11Files/shcre11/tpm.msc.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/tpm.msc.lnk
rename to Rebound/Rebound11Files/shcre11/tpm.msc.lnk
diff --git a/ReboundHub/Rebound11Files/shcre11/winver.lnk b/Rebound/Rebound11Files/shcre11/winver.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcre11/winver.lnk
rename to Rebound/Rebound11Files/shcre11/winver.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/Administrative Tools.lnk b/Rebound/Rebound11Files/shcwin11/Administrative Tools.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/Administrative Tools.lnk
rename to Rebound/Rebound11Files/shcwin11/Administrative Tools.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/Command Prompt.lnk b/Rebound/Rebound11Files/shcwin11/Command Prompt.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/Command Prompt.lnk
rename to Rebound/Rebound11Files/shcwin11/Command Prompt.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/Control Panel.lnk b/Rebound/Rebound11Files/shcwin11/Control Panel.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/Control Panel.lnk
rename to Rebound/Rebound11Files/shcwin11/Control Panel.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/Disk Cleanup.lnk b/Rebound/Rebound11Files/shcwin11/Disk Cleanup.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/Disk Cleanup.lnk
rename to Rebound/Rebound11Files/shcwin11/Disk Cleanup.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/On-Screen Keyboard.lnk b/Rebound/Rebound11Files/shcwin11/On-Screen Keyboard.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/On-Screen Keyboard.lnk
rename to Rebound/Rebound11Files/shcwin11/On-Screen Keyboard.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/Run.lnk b/Rebound/Rebound11Files/shcwin11/Run.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/Run.lnk
rename to Rebound/Rebound11Files/shcwin11/Run.lnk
diff --git a/ReboundHub/Rebound11Files/shcwin11/desktop.ini b/Rebound/Rebound11Files/shcwin11/desktop.ini
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/desktop.ini
rename to Rebound/Rebound11Files/shcwin11/desktop.ini
diff --git a/ReboundHub/Rebound11Files/shcwin11/dfrgui.lnk b/Rebound/Rebound11Files/shcwin11/dfrgui.lnk
similarity index 100%
rename from ReboundHub/Rebound11Files/shcwin11/dfrgui.lnk
rename to Rebound/Rebound11Files/shcwin11/dfrgui.lnk
diff --git a/ReboundHub/RegionBlock.xaml b/Rebound/RegionBlock.xaml
similarity index 89%
rename from ReboundHub/RegionBlock.xaml
rename to Rebound/RegionBlock.xaml
index 0a97e41..06786dc 100644
--- a/ReboundHub/RegionBlock.xaml
+++ b/Rebound/RegionBlock.xaml
@@ -1,9 +1,9 @@
diff --git a/ReboundHub/RegionBlock.xaml.cs b/Rebound/RegionBlock.xaml.cs
similarity index 99%
rename from ReboundHub/RegionBlock.xaml.cs
rename to Rebound/RegionBlock.xaml.cs
index a37dcb6..fe3e544 100644
--- a/ReboundHub/RegionBlock.xaml.cs
+++ b/Rebound/RegionBlock.xaml.cs
@@ -22,7 +22,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
-namespace ReboundHub;
+namespace Rebound;
///
/// An empty window that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/UACWindow.xaml b/Rebound/UACWindow.xaml
similarity index 98%
rename from ReboundHub/UACWindow.xaml
rename to Rebound/UACWindow.xaml
index becac5a..7d6e1f7 100644
--- a/ReboundHub/UACWindow.xaml
+++ b/Rebound/UACWindow.xaml
@@ -1,9 +1,9 @@
/// An empty window that can be used on its own or navigated to within a Frame.
///
diff --git a/ReboundHub/UninstallationWindow.xaml b/Rebound/UninstallationWindow.xaml
similarity index 96%
rename from ReboundHub/UninstallationWindow.xaml
rename to Rebound/UninstallationWindow.xaml
index 9861f6e..1202a3d 100644
--- a/ReboundHub/UninstallationWindow.xaml
+++ b/Rebound/UninstallationWindow.xaml
@@ -1,9 +1,9 @@
/// An empty window that can be used on its own or navigated to within a Frame.
///
@@ -134,7 +134,7 @@ await UninstallAppPackage(
await DeleteShortcut(
"Rebound Run",
- $@"{Environment.GetFolderPath(Environment.SpecialFolder.StartMenu)}\Programs\Startup\ReboundRunStartup.lnk",
+ $@"{Environment.GetFolderPath(Environment.SpecialFolder.StartMenu)}\Programs\Startup\Rebound.RunStartup.lnk",
"Rebound Run");
await UninstallAppPackage(
diff --git a/ReboundHub/app.manifest b/Rebound/app.manifest
similarity index 95%
rename from ReboundHub/app.manifest
rename to Rebound/app.manifest
index fa24770..57be6f7 100644
--- a/ReboundHub/app.manifest
+++ b/Rebound/app.manifest
@@ -1,6 +1,6 @@
-
+
diff --git a/ReboundHub.sln b/ReboundHub.sln
deleted file mode 100644
index 4b57f58..0000000
--- a/ReboundHub.sln
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34616.47
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReboundHub", "ReboundHub\ReboundHub.csproj", "{4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|ARM64 = Debug|ARM64
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|ARM64 = Release|ARM64
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|ARM64.Build.0 = Debug|ARM64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|ARM64.Deploy.0 = Debug|ARM64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x64.ActiveCfg = Debug|x64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x64.Build.0 = Debug|x64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x64.Deploy.0 = Debug|x64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x86.ActiveCfg = Debug|x86
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x86.Build.0 = Debug|x86
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Debug|x86.Deploy.0 = Debug|x86
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|ARM64.ActiveCfg = Release|ARM64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|ARM64.Build.0 = Release|ARM64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|ARM64.Deploy.0 = Release|ARM64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x64.ActiveCfg = Release|x64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x64.Build.0 = Release|x64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x64.Deploy.0 = Release|x64
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x86.ActiveCfg = Release|x86
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x86.Build.0 = Release|x86
- {4C58BAB7-F9D6-48AB-B20D-C8F6413D6E34}.Release|x86.Deploy.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {F46D9F10-D75A-4C1E-99F0-14EE79D20EDE}
- EndGlobalSection
-EndGlobal
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundDefrag.cer b/ReboundHub/Rebound11Files/AppPackages/ReboundDefrag.cer
deleted file mode 100644
index 1aee9dc..0000000
Binary files a/ReboundHub/Rebound11Files/AppPackages/ReboundDefrag.cer and /dev/null differ
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundDefrag.msix b/ReboundHub/Rebound11Files/AppPackages/ReboundDefrag.msix
deleted file mode 100644
index a9b063b..0000000
--- a/ReboundHub/Rebound11Files/AppPackages/ReboundDefrag.msix
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4b2d586afd6764cdb3898ef652c16c094482a23cb0836f9c651717650916e829
-size 96172578
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundDiskCleanup.cer b/ReboundHub/Rebound11Files/AppPackages/ReboundDiskCleanup.cer
deleted file mode 100644
index 79f7014..0000000
Binary files a/ReboundHub/Rebound11Files/AppPackages/ReboundDiskCleanup.cer and /dev/null differ
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundDiskCleanup.msix b/ReboundHub/Rebound11Files/AppPackages/ReboundDiskCleanup.msix
deleted file mode 100644
index 3593a44..0000000
--- a/ReboundHub/Rebound11Files/AppPackages/ReboundDiskCleanup.msix
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bf81c78938d20e7b88c332d80265c1a89e41f5332bd6c3255168fadff8f036ed
-size 44798335
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundRun.cer b/ReboundHub/Rebound11Files/AppPackages/ReboundRun.cer
deleted file mode 100644
index 9dfc006..0000000
Binary files a/ReboundHub/Rebound11Files/AppPackages/ReboundRun.cer and /dev/null differ
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundRun.msix b/ReboundHub/Rebound11Files/AppPackages/ReboundRun.msix
deleted file mode 100644
index 7820d69..0000000
--- a/ReboundHub/Rebound11Files/AppPackages/ReboundRun.msix
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:14425a097d83010cd46929310a59d7818cccdfac3c63dc76fb57748e65af4294
-size 45056401
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundTpm.cer b/ReboundHub/Rebound11Files/AppPackages/ReboundTpm.cer
deleted file mode 100644
index e1d1f44..0000000
Binary files a/ReboundHub/Rebound11Files/AppPackages/ReboundTpm.cer and /dev/null differ
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundTpm.msix b/ReboundHub/Rebound11Files/AppPackages/ReboundTpm.msix
deleted file mode 100644
index 162418a..0000000
--- a/ReboundHub/Rebound11Files/AppPackages/ReboundTpm.msix
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:68e88191d66712bda3eb7b49769f3f96840871a4a9d8e92039b838888765d839
-size 68175764
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundWinver.cer b/ReboundHub/Rebound11Files/AppPackages/ReboundWinver.cer
deleted file mode 100644
index 26e18c6..0000000
Binary files a/ReboundHub/Rebound11Files/AppPackages/ReboundWinver.cer and /dev/null differ
diff --git a/ReboundHub/Rebound11Files/AppPackages/ReboundWinver.msix b/ReboundHub/Rebound11Files/AppPackages/ReboundWinver.msix
deleted file mode 100644
index af6478d..0000000
--- a/ReboundHub/Rebound11Files/AppPackages/ReboundWinver.msix
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:35a1ee585e28dfed0dcc25099be5086457f50ab4b7e6c8da1a84719a30b3847d
-size 44999039
diff --git a/ReboundHub/Rebound11Files/Executables/QuickFullComputerCleanup.exe b/ReboundHub/Rebound11Files/Executables/QuickFullComputerCleanup.exe
deleted file mode 100644
index 97b1d30..0000000
Binary files a/ReboundHub/Rebound11Files/Executables/QuickFullComputerCleanup.exe and /dev/null differ
diff --git a/Run/App.xaml b/Run/App.xaml
new file mode 100644
index 0000000..2a70101
--- /dev/null
+++ b/Run/App.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Run/App.xaml.cs b/Run/App.xaml.cs
new file mode 100644
index 0000000..01e88df
--- /dev/null
+++ b/Run/App.xaml.cs
@@ -0,0 +1,288 @@
+using IWshRuntimeLibrary;
+using Microsoft.UI.Xaml;
+using Rebound.Run.Helpers;
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using Windows.System;
+using Windows.UI.Input.Preview.Injection;
+using WinUIEx;
+using File = System.IO.File;
+using Task = System.Threading.Tasks.Task;
+
+#nullable enable
+#pragma warning disable CA2211 // Non-constant fields should not be visible
+
+namespace Rebound.Run
+{
+ public partial class App : Application
+ {
+ private readonly SingleInstanceDesktopApp _singleInstanceApp;
+
+ public App()
+ {
+ this?.InitializeComponent();
+
+ _singleInstanceApp = new SingleInstanceDesktopApp("Rebound.Run");
+ _singleInstanceApp.Launched += OnSingleInstanceLaunched;
+ }
+
+ public static WindowEx? BackgroundWindow { get; set; }
+
+ protected override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ _singleInstanceApp?.Launch(args.Arguments);
+ }
+
+ private async void OnSingleInstanceLaunched(object? sender, SingleInstanceLaunchEventArgs e)
+ {
+ if (e.IsFirstLaunch)
+ {
+ await LaunchWork();
+ }
+ else
+ {
+ // Get the current process
+ Process currentProcess = Process.GetCurrentProcess();
+
+ // Start a new instance of the application
+ if (currentProcess.MainModule != null) Process.Start(currentProcess.MainModule.FileName);
+
+ // Terminate the current process
+ currentProcess?.Kill();
+ return;
+ }
+ }
+
+ public async Task LaunchWork()
+ {
+ CreateShortcut();
+
+ // Initialize the background window
+ InitializeBackgroundWindow();
+
+ MainWindow = new MainWindow();
+
+ // Register any background tasks or hooks
+ StartHook();
+
+ // Delay for task execution
+ await Task.Delay(5);
+
+ // Check if Windows hotkey shortcuts are disabled by group policy
+ if (GroupPolicyHelper.IsGroupPolicyEnabled(GroupPolicyHelper.EXPLORER_GROUP_POLICY_PATH, "NoWinKeys", 1) == true)
+ {
+ StopHook();
+ }
+
+ // If started with the "STARTUP" argument, exit early
+ if (IsStartupArgumentPresent())
+ {
+ return 0;
+ }
+
+ // Try to activate the main window
+ await ActivateMainWindowAsync();
+
+ return 0;
+ }
+
+ private static void InitializeBackgroundWindow()
+ {
+ try
+ {
+ BackgroundWindow = new()
+ {
+ SystemBackdrop = new TransparentTintBackdrop(),
+ IsMaximizable = false
+ };
+ BackgroundWindow?.SetExtendedWindowStyle(ExtendedWindowStyle.ToolWindow);
+ BackgroundWindow?.SetWindowStyle(WindowStyle.Visible);
+ BackgroundWindow?.Activate();
+ BackgroundWindow?.MoveAndResize(0, 0, 0, 0);
+ BackgroundWindow?.Minimize();
+ BackgroundWindow?.SetWindowOpacity(0);
+ }
+ catch
+ {
+
+ }
+ }
+
+ private static bool IsStartupArgumentPresent()
+ {
+ return string.Join(" ", Environment.GetCommandLineArgs().Skip(1)).Contains("STARTUP");
+ }
+
+ private static async Task ActivateMainWindowAsync()
+ {
+ try
+ {
+ MainWindow?.Activate();
+ }
+ catch
+ {
+ // Handle activation error
+ }
+
+ await Task.Delay(100); // Ensure main window focus
+
+ try
+ {
+ MainWindow?.Activate(); // Reactivate to ensure focus
+ }
+ catch
+ {
+ // Handle activation error
+ }
+
+ MainWindow?.Show(); // Ensure window is visible
+
+ // Bring to front explicitly
+ ((WindowEx?)MainWindow)?.BringToFront();
+ }
+
+ private void CreateShortcut()
+ {
+ string startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
+ string oldShortcutPath = System.IO.Path.Combine(startupFolderPath, "Rebound.Run.lnk");
+ try
+ {
+ File.Delete(oldShortcutPath);
+ }
+ catch
+ {
+
+ }
+ string shortcutPath = System.IO.Path.Combine(startupFolderPath, "Rebound.RunStartup.lnk");
+ if (!File.Exists(shortcutPath))
+ {
+ WshShell shell = new();
+ IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutPath);
+ shortcut.Description = "Rebound Run";
+ shortcut.TargetPath = "C:\\Rebound11\\rrunSTARTUP.exe";
+ shortcut?.Save();
+ }
+ }
+
+ public static void StartHook()
+ {
+ Win32Helper.keyboardProc = HookCallback;
+ Win32Helper.hookId = SetHook(Win32Helper.keyboardProc);
+ }
+
+ public static void StopHook()
+ {
+ Win32Helper.UnhookWindowsHookEx(Win32Helper.hookId);
+ }
+
+ public static bool AllowClosingRunBox { get; set; } = true;
+
+ private static IntPtr SetHook(Win32Helper.LowLevelKeyboardProc proc)
+ {
+ using (Process curProcess = Process.GetCurrentProcess())
+ {
+ if (curProcess.MainModule != null)
+ {
+ using (ProcessModule curModule = curProcess.MainModule)
+ {
+ return Win32Helper.SetWindowsHookEx(Win32Helper.WH_KEYBOARD_LL, proc, Win32Helper.GetModuleHandle(curModule.ModuleName), 0);
+ }
+ }
+ }
+ return IntPtr.Zero;
+ }
+
+ private static bool winKeyPressed = false;
+ private static bool rKeyPressed = false;
+
+ private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam)
+ {
+ if (nCode >= 0)
+ {
+ int vkCode = Marshal.ReadInt32(lParam);
+
+ // Check for keydown events
+ if (wParam == Win32Helper.WM_KEYDOWN)
+ {
+ // Check if Windows key is pressed
+ if (vkCode is Win32Helper.VK_LWIN or Win32Helper.VK_RWIN)
+ {
+ winKeyPressed = true;
+ }
+
+ // Check if 'R' key is pressed
+ if (vkCode is Win32Helper.VK_R)
+ {
+ rKeyPressed = true;
+
+ // If both Win and R are pressed, show the window
+ if (winKeyPressed)
+ {
+ ((WindowEx?)MainWindow)?.Show();
+ ((WindowEx?)MainWindow)?.BringToFront();
+ try
+ {
+ ((WindowEx?)MainWindow)?.Activate();
+ }
+ catch
+ {
+ MainWindow = new MainWindow();
+ MainWindow.Show();
+ ((WindowEx?)MainWindow)?.Activate();
+ ((WindowEx?)MainWindow)?.BringToFront();
+ }
+
+ // Prevent default behavior of Win + R
+ return 1;
+ }
+ }
+ }
+
+ // Check for keyup events
+ if (wParam == Win32Helper.WM_KEYUP)
+ {
+ // Check if Windows key is released
+ if (vkCode is Win32Helper.VK_LWIN or Win32Helper.VK_RWIN)
+ {
+ winKeyPressed = false;
+
+ // Suppress the Windows Start menu if 'R' is still pressed
+ if (rKeyPressed == true)
+ {
+ ForceReleaseWin();
+ return 1; // Prevent Windows menu from appearing
+ }
+ }
+
+ // Check if 'R' key is released
+ if (vkCode is Win32Helper.VK_R)
+ {
+ rKeyPressed = false;
+ }
+ }
+ }
+
+ return Win32Helper.CallNextHookEx(Win32Helper.hookId, nCode, wParam, lParam);
+ }
+
+ public static async void ForceReleaseWin()
+ {
+ await Task.Delay(10);
+
+ var inj = InputInjector.TryCreate();
+ var info = new InjectedInputKeyboardInfo
+ {
+ VirtualKey = (ushort)VirtualKey.LeftWindows,
+ KeyOptions = InjectedInputKeyOptions.KeyUp
+ };
+ var infoList = new[] { info };
+
+ inj.InjectKeyboardInput(infoList);
+ }
+
+ public static Window? MainWindow;
+ }
+}
diff --git a/Run/Assets/Administrator.ico b/Run/Assets/Administrator.ico
new file mode 100644
index 0000000..3ac3b0e
Binary files /dev/null and b/Run/Assets/Administrator.ico differ
diff --git a/Run/Assets/ClassicEXE.ico b/Run/Assets/ClassicEXE.ico
new file mode 100644
index 0000000..e2fd246
Binary files /dev/null and b/Run/Assets/ClassicEXE.ico differ
diff --git a/Run/Assets/EXE.ico b/Run/Assets/EXE.ico
new file mode 100644
index 0000000..978234c
Binary files /dev/null and b/Run/Assets/EXE.ico differ
diff --git a/Run/Assets/LargeTile.scale-100.png b/Run/Assets/LargeTile.scale-100.png
new file mode 100644
index 0000000..7f2088d
Binary files /dev/null and b/Run/Assets/LargeTile.scale-100.png differ
diff --git a/Run/Assets/LargeTile.scale-125.png b/Run/Assets/LargeTile.scale-125.png
new file mode 100644
index 0000000..552dbc4
Binary files /dev/null and b/Run/Assets/LargeTile.scale-125.png differ
diff --git a/Run/Assets/LargeTile.scale-150.png b/Run/Assets/LargeTile.scale-150.png
new file mode 100644
index 0000000..3922ad8
Binary files /dev/null and b/Run/Assets/LargeTile.scale-150.png differ
diff --git a/Run/Assets/LargeTile.scale-200.png b/Run/Assets/LargeTile.scale-200.png
new file mode 100644
index 0000000..7b267b3
Binary files /dev/null and b/Run/Assets/LargeTile.scale-200.png differ
diff --git a/Run/Assets/LargeTile.scale-400.png b/Run/Assets/LargeTile.scale-400.png
new file mode 100644
index 0000000..92846c0
Binary files /dev/null and b/Run/Assets/LargeTile.scale-400.png differ
diff --git a/Run/Assets/LockScreenLogo.scale-200.png b/Run/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/Run/Assets/LockScreenLogo.scale-200.png differ
diff --git a/Run/Assets/RunBox.ico b/Run/Assets/RunBox.ico
new file mode 100644
index 0000000..5d1935f
Binary files /dev/null and b/Run/Assets/RunBox.ico differ
diff --git a/Run/Assets/RunBox.png b/Run/Assets/RunBox.png
new file mode 100644
index 0000000..968dc8a
Binary files /dev/null and b/Run/Assets/RunBox.png differ
diff --git a/Run/Assets/SmallTile.scale-100.png b/Run/Assets/SmallTile.scale-100.png
new file mode 100644
index 0000000..5800dd3
Binary files /dev/null and b/Run/Assets/SmallTile.scale-100.png differ
diff --git a/Run/Assets/SmallTile.scale-125.png b/Run/Assets/SmallTile.scale-125.png
new file mode 100644
index 0000000..a32dc96
Binary files /dev/null and b/Run/Assets/SmallTile.scale-125.png differ
diff --git a/Run/Assets/SmallTile.scale-150.png b/Run/Assets/SmallTile.scale-150.png
new file mode 100644
index 0000000..6168ddd
Binary files /dev/null and b/Run/Assets/SmallTile.scale-150.png differ
diff --git a/Run/Assets/SmallTile.scale-200.png b/Run/Assets/SmallTile.scale-200.png
new file mode 100644
index 0000000..740ac50
Binary files /dev/null and b/Run/Assets/SmallTile.scale-200.png differ
diff --git a/Run/Assets/SmallTile.scale-400.png b/Run/Assets/SmallTile.scale-400.png
new file mode 100644
index 0000000..2cb1868
Binary files /dev/null and b/Run/Assets/SmallTile.scale-400.png differ
diff --git a/Run/Assets/SplashScreen.scale-100.png b/Run/Assets/SplashScreen.scale-100.png
new file mode 100644
index 0000000..3ebdc58
Binary files /dev/null and b/Run/Assets/SplashScreen.scale-100.png differ
diff --git a/Run/Assets/SplashScreen.scale-125.png b/Run/Assets/SplashScreen.scale-125.png
new file mode 100644
index 0000000..cf9eaef
Binary files /dev/null and b/Run/Assets/SplashScreen.scale-125.png differ
diff --git a/Run/Assets/SplashScreen.scale-150.png b/Run/Assets/SplashScreen.scale-150.png
new file mode 100644
index 0000000..d1c8709
Binary files /dev/null and b/Run/Assets/SplashScreen.scale-150.png differ
diff --git a/Run/Assets/SplashScreen.scale-200.png b/Run/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..cf871d0
Binary files /dev/null and b/Run/Assets/SplashScreen.scale-200.png differ
diff --git a/Run/Assets/SplashScreen.scale-400.png b/Run/Assets/SplashScreen.scale-400.png
new file mode 100644
index 0000000..e721af6
Binary files /dev/null and b/Run/Assets/SplashScreen.scale-400.png differ
diff --git a/Run/Assets/Square150x150Logo.scale-100.png b/Run/Assets/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..34379a7
Binary files /dev/null and b/Run/Assets/Square150x150Logo.scale-100.png differ
diff --git a/Run/Assets/Square150x150Logo.scale-125.png b/Run/Assets/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..d33ab0f
Binary files /dev/null and b/Run/Assets/Square150x150Logo.scale-125.png differ
diff --git a/Run/Assets/Square150x150Logo.scale-150.png b/Run/Assets/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..83b04a9
Binary files /dev/null and b/Run/Assets/Square150x150Logo.scale-150.png differ
diff --git a/Run/Assets/Square150x150Logo.scale-200.png b/Run/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..c33a96f
Binary files /dev/null and b/Run/Assets/Square150x150Logo.scale-200.png differ
diff --git a/Run/Assets/Square150x150Logo.scale-400.png b/Run/Assets/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..4cb91e7
Binary files /dev/null and b/Run/Assets/Square150x150Logo.scale-400.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..7545ceb
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..da2baca
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..8094c96
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..a43f82c
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..78951ce
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..7545ceb
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..8094c96
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..a43f82c
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/Run/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..78951ce
Binary files /dev/null and b/Run/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/Run/Assets/Square44x44Logo.scale-100.png b/Run/Assets/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..9996dd7
Binary files /dev/null and b/Run/Assets/Square44x44Logo.scale-100.png differ
diff --git a/Run/Assets/Square44x44Logo.scale-125.png b/Run/Assets/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..af90ba1
Binary files /dev/null and b/Run/Assets/Square44x44Logo.scale-125.png differ
diff --git a/Run/Assets/Square44x44Logo.scale-150.png b/Run/Assets/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..504ca73
Binary files /dev/null and b/Run/Assets/Square44x44Logo.scale-150.png differ
diff --git a/Run/Assets/Square44x44Logo.scale-200.png b/Run/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..76310c9
Binary files /dev/null and b/Run/Assets/Square44x44Logo.scale-200.png differ
diff --git a/Run/Assets/Square44x44Logo.scale-400.png b/Run/Assets/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..67c19d0
Binary files /dev/null and b/Run/Assets/Square44x44Logo.scale-400.png differ
diff --git a/Run/Assets/Square44x44Logo.targetsize-16.png b/Run/Assets/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..fc635fc
Binary files /dev/null and b/Run/Assets/Square44x44Logo.targetsize-16.png differ
diff --git a/Run/Assets/Square44x44Logo.targetsize-24.png b/Run/Assets/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..801807e
Binary files /dev/null and b/Run/Assets/Square44x44Logo.targetsize-24.png differ
diff --git a/Run/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Run/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..da2baca
Binary files /dev/null and b/Run/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/Run/Assets/Square44x44Logo.targetsize-256.png b/Run/Assets/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..b3492fc
Binary files /dev/null and b/Run/Assets/Square44x44Logo.targetsize-256.png differ
diff --git a/Run/Assets/Square44x44Logo.targetsize-32.png b/Run/Assets/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..a7700e6
Binary files /dev/null and b/Run/Assets/Square44x44Logo.targetsize-32.png differ
diff --git a/Run/Assets/Square44x44Logo.targetsize-48.png b/Run/Assets/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..6222cab
Binary files /dev/null and b/Run/Assets/Square44x44Logo.targetsize-48.png differ
diff --git a/Run/Assets/StoreLogo.backup.png b/Run/Assets/StoreLogo.backup.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/Run/Assets/StoreLogo.backup.png differ
diff --git a/Run/Assets/StoreLogo.scale-100.png b/Run/Assets/StoreLogo.scale-100.png
new file mode 100644
index 0000000..ba63df3
Binary files /dev/null and b/Run/Assets/StoreLogo.scale-100.png differ
diff --git a/Run/Assets/StoreLogo.scale-125.png b/Run/Assets/StoreLogo.scale-125.png
new file mode 100644
index 0000000..ed3945b
Binary files /dev/null and b/Run/Assets/StoreLogo.scale-125.png differ
diff --git a/Run/Assets/StoreLogo.scale-150.png b/Run/Assets/StoreLogo.scale-150.png
new file mode 100644
index 0000000..05baf29
Binary files /dev/null and b/Run/Assets/StoreLogo.scale-150.png differ
diff --git a/Run/Assets/StoreLogo.scale-200.png b/Run/Assets/StoreLogo.scale-200.png
new file mode 100644
index 0000000..7720923
Binary files /dev/null and b/Run/Assets/StoreLogo.scale-200.png differ
diff --git a/Run/Assets/StoreLogo.scale-400.png b/Run/Assets/StoreLogo.scale-400.png
new file mode 100644
index 0000000..32d81d3
Binary files /dev/null and b/Run/Assets/StoreLogo.scale-400.png differ
diff --git a/Run/Assets/Wide310x150Logo.scale-100.png b/Run/Assets/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..d8222f5
Binary files /dev/null and b/Run/Assets/Wide310x150Logo.scale-100.png differ
diff --git a/Run/Assets/Wide310x150Logo.scale-125.png b/Run/Assets/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..0e1f906
Binary files /dev/null and b/Run/Assets/Wide310x150Logo.scale-125.png differ
diff --git a/Run/Assets/Wide310x150Logo.scale-150.png b/Run/Assets/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..9076ef6
Binary files /dev/null and b/Run/Assets/Wide310x150Logo.scale-150.png differ
diff --git a/Run/Assets/Wide310x150Logo.scale-200.png b/Run/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..3ebdc58
Binary files /dev/null and b/Run/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/Run/Assets/Wide310x150Logo.scale-400.png b/Run/Assets/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..cf871d0
Binary files /dev/null and b/Run/Assets/Wide310x150Logo.scale-400.png differ
diff --git a/Run/Helpers/GroupPolicyHelper.cs b/Run/Helpers/GroupPolicyHelper.cs
new file mode 100644
index 0000000..67a4a59
--- /dev/null
+++ b/Run/Helpers/GroupPolicyHelper.cs
@@ -0,0 +1,51 @@
+using Microsoft.Win32;
+using System;
+
+namespace Rebound.Run.Helpers
+{
+ public static class GroupPolicyHelper
+ {
+ public const string EXPLORER_GROUP_POLICY_PATH = @"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
+
+ public static bool? IsGroupPolicyEnabled(string path, string value, int trueValue)
+ {
+ try
+ {
+ // Path to the registry key
+ string registryKeyPath = path;
+ // Name of the value we are looking for
+ string valueName = value;
+
+ // Open the registry key
+ using (RegistryKey key = Registry.CurrentUser.OpenSubKey(registryKeyPath))
+ {
+ if (key != null)
+ {
+ object val = key.GetValue(valueName);
+
+ if (val != null && (int)val == trueValue)
+ {
+ // Run box is disabled
+ return true;
+ }
+ else
+ {
+ // Run box is enabled
+ return false;
+ }
+ }
+ else
+ {
+ // Key not found, assume Run box is enabled
+ return null;
+ }
+ }
+ }
+ catch (Exception)
+ {
+ // Handle any exceptions
+ return null;
+ }
+ }
+ }
+}
diff --git a/Run/Helpers/SingleInstanceHelper.cs b/Run/Helpers/SingleInstanceHelper.cs
new file mode 100644
index 0000000..c29049a
--- /dev/null
+++ b/Run/Helpers/SingleInstanceHelper.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Diagnostics;
+using System.IO.Pipes;
+using System.IO;
+using System.Linq;
+using System.Threading;
+
+#nullable enable
+
+namespace Rebound.Run.Helpers
+{
+ public class SingleInstanceLaunchEventArgs(string arguments, bool isFirstLaunch) : EventArgs
+ {
+ public string Arguments { get; private set; } = arguments;
+ public bool IsFirstLaunch { get; private set; } = isFirstLaunch;
+ }
+
+ public sealed partial class SingleInstanceDesktopApp(string appId) : IDisposable
+ {
+ private readonly string _mutexName = "MUTEX_" + appId;
+ private readonly string _pipeName = "PIPE_" + appId;
+ private readonly object _namedPiperServerThreadLock = new();
+
+ private bool _isDisposed = false;
+ private bool _isFirstInstance;
+
+ private Mutex? _mutexApplication;
+ private NamedPipeServerStream? _namedPipeServerStream;
+
+ public event EventHandler? Launched;
+
+ public void Launch(string arguments)
+ {
+ if (string.IsNullOrEmpty(arguments))
+ {
+ // The arguments from LaunchActivatedEventArgs can be empty, when
+ // the user specified arguments (e.g. when using an execution alias). For this reason we
+ // alternatively check for arguments using a different API.
+ var argList = Environment.GetCommandLineArgs();
+ if (argList.Length > 1)
+ {
+ arguments = string.Join(' ', argList.Skip(1));
+ }
+ }
+
+ if (IsFirstApplicationInstance())
+ {
+ CreateNamedPipeServer();
+ Launched?.Invoke(this, new SingleInstanceLaunchEventArgs(arguments, isFirstLaunch: true));
+ }
+ else
+ {
+ SendArgumentsToRunningInstance(arguments);
+
+ Process.GetCurrentProcess().Kill();
+ // Note: needed to kill the process in WinAppSDK 1.0, since Application.Current.Exit() does not work there.
+ // OR: Application.Current.Exit();
+ }
+ }
+
+ public void Dispose()
+ {
+ if (_isDisposed)
+ return;
+
+ _isDisposed = true;
+
+ _namedPipeServerStream?.Dispose();
+ _mutexApplication?.Dispose();
+ }
+
+ private bool IsFirstApplicationInstance()
+ {
+ // Allow for multiple runs but only try and get the mutex once
+ _mutexApplication ??= new Mutex(true, _mutexName, out _isFirstInstance);
+
+ return _isFirstInstance;
+ }
+
+ ///
+ /// Starts a new pipe server if one isn't already active.
+ ///
+ private void CreateNamedPipeServer()
+ {
+ _namedPipeServerStream = new NamedPipeServerStream(
+ _pipeName, PipeDirection.In,
+ maxNumberOfServerInstances: 1,
+ PipeTransmissionMode.Byte,
+ PipeOptions.Asynchronous,
+ inBufferSize: 0,
+ outBufferSize: 0);
+
+ _namedPipeServerStream.BeginWaitForConnection(OnNamedPipeServerConnected, _namedPipeServerStream);
+ }
+
+ private void SendArgumentsToRunningInstance(string arguments)
+ {
+ try
+ {
+ using var namedPipeClientStream = new NamedPipeClientStream(".", _pipeName, PipeDirection.Out);
+ namedPipeClientStream.Connect(3000); // Maximum wait 3 seconds
+ using var sw = new StreamWriter(namedPipeClientStream);
+ sw.Write(arguments);
+ sw.Flush();
+ }
+ catch (Exception)
+ {
+ // Error connecting or sending
+ }
+ }
+
+ private void OnNamedPipeServerConnected(IAsyncResult asyncResult)
+ {
+ try
+ {
+ if (_namedPipeServerStream == null)
+ return;
+
+ _namedPipeServerStream.EndWaitForConnection(asyncResult);
+
+ // Read the arguments from the pipe
+ lock (_namedPiperServerThreadLock)
+ {
+ using var sr = new StreamReader(_namedPipeServerStream);
+ var args = sr.ReadToEnd();
+ Launched?.Invoke(this, new SingleInstanceLaunchEventArgs(args, isFirstLaunch: false));
+ }
+ }
+ catch (ObjectDisposedException)
+ {
+ // EndWaitForConnection will throw when the pipe closes before there is a connection.
+ // In that case, we don't create more pipes and just return.
+ // This will happen when the app is closed and therefor the pipe is closed as well.
+ return;
+ }
+ catch (Exception)
+ {
+ // ignored
+ }
+ finally
+ {
+ // Close the original pipe (we will create a new one each time)
+ _namedPipeServerStream?.Dispose();
+ }
+
+ // Create a new pipe for next connection
+ CreateNamedPipeServer();
+ }
+ }
+}
diff --git a/Run/Helpers/Win32Helper.cs b/Run/Helpers/Win32Helper.cs
new file mode 100644
index 0000000..5fffa71
--- /dev/null
+++ b/Run/Helpers/Win32Helper.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Runtime.InteropServices;
+
+#pragma warning disable CA2211 // Non-constant fields should not be visible
+#pragma warning disable CA1401 // P/Invokes should not be visible
+#pragma warning disable SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
+#nullable enable
+
+namespace Rebound.Run.Helpers
+{
+ public static partial class Win32Helper
+ {
+ public const uint WM_CLOSE = 0x0010;
+ public const int WH_KEYBOARD_LL = 13;
+ public const int WM_KEYDOWN = 0x0100;
+ public const int WM_KEYUP = 0x0101;
+ public const int VK_R = 0x52;
+ public const int VK_LWIN = 0x5B;
+ public const int VK_RWIN = 0x5C;
+ public const int INPUT_KEYBOARD = 1;
+ public const int KEYEVENTF_KEYUP = 0x0002;
+
+ public static IntPtr hookId = IntPtr.Zero;
+ public static LowLevelKeyboardProc? keyboardProc;
+ public delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr FindWindow(string? lpClassName, string? lpWindowName);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool UnhookWindowsHookEx(IntPtr hhk);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);
+
+ [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr GetModuleHandle(string lpModuleName);
+ }
+}
diff --git a/Run/Languages/StringTable.cs b/Run/Languages/StringTable.cs
new file mode 100644
index 0000000..80359ae
--- /dev/null
+++ b/Run/Languages/StringTable.cs
@@ -0,0 +1,54 @@
+using System.Globalization;
+
+namespace Rebound.Run.Languages
+{
+ public class StringTable
+ {
+ public static string AppTitle;
+ public static string Run;
+ public static string RunAsAdmin;
+ public static string Description;
+ public static string Open;
+ public static string Arguments;
+ public static string Cancel;
+ public static string Browse;
+
+ public StringTable()
+ {
+ ReadLanguage();
+ }
+
+ public static void ReadLanguage()
+ {
+ // Get the current culture (language) of the system
+ CultureInfo currentCulture = CultureInfo.CurrentUICulture;
+ if (currentCulture.Name.ToLower() == "en-us")
+ {
+ AppTitle = "Rebound Run";
+ Run = "Run";
+ RunAsAdmin = "Run as Administrator";
+ Description = "Type the name of a program, folder, document, or Internet resource, and Windows will open it for you.";
+ Open = "Open";
+ Arguments = "Arguments";
+ Cancel = "Cancel";
+ Browse = "Browse";
+ }
+ if (currentCulture.Name.ToLower() == "ro-ro")
+ {
+ AppTitle = "Executare Rebound";
+ Run = "Execută";
+ }
+ if (currentCulture.Name.ToLower() == "de-de")
+ {
+ AppTitle = "Rebound Ausführen";
+ Run = "Ausführen";
+ RunAsAdmin = "Als Administrator ausführen";
+ Description = "Geben Sie den Namen eines Programms, Ordners, Dokuments oder einer Internetressource an.";
+ Open = "Öffnen";
+ Arguments = "Argumente";
+ Cancel = "Abbrechen";
+ Browse = "Druchsuchen";
+ }
+ }
+ }
+}
diff --git a/Run/MainWindow.xaml b/Run/MainWindow.xaml
new file mode 100644
index 0000000..c016204
--- /dev/null
+++ b/Run/MainWindow.xaml
@@ -0,0 +1,364 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Run/MainWindow.xaml.cs b/Run/MainWindow.xaml.cs
new file mode 100644
index 0000000..1c061b7
--- /dev/null
+++ b/Run/MainWindow.xaml.cs
@@ -0,0 +1,664 @@
+using Microsoft.Graphics.Display;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Win32;
+using Rebound.Run.Helpers;
+using Rebound.Run.Languages;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Windows.Storage.Pickers;
+using Windows.System;
+using WinUIEx;
+
+#pragma warning disable IDE0044 // Add readonly modifier
+
+namespace Rebound.Run
+{
+ public sealed partial class MainWindow : WindowEx
+ {
+ public double Scale()
+ {
+ try
+ {
+ return DisplayInformation.CreateForWindowId(AppWindow.Id).RawPixelsPerViewPixel;
+ }
+ catch
+ {
+ return 0;
+ }
+ }
+
+
+ public MainWindow()
+ {
+ this.InitializeComponent();
+ StringTable.ReadLanguage();
+ this.MoveAndResize(25 * Scale(), (WindowsDisplayAPI.Display.GetDisplays().ToList()[0].CurrentSetting.Resolution.Height - 370 / Scale()) / Scale(), 525, 295);
+ this.IsMinimizable = false;
+ this.IsMaximizable = false;
+ this.IsResizable = false;
+ this.AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ this.SetIcon($"{AppContext.BaseDirectory}/Assets/RunBox.ico");
+ this.Title = StringTable.AppTitle;
+ this.SystemBackdrop = new MicaBackdrop();
+ CheckForRunBox();
+ Load();
+ LoadRunHistory();
+ }
+
+ public async void Load()
+ {
+ await Task.Delay(100);
+ RunBox.Focus(FocusState.Keyboard);
+ }
+
+ private void LoadRunHistory(bool clear = false)
+ {
+ string runMRUPath = @"Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU";
+ RegistryKey runMRUKey = Registry.CurrentUser.OpenSubKey(runMRUPath);
+
+ if (runMRUKey != null)
+ {
+ // Read the MRUList to determine the order of the entries
+ string mruList = runMRUKey.GetValue("MRUList")?.ToString();
+ if (mruList != null)
+ {
+ List runHistory = [];
+
+ // Iterate over each character in the MRUList to get the entries in order
+ foreach (char entry in mruList)
+ {
+ string entryValue = runMRUKey.GetValue(entry.ToString())?.ToString();
+ if (!string.IsNullOrEmpty(entryValue))
+ {
+ // Remove the '/1' suffix if it exists
+ if (entryValue.EndsWith("\\1"))
+ {
+ entryValue = entryValue[..^2];
+ // Same as entryValue = entryValue.Substring(0, entryValue.Length - 2);
+ }
+ if (clear == false) runHistory.Add(entryValue);
+ else
+ {
+ runHistory.Remove(entryValue);
+ runHistory.Clear();
+ }
+ }
+ }
+
+ // Display the ordered entries in the ListBox
+ RunBox.ItemsSource = runHistory;
+ RunBox.SelectedIndex = 0;
+ }
+
+ runMRUKey.Close();
+ }
+ }
+
+ public async Task Run(bool runLegacy = false, bool admin = false)
+ {
+ string newEntry = RunBox.Text.ToString();
+
+ if (newEntry.Contains("://") == true)
+ {
+ await Launcher.LaunchUriAsync(new Uri(newEntry));
+ Close();
+ return;
+ }
+
+ switch(RunBox.Text.ToString().ToLower())
+ {
+ case "":
+ {
+ return;
+ }
+ case "settings":
+ {
+ if (!runLegacy) await Launcher.LaunchUriAsync(new Uri("ms-settings:///"));
+ else await RunPowershell("control", ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "dfrgui" or "dfrgui.exe" or @"c:\windows\system32\dfrgui.exe" or "rdfrgui" or "rdfrgui.exe":
+ {
+ string path = @"C:\Rebound11\rdfrgui.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "control" or "control.exe" or @"c:\windows\system32\control.exe" or "rcontrol" or "rcontrol.exe":
+ {
+ string path = @"C:\Rebound11\rcontrol.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "tpm" or "tpm.msc" or @"c:\windows\system32\tpm.msc" or "rtpm" or "rtpm.exe":
+ {
+ string path = @"C:\Rebound11\rtpm.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "cleanmgr" or "cleanmgr.exe" or @"c:\windows\system32\cleanmgr.exe" or "rcleanmgr" or "rcleanmgr.exe":
+ {
+ string path = @"C:\Rebound11\rcleanmgr.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "osk" or "osk.exe" or @"c:\windows\system32\osk.exe" or "rosk" or "rosk.exe":
+ {
+ string path = @"C:\Rebound11\rosk.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "useraccountcontrolsettings" or "useraccountcontrolsettings.exe" or @"c:\windows\system32\useraccountcontrolsettings.exe" or "ruacsettings" or "ruacsettings.exe":
+ {
+ string path = @"C:\Rebound11\ruacsettings.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "winver" or "winver.exe" or @"c:\windows\system32\winver.exe" or "rwinver" or "rwinver.exe":
+ {
+ string path = @"C:\Rebound11\rwinver.exe";
+ if (File.Exists(path) && !runLegacy)
+ {
+ await RunPowershell(path, ArgsBox.Text, admin);
+ return;
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "taskmgr" or "taskmgr.exe" or @"c:\windows\system32\taskmgr.exe":
+ {
+ if (runLegacy == true)
+ {
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ Arguments = "taskmgr -d"
+ };
+
+ if (admin == true) startInfo.Verb = "runas";
+
+ try
+ {
+ var res = Process.Start(startInfo);
+ await res.WaitForExitAsync();
+ if (res.ExitCode == 0) Close();
+ }
+ catch (Exception)
+ {
+ await this.ShowMessageDialogAsync($"The system cannot find the file specified.");
+ }
+ }
+ else await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ Close();
+ return;
+ }
+ case "run" or "rrun" or "rrun.exe":
+ {
+ if (runLegacy == true)
+ {
+ App.AllowClosingRunBox = false;
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ Arguments = "(New-Object -ComObject \"Shell.Application\").FileRun()"
+ };
+
+ if (admin == true) startInfo.Verb = "runas";
+
+ try
+ {
+ await this.ShowMessageDialogAsync($"You will have to open this app again to bring back the Windows + R invoke command for Rebound Run.", "Important");
+ var res = Process.Start(startInfo);
+ Close();
+ Process.GetCurrentProcess().Kill();
+ }
+ catch (Exception)
+ {
+ await this.ShowMessageDialogAsync($"The system cannot find the file specified.");
+ }
+ }
+ else
+ {
+ await this.ShowMessageDialogAsync($"The WinUI 3 run box is already opened.", "Error");
+ return;
+ }
+ Close();
+ return;
+ }
+ default:
+ {
+ await RunPowershell(RunBox.Text, ArgsBox.Text, admin);
+ return;
+ }
+ }
+ }
+
+ public async void CloseRunBoxMethod()
+ {
+ try
+ {
+ CloseRunBox();
+ }
+ catch
+ {
+
+ }
+
+ await Task.Delay(50);
+ CloseRunBoxMethod();
+ }
+
+ public async Task RunPowershell(string fileLocation, string arguments, bool admin)
+ {
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ RedirectStandardOutput = true,
+ RedirectStandardError = true
+ };
+
+ // Handle arguments with spaces by wrapping them in double quotes
+ string runBoxText = fileLocation;
+ string argsBoxText = arguments;
+
+ if (!string.IsNullOrWhiteSpace(argsBoxText))
+ {
+ startInfo.Arguments = $"Start-Process -FilePath '{runBoxText}' -ArgumentList '{argsBoxText}'";
+ }
+ else
+ {
+ startInfo.Arguments = $"Start-Process -FilePath '{runBoxText}' ";
+ }
+
+ // Handle running as administrator
+ if (admin)
+ {
+ startInfo.Arguments += " -Verb RunAs";
+ startInfo.Verb = "runas";
+ }
+
+ try
+ {
+ var process = Process.Start(startInfo);
+ await process.WaitForExitAsync();
+
+ if (process.ExitCode == 0)
+ {
+ Close();
+ }
+ else
+ {
+ throw new Exception($"Process exited with code {process.ExitCode}");
+ }
+ }
+ catch (Exception)
+ {
+ await this.ShowMessageDialogAsync("The system cannot find the file specified or the command line arguments are invalid.", "Error");
+ }
+ }
+
+ private async void SplitButton_Click(SplitButton sender, SplitButtonClickEventArgs args)
+ {
+ string newEntry = RunBox.Text;
+
+ await Run();
+
+ string runMRUPath = @"Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU";
+ RegistryKey runMRUKey = Registry.CurrentUser.OpenSubKey(runMRUPath, true);
+
+ if (runMRUKey != null)
+ {
+ // Read the current MRUList
+ string mruList = runMRUKey.GetValue("MRUList")?.ToString();
+ if (mruList != null)
+ {
+ // Check for duplicates and remove the existing entry if found
+ char? existingEntryKey = null;
+ foreach (char entry in mruList)
+ {
+ string entryValue = runMRUKey.GetValue(entry.ToString())?.ToString();
+ if (entryValue != null && entryValue.StartsWith(newEntry))
+ {
+ existingEntryKey = entry;
+ break;
+ }
+ }
+
+ if (existingEntryKey.HasValue)
+ {
+ // Remove the existing entry
+ mruList = mruList.Replace(existingEntryKey.Value.ToString(), string.Empty);
+ }
+
+ // Determine the new entry key
+ char newEntryKey = 'a';
+ if (mruList.Length > 0)
+ {
+ newEntryKey = (char)(mruList[0] + 1);
+ }
+
+ // Add the new entry to the registry
+ runMRUKey.SetValue(newEntryKey.ToString(), newEntry);
+
+ // Update the MRUList
+ mruList = newEntryKey + mruList;
+ runMRUKey.SetValue("MRUList", mruList);
+
+ runMRUKey.Close();
+
+ // Reload the Run history to refresh the ListBox
+ LoadRunHistory();
+ }
+ }
+ }
+
+ private async void MenuFlyoutItem_Click(object sender, RoutedEventArgs e)
+ {
+ await Run(true);
+ }
+
+ private async void MenuFlyoutItem_Click_1(object sender, RoutedEventArgs e)
+ {
+ await Run();
+ }
+
+ private async void MenuFlyoutItem_Click_2(object sender, RoutedEventArgs e)
+ {
+ await Run(false, true);
+ }
+
+ private async void MenuFlyoutItem_Click_3(object sender, RoutedEventArgs e)
+ {
+ await Run(true, true);
+ }
+
+ private HashSet PressedKeys = [];
+
+ private void CloseRunBox()
+ {
+ // Find the window with the title "Run"
+ IntPtr hWnd = Win32Helper.FindWindow(null, "Run");
+ //IntPtr hWndtaskmgr2 = Win32Helper.FindWindow("#32770", "Create new task");
+
+ if (hWnd != IntPtr.Zero)
+ {
+ // Send WM_CLOSE to close the window
+ bool sent = Win32Helper.PostMessage(hWnd, Win32Helper.WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
+
+ if (sent)
+ {
+ try
+ {
+ (App.MainWindow as MainWindow)?.BringToFront();
+ App.MainWindow.Title ??= "Rebound Run";
+ return;
+ }
+ catch
+ {
+ try
+ {
+ this.Close();
+ App.MainWindow?.Close();
+ }
+ catch
+ {
+
+ }
+ App.MainWindow = new MainWindow();
+ App.MainWindow.Show();
+ App.MainWindow.Activate();
+ (App.MainWindow as MainWindow).BringToFront();
+ return;
+ }
+ }
+ }
+ /*if (hWndtaskmgr2 != IntPtr.Zero)
+ {
+ try
+ {
+ // Send WM_CLOSE to close the window
+ bool sent = Win32Helper.PostMessage(hWndtaskmgr2, Win32Helper.WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
+
+ if (sent)
+ {
+ try
+ {
+ (App.MainWindow as MainWindow).BringToFront();
+ App.MainWindow.Title = "Rebound Run - Create new task (Task Manager)";
+ await Task.Delay(250);
+ App.MainWindow.Move((int)(25 * Scale()), (int)(25 * Scale()));
+ return;
+ }
+ catch
+ {
+ try
+ {
+ this.Close();
+ App.MainWindow.Close();
+ }
+ catch
+ {
+
+ }
+ App.MainWindow = new MainWindow();
+ App.MainWindow.Show();
+ App.MainWindow.Activate();
+ (App.MainWindow as MainWindow).BringToFront();
+ App.MainWindow.Title = "Rebound Run - Create new task (Task Manager)";
+ await Task.Delay(250);
+ App.MainWindow.Move((int)(25 * Scale()), (int)(25 * Scale()));
+ return;
+ }
+ }
+ }
+ catch
+ {
+
+ }
+ }*/
+ }
+
+ private async void RunBox_KeyUp(object sender, KeyRoutedEventArgs e)
+ {
+ if (e.Key == VirtualKey.Escape &&
+ !PressedKeys.Contains(VirtualKey.Control) &&
+ !PressedKeys.Contains(VirtualKey.Menu) &&
+ !PressedKeys.Contains(VirtualKey.Shift))
+ {
+ Close();
+ return;
+ }
+ else if (e.Key == VirtualKey.Enter &&
+ PressedKeys.Contains(VirtualKey.Control) &&
+ PressedKeys.Contains(VirtualKey.Menu) &&
+ PressedKeys.Contains(VirtualKey.Shift))
+ {
+ await Run(true, true);
+ return;
+ }
+ else if (e.Key == VirtualKey.Enter &&
+ PressedKeys.Contains(VirtualKey.Control) &&
+ !PressedKeys.Contains(VirtualKey.Menu) &&
+ PressedKeys.Contains(VirtualKey.Shift))
+ {
+ await Run(false, true);
+ return;
+ }
+ else if (e.Key == VirtualKey.Enter &&
+ !PressedKeys.Contains(VirtualKey.Control) &&
+ PressedKeys.Contains(VirtualKey.Menu) &&
+ !PressedKeys.Contains(VirtualKey.Shift))
+ {
+ await Run(true, false);
+ return;
+ }
+ else if (e.Key == VirtualKey.Enter &&
+ !PressedKeys.Contains(VirtualKey.Control) &&
+ !PressedKeys.Contains(VirtualKey.Menu) &&
+ !PressedKeys.Contains(VirtualKey.Shift))
+ {
+ await Run();
+ return;
+ }
+
+ PressedKeys.Remove(e.Key);
+
+ CheckRunBoxText();
+ }
+
+ public void CheckRunBoxText()
+ {
+ if (!string.IsNullOrWhiteSpace(RunBox.Text))
+ {
+ RunButton.IsEnabled = true;
+ VisualStateManager.GoToState(RunButton, "Normal", true);
+ return;
+ }
+ RunButton.IsEnabled = false;
+ VisualStateManager.GoToState(RunButton, "Disabled", true);
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private async void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ // Create a file picker
+ var openPicker = new FileOpenPicker();
+
+ // See the sample code below for how to make the window accessible from the App class.
+ var window = this;
+
+ // Retrieve the window handle (HWND) of the current WinUI 3 window.
+ var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
+
+ // Initialize the file picker with the window handle (HWND).
+ WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd);
+
+ // Set options for your file picker
+ openPicker.ViewMode = PickerViewMode.Thumbnail;
+ openPicker.SuggestedStartLocation = PickerLocationId.Desktop;
+ openPicker.CommitButtonText = "Select file to run";
+ openPicker.FileTypeFilter.Add(".exe");
+ openPicker.FileTypeFilter.Add(".pif");
+ openPicker.FileTypeFilter.Add(".com");
+ openPicker.FileTypeFilter.Add(".bat");
+ openPicker.FileTypeFilter.Add(".cmd");
+ openPicker.FileTypeFilter.Add("*");
+
+ // Open the picker for the user to pick a file
+ var file = await openPicker.PickSingleFileAsync();
+ if (file != null)
+ {
+ RunBox.Text = file.Path;
+ }
+ else
+ {
+
+ }
+
+ }
+
+ private void RunBox_KeyDown(object sender, KeyRoutedEventArgs e)
+ {
+ PressedKeys.Add(e.Key);
+
+ CheckRunBoxText();
+ }
+
+ private async void WindowEx_Activated(object sender, WindowActivatedEventArgs args)
+ {
+ CheckForRunBox();
+ await Task.Delay(5);
+
+ if (GroupPolicyHelper.IsGroupPolicyEnabled(GroupPolicyHelper.EXPLORER_GROUP_POLICY_PATH, "NoRun", 1) == true)
+ {
+ this.Close();
+ }
+ }
+
+ public void CheckForRunBox()
+ {
+ IntPtr hWnd = Win32Helper.FindWindow(null, "Run");
+ IntPtr taskManagerHandle = Win32Helper.FindWindow(null, "Task Manager");
+ IntPtr hWndtaskmgr = Win32Helper.FindWindowEx(taskManagerHandle, IntPtr.Zero, null, "Create new task");
+ if (hWnd == IntPtr.Zero)
+ {
+ App.AllowClosingRunBox = true;
+ CloseRunBoxMethod();
+ return;
+ }
+ if (hWndtaskmgr == IntPtr.Zero)
+ {
+ App.AllowClosingRunBox = true;
+ CloseRunBoxMethod();
+ return;
+ }
+ App.AllowClosingRunBox = false;
+ CloseRunBoxMethod();
+ return;
+ }
+
+ private void RunBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ CheckRunBoxText();
+ }
+
+ private void RunBox_LostFocus(object sender, RoutedEventArgs e)
+ {
+ CheckRunBoxText();
+ }
+ }
+}
diff --git a/Run/Package.appxmanifest b/Run/Package.appxmanifest
new file mode 100644
index 0000000..459479d
--- /dev/null
+++ b/Run/Package.appxmanifest
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ Rebound.Run
+ Lenovo
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Run/Properties/launchSettings.json b/Run/Properties/launchSettings.json
new file mode 100644
index 0000000..e7f4555
--- /dev/null
+++ b/Run/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "Rebound.Run (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "Rebound.Run (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Run/Rebound.Run.csproj b/Run/Rebound.Run.csproj
new file mode 100644
index 0000000..acc8ba4
--- /dev/null
+++ b/Run/Rebound.Run.csproj
@@ -0,0 +1,82 @@
+
+
+ WinExe
+ net8.0-windows10.0.22621.0
+ 10.0.17763.0
+ 10.0.22621.35-preview
+ Rebound.Run
+ app.manifest
+ x86;x64;ARM64
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ win-$(Platform).pubxml
+ true
+ true
+ Assets\RunBox.ico
+ True
+ True
+ BB9378CD33C20B752F2F114DDFD686121E263536
+ SHA256
+ False
+ False
+ True
+ Never
+ C:\Users\Lenovo\Desktop\RunPackage
+ 0
+
+
+
+
+
+
+
+
+
+
+ tlbimp
+ 0
+ 1
+ f935dc20-1cf0-11d0-adb9-00c04fd58a0b
+ 0
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/Run/app.manifest b/Run/app.manifest
new file mode 100644
index 0000000..700fb54
--- /dev/null
+++ b/Run/app.manifest
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
\ No newline at end of file
diff --git a/SysInfo/App.xaml b/SysInfo/App.xaml
new file mode 100644
index 0000000..1493b99
--- /dev/null
+++ b/SysInfo/App.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/App.xaml.cs b/SysInfo/App.xaml.cs
new file mode 100644
index 0000000..385b8cf
--- /dev/null
+++ b/SysInfo/App.xaml.cs
@@ -0,0 +1,49 @@
+using WinUIEx;
+using MicaSystemBackdrop = WinUIEx.MicaSystemBackdrop;
+
+namespace Rebound.SysInfo;
+
+public partial class App : Application
+{
+ public IThemeService ThemeService { get; set; }
+ public IJsonNavigationViewService JsonNavigationViewService { get; set; }
+ public new static App Current => (App)Application.Current;
+ public string AppVersion { get; set; } = AssemblyInfoHelper.GetAssemblyVersion();
+ public string AppName { get; set; } = "Rebound.SysInfo";
+ public App()
+ {
+ this.InitializeComponent();
+ JsonNavigationViewService = new JsonNavigationViewService();
+ JsonNavigationViewService.ConfigDefaultPage(typeof(HomeLandingPage));
+ JsonNavigationViewService.ConfigSettingsPage(typeof(SettingsPage));
+ }
+
+ public static WindowEx m_window;
+
+ protected override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ m_window = new WindowEx();
+
+ m_window.SystemBackdrop = new Microsoft.UI.Xaml.Media.MicaBackdrop();
+ m_window.AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+
+ //CurrentWindow.AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;
+ //CurrentWindow.AppWindow.TitleBar.ButtonBackgroundColor = Colors.Transparent;
+
+ if (m_window.Content is not Frame rootFrame)
+ {
+ m_window.Content = rootFrame = new Frame();
+ }
+
+ rootFrame.Navigate(typeof(MainPage));
+
+ m_window.Title = $"{AppName} v{AppVersion}";
+ m_window.SetIcon("Assets/icon.ico");
+
+ m_window.Activate();
+ //await DynamicLocalizerHelper.InitializeLocalizer("en-US");
+
+ //UnhandledException += (s, e) => Logger?.Error(e.Exception, "UnhandledException");
+ }
+}
+
diff --git a/SysInfo/Assets/Cover/CoverDark.png b/SysInfo/Assets/Cover/CoverDark.png
new file mode 100644
index 0000000..8928371
Binary files /dev/null and b/SysInfo/Assets/Cover/CoverDark.png differ
diff --git a/SysInfo/Assets/Cover/CoverLight.png b/SysInfo/Assets/Cover/CoverLight.png
new file mode 100644
index 0000000..222e0e4
Binary files /dev/null and b/SysInfo/Assets/Cover/CoverLight.png differ
diff --git a/SysInfo/Assets/Fluent/backdrop.png b/SysInfo/Assets/Fluent/backdrop.png
new file mode 100644
index 0000000..73c1328
Binary files /dev/null and b/SysInfo/Assets/Fluent/backdrop.png differ
diff --git a/SysInfo/Assets/Fluent/color.png b/SysInfo/Assets/Fluent/color.png
new file mode 100644
index 0000000..8fedfe3
Binary files /dev/null and b/SysInfo/Assets/Fluent/color.png differ
diff --git a/SysInfo/Assets/Fluent/devMode.png b/SysInfo/Assets/Fluent/devMode.png
new file mode 100644
index 0000000..d567dc0
Binary files /dev/null and b/SysInfo/Assets/Fluent/devMode.png differ
diff --git a/SysInfo/Assets/Fluent/external.png b/SysInfo/Assets/Fluent/external.png
new file mode 100644
index 0000000..4345ec0
Binary files /dev/null and b/SysInfo/Assets/Fluent/external.png differ
diff --git a/SysInfo/Assets/Fluent/info.png b/SysInfo/Assets/Fluent/info.png
new file mode 100644
index 0000000..88d7cc5
Binary files /dev/null and b/SysInfo/Assets/Fluent/info.png differ
diff --git a/SysInfo/Assets/Fluent/settings.png b/SysInfo/Assets/Fluent/settings.png
new file mode 100644
index 0000000..555008f
Binary files /dev/null and b/SysInfo/Assets/Fluent/settings.png differ
diff --git a/SysInfo/Assets/Fluent/theme.png b/SysInfo/Assets/Fluent/theme.png
new file mode 100644
index 0000000..e01c530
Binary files /dev/null and b/SysInfo/Assets/Fluent/theme.png differ
diff --git a/SysInfo/Assets/Fluent/update.png b/SysInfo/Assets/Fluent/update.png
new file mode 100644
index 0000000..314cbdd
Binary files /dev/null and b/SysInfo/Assets/Fluent/update.png differ
diff --git a/SysInfo/Assets/NavViewMenu/AppData.json b/SysInfo/Assets/NavViewMenu/AppData.json
new file mode 100644
index 0000000..01f7e11
--- /dev/null
+++ b/SysInfo/Assets/NavViewMenu/AppData.json
@@ -0,0 +1,31 @@
+{
+ "Groups": [
+ {
+ "UniqueId": "Rebound.SysInfo",
+ "Title": "Rebound.SysInfo",
+ "ImagePath": "ms-appx:///Assets/icon.png",
+ "ImageIconPath": "ms-appx:///Assets/icon.png",
+ "IsSpecialSection": false,
+ "ShowItemsWithoutGroup": true,
+ "IsExpanded": false,
+ "Items": [
+ {
+ "UniqueId": "Rebound.SysInfo.Views.HomeLandingPage",
+ "Title": "Rebound.SysInfo",
+ "Subtitle": "Rebound.SysInfo",
+ "ImagePath": "ms-appx:///Assets/icon.png",
+ "ImageIconPath": "ms-appx:///Assets/icon.png",
+ "HideItem": false
+ },
+ {
+ "UniqueId": "Rebound.SysInfo.Views.SystemInformationPage",
+ "Title": "System information",
+ "Subtitle": "System information",
+ "ImagePath": "ms-appx:///Assets/icon.png",
+ "ImageIconPath": "ms-appx:///Assets/icon.png",
+ "HideItem": false
+ }
+ ]
+ }
+ ]
+}
diff --git a/SysInfo/Assets/Store/LockScreenLogo.scale-200.png b/SysInfo/Assets/Store/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/SysInfo/Assets/Store/LockScreenLogo.scale-200.png differ
diff --git a/SysInfo/Assets/Store/SplashScreen.scale-200.png b/SysInfo/Assets/Store/SplashScreen.scale-200.png
new file mode 100644
index 0000000..32f486a
Binary files /dev/null and b/SysInfo/Assets/Store/SplashScreen.scale-200.png differ
diff --git a/SysInfo/Assets/Store/Square150x150Logo.scale-200.png b/SysInfo/Assets/Store/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..53ee377
Binary files /dev/null and b/SysInfo/Assets/Store/Square150x150Logo.scale-200.png differ
diff --git a/SysInfo/Assets/Store/Square44x44Logo.scale-200.png b/SysInfo/Assets/Store/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..f713bba
Binary files /dev/null and b/SysInfo/Assets/Store/Square44x44Logo.scale-200.png differ
diff --git a/SysInfo/Assets/Store/Square44x44Logo.targetsize-24_altform-unplated.png b/SysInfo/Assets/Store/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..dc9f5be
Binary files /dev/null and b/SysInfo/Assets/Store/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/SysInfo/Assets/Store/StoreLogo.png b/SysInfo/Assets/Store/StoreLogo.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/SysInfo/Assets/Store/StoreLogo.png differ
diff --git a/SysInfo/Assets/Store/Wide310x150Logo.scale-200.png b/SysInfo/Assets/Store/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..8b4a5d0
Binary files /dev/null and b/SysInfo/Assets/Store/Wide310x150Logo.scale-200.png differ
diff --git a/SysInfo/Assets/icon.ico b/SysInfo/Assets/icon.ico
new file mode 100644
index 0000000..100012e
Binary files /dev/null and b/SysInfo/Assets/icon.ico differ
diff --git a/SysInfo/Assets/icon.png b/SysInfo/Assets/icon.png
new file mode 100644
index 0000000..fdb835c
Binary files /dev/null and b/SysInfo/Assets/icon.png differ
diff --git a/SysInfo/Common/AppConfig.cs b/SysInfo/Common/AppConfig.cs
new file mode 100644
index 0000000..9b089e2
--- /dev/null
+++ b/SysInfo/Common/AppConfig.cs
@@ -0,0 +1,16 @@
+using Nucs.JsonSettings;
+using Nucs.JsonSettings.Modulation;
+
+namespace Rebound.SysInfo.Common;
+public class AppConfig : JsonSettings, IVersionable
+{
+ [EnforcedVersion("1.1.0.0")]
+ public virtual Version Version { get; set; } = new Version(1, 1, 0, 0);
+
+ public override string FileName { get; set; } = Constants.AppConfigPath;
+
+ public virtual bool UseDeveloperMode { get; set; }
+ public virtual string LastUpdateCheck { get; set; }
+
+ // Docs: https://github.com/Nucs/JsonSettings
+}
diff --git a/SysInfo/Common/AppHelper.cs b/SysInfo/Common/AppHelper.cs
new file mode 100644
index 0000000..f2a9e61
--- /dev/null
+++ b/SysInfo/Common/AppHelper.cs
@@ -0,0 +1,16 @@
+using Nucs.JsonSettings;
+using Nucs.JsonSettings.Autosave;
+using Nucs.JsonSettings.Fluent;
+using Nucs.JsonSettings.Modulation;
+using Nucs.JsonSettings.Modulation.Recovery;
+
+namespace Rebound.SysInfo.Common;
+public static partial class AppHelper
+{
+ public static AppConfig Settings = JsonSettings.Configure()
+ .WithRecovery(RecoveryAction.RenameAndLoadDefault)
+ .WithVersioning(VersioningResultAction.RenameAndLoadDefault)
+ .LoadNow()
+ .EnableAutosave();
+}
+
diff --git a/SysInfo/Common/Constants.cs b/SysInfo/Common/Constants.cs
new file mode 100644
index 0000000..7f03902
--- /dev/null
+++ b/SysInfo/Common/Constants.cs
@@ -0,0 +1,10 @@
+namespace Rebound.SysInfo.Common;
+
+public static class Constants
+{
+ public static readonly string AppName = AssemblyInfoHelper.GetAppInfo().NameAndVersion;
+ public static readonly string RootDirectoryPath = Path.Combine(PathHelper.GetLocalFolderPath(), AppName);
+ public static readonly string LogDirectoryPath = Path.Combine(RootDirectoryPath, "Log");
+ public static readonly string LogFilePath = Path.Combine(LogDirectoryPath, "Log.txt");
+ public static readonly string AppConfigPath = Path.Combine(RootDirectoryPath, "AppConfig.json");
+}
diff --git a/SysInfo/Common/DynamicLocalizerHelper.cs b/SysInfo/Common/DynamicLocalizerHelper.cs
new file mode 100644
index 0000000..0e5b7b4
--- /dev/null
+++ b/SysInfo/Common/DynamicLocalizerHelper.cs
@@ -0,0 +1,41 @@
+using Windows.Storage;
+
+namespace Rebound.SysInfo.Common;
+public static class DynamicLocalizerHelper
+{
+ private static string StringsFolderPath { get; set; } = string.Empty;
+
+ public static async Task InitializeLocalizer(params string[] languages)
+ {
+ // Initialize a "Strings" folder in the "LocalFolder" for the packaged app.
+ if (PackageHelper.IsPackaged)
+ {
+ // Create string resources file from app resources if doesn't exists.
+ StorageFolder localFolder = ApplicationData.Current.LocalFolder;
+ StorageFolder stringsFolder = await localFolder.CreateFolderAsync(
+ "Strings",
+ CreationCollisionOption.OpenIfExists);
+ string resourceFileName = "Resources.resw";
+ foreach (var item in languages)
+ {
+ await LocalizerBuilder.CreateStringResourceFileIfNotExists(stringsFolder, item, resourceFileName);
+ }
+
+ StringsFolderPath = stringsFolder.Path;
+ }
+ else
+ {
+ // Initialize a "Strings" folder in the executables folder.
+ StringsFolderPath = Path.Combine(AppContext.BaseDirectory, "Strings");
+ var stringsFolder = await StorageFolder.GetFolderFromPathAsync(StringsFolderPath);
+ }
+
+ ILocalizer localizer = await new LocalizerBuilder()
+ .AddStringResourcesFolderForLanguageDictionaries(StringsFolderPath)
+ .SetOptions(options =>
+ {
+ options.DefaultLanguage = "en-US";
+ })
+ .Build();
+ }
+}
diff --git a/SysInfo/Common/LoggerSetup.cs b/SysInfo/Common/LoggerSetup.cs
new file mode 100644
index 0000000..8b85c89
--- /dev/null
+++ b/SysInfo/Common/LoggerSetup.cs
@@ -0,0 +1,22 @@
+using Serilog;
+
+namespace Rebound.SysInfo.Common;
+public static class LoggerSetup
+{
+ public static ILogger Logger { get; private set; }
+
+ public static void ConfigureLogger()
+ {
+ if (!Directory.Exists(Constants.LogDirectoryPath))
+ {
+ Directory.CreateDirectory(Constants.LogDirectoryPath);
+ }
+
+ Logger = new LoggerConfiguration()
+ .Enrich.WithProperty("Version", App.Current.AppVersion)
+ .WriteTo.File(Constants.LogFilePath, rollingInterval: RollingInterval.Day)
+ .WriteTo.Debug()
+ .CreateLogger();
+ }
+}
+
diff --git a/SysInfo/GlobalUsings.cs b/SysInfo/GlobalUsings.cs
new file mode 100644
index 0000000..71d99f4
--- /dev/null
+++ b/SysInfo/GlobalUsings.cs
@@ -0,0 +1,9 @@
+global using Microsoft.UI;
+global using Microsoft.UI.Xaml;
+global using Microsoft.UI.Xaml.Controls;
+global using Microsoft.UI.Xaml.Navigation;
+global using Rebound.SysInfo.Common;
+global using Rebound.SysInfo.Views;
+global using WinUICommunity;
+global using static Rebound.SysInfo.Common.AppHelper;
+global using static Rebound.SysInfo.Common.LoggerSetup;
diff --git a/SysInfo/Package.appxmanifest b/SysInfo/Package.appxmanifest
new file mode 100644
index 0000000..193eeaf
--- /dev/null
+++ b/SysInfo/Package.appxmanifest
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+ Rebound.SysInfo
+ jpb
+ Assets\Store\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Properties/launchSettings.json b/SysInfo/Properties/launchSettings.json
new file mode 100644
index 0000000..0b30b12
--- /dev/null
+++ b/SysInfo/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "Rebound.SysInfo (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "Rebound.SysInfo (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/SysInfo/Rebound.SysInfo.csproj b/SysInfo/Rebound.SysInfo.csproj
new file mode 100644
index 0000000..e873464
--- /dev/null
+++ b/SysInfo/Rebound.SysInfo.csproj
@@ -0,0 +1,78 @@
+
+
+
+ WinExe
+ net8.0-windows10.0.22621.0
+ 10.0.17763.0
+ Rebound.SysInfo
+ app.manifest
+ x86;x64;ARM64
+ win-x86;win-x64;win-arm64
+ win10-x86;win10-x64;win10-arm64
+ win-$(Platform).pubxml
+ true
+ true
+ 1.1.0
+ true
+ Latest
+ Assets\icon.ico
+ false
+ true
+ 10.0.22621.35-preview
+
+
+
+ Always
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+ true
+
+
\ No newline at end of file
diff --git a/SysInfo/Strings/en-US/Resources.resw b/SysInfo/Strings/en-US/Resources.resw
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/SysInfo/Strings/en-US/Resources.resw
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/SysInfo/Themes/Styles.xaml b/SysInfo/Themes/Styles.xaml
new file mode 100644
index 0000000..511dbfd
--- /dev/null
+++ b/SysInfo/Themes/Styles.xaml
@@ -0,0 +1,9 @@
+
+
+
+ 48
+
+ 40,48,40,0
+
+
\ No newline at end of file
diff --git a/SysInfo/Themes/ThemeResources.xaml b/SysInfo/Themes/ThemeResources.xaml
new file mode 100644
index 0000000..261ecc9
--- /dev/null
+++ b/SysInfo/Themes/ThemeResources.xaml
@@ -0,0 +1,16 @@
+
+
+
+ /Assets/Cover/CoverLight.png
+
+
+
+ /Assets/Cover/CoverDark.png
+
+
+
+ /Assets/Cover/CoverDark.png
+
+
+
diff --git a/SysInfo/Views/HomeLandingPage.xaml b/SysInfo/Views/HomeLandingPage.xaml
new file mode 100644
index 0000000..6a6aca2
--- /dev/null
+++ b/SysInfo/Views/HomeLandingPage.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/SysInfo/Views/HomeLandingPage.xaml.cs b/SysInfo/Views/HomeLandingPage.xaml.cs
new file mode 100644
index 0000000..461ddee
--- /dev/null
+++ b/SysInfo/Views/HomeLandingPage.xaml.cs
@@ -0,0 +1,27 @@
+namespace Rebound.SysInfo.Views;
+
+public sealed partial class HomeLandingPage : Page
+{
+ public string AppInfo { get; set; }
+ public HomeLandingPage()
+ {
+ this.InitializeComponent();
+ AppInfo = $"{App.Current.AppName} v{App.Current.AppVersion}";
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+ allLandingPage.GetData(App.Current.JsonNavigationViewService.DataSource);
+ allLandingPage.OrderBy(i => i.Title);
+ }
+
+ private void allLandingPage_OnItemClick(object sender, RoutedEventArgs e)
+ {
+ var args = (ItemClickEventArgs)e;
+ var item = (DataItem)args.ClickedItem;
+
+ App.Current.JsonNavigationViewService.NavigateTo(item.UniqueId + item.Parameter?.ToString(), item);
+ }
+}
+
diff --git a/SysInfo/Views/MainPage.xaml b/SysInfo/Views/MainPage.xaml
new file mode 100644
index 0000000..1e1f729
--- /dev/null
+++ b/SysInfo/Views/MainPage.xaml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/MainPage.xaml.cs b/SysInfo/Views/MainPage.xaml.cs
new file mode 100644
index 0000000..bd74eb6
--- /dev/null
+++ b/SysInfo/Views/MainPage.xaml.cs
@@ -0,0 +1,45 @@
+namespace Rebound.SysInfo.Views;
+
+public sealed partial class MainPage : Page
+{
+ public MainPage()
+ {
+ this.InitializeComponent();
+ //appTitleBar.Window = App.CurrentWindow;
+ //App.Current.JsonNavigationViewService.Initialize(NavView, NavFrame);
+ //App.Current.JsonNavigationViewService.ConfigJson("Assets/NavViewMenu/AppData.json");
+ }
+
+ private void appTitleBar_BackButtonClick(object sender, RoutedEventArgs e)
+ {
+ if (NavFrame.CanGoBack)
+ {
+ NavFrame.GoBack();
+ }
+ }
+
+ private void appTitleBar_PaneButtonClick(object sender, RoutedEventArgs e)
+ {
+ NavView.IsPaneOpen = !NavView.IsPaneOpen;
+ }
+
+ private void NavFrame_Navigated(object sender, NavigationEventArgs e)
+ {
+ //appTitleBar.IsBackButtonVisible = NavFrame.CanGoBack;
+ }
+
+ private void ThemeButton_Click(object sender, RoutedEventArgs e)
+ {
+ var element = App.m_window.Content as FrameworkElement;
+
+ if (element.ActualTheme == ElementTheme.Light)
+ {
+ element.RequestedTheme = ElementTheme.Dark;
+ }
+ else if (element.ActualTheme == ElementTheme.Dark)
+ {
+ element.RequestedTheme = ElementTheme.Light;
+ }
+ }
+}
+
diff --git a/SysInfo/Views/Settings/AboutUsSettingPage.xaml b/SysInfo/Views/Settings/AboutUsSettingPage.xaml
new file mode 100644
index 0000000..d79392d
--- /dev/null
+++ b/SysInfo/Views/Settings/AboutUsSettingPage.xaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/Settings/AboutUsSettingPage.xaml.cs b/SysInfo/Views/Settings/AboutUsSettingPage.xaml.cs
new file mode 100644
index 0000000..96a341e
--- /dev/null
+++ b/SysInfo/Views/Settings/AboutUsSettingPage.xaml.cs
@@ -0,0 +1,19 @@
+namespace Rebound.SysInfo.Views;
+
+public sealed partial class AboutUsSettingPage : Page
+{
+ public string AppInfo = $"{App.Current.AppName} v{App.Current.AppVersion}";
+ public string BreadCrumbBarItemText { get; set; }
+ public AboutUsSettingPage()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+ BreadCrumbBarItemText = e.Parameter as string;
+ }
+}
+
+
diff --git a/SysInfo/Views/Settings/AppUpdateSettingPage.xaml b/SysInfo/Views/Settings/AppUpdateSettingPage.xaml
new file mode 100644
index 0000000..a096dcc
--- /dev/null
+++ b/SysInfo/Views/Settings/AppUpdateSettingPage.xaml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/Settings/AppUpdateSettingPage.xaml.cs b/SysInfo/Views/Settings/AppUpdateSettingPage.xaml.cs
new file mode 100644
index 0000000..787717b
--- /dev/null
+++ b/SysInfo/Views/Settings/AppUpdateSettingPage.xaml.cs
@@ -0,0 +1,100 @@
+using Windows.System;
+
+namespace Rebound.SysInfo.Views;
+public sealed partial class AppUpdateSettingPage : Page
+{
+ public string CurrentVersion { get; set; }
+ public string ChangeLog { get; set; }
+ public string BreadCrumbBarItemText { get; set; }
+
+ public AppUpdateSettingPage()
+ {
+ this.InitializeComponent();
+ CurrentVersion = $"Current version: v{App.Current.AppVersion}";
+
+ TxtLastUpdateCheck.Text = Settings.LastUpdateCheck;
+
+ BtnReleaseNote.Visibility = Visibility.Collapsed;
+ BtnDownloadUpdate.Visibility = Visibility.Collapsed;
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+ BreadCrumbBarItemText = e.Parameter as string;
+ }
+
+ private async void CheckForUpdateAsync()
+ {
+ PrgLoading.IsActive = true;
+ BtnCheckUpdate.IsEnabled = false;
+ BtnReleaseNote.Visibility = Visibility.Collapsed;
+ BtnDownloadUpdate.Visibility = Visibility.Collapsed;
+ StatusCard.Header = "Checking for updates";
+ if (NetworkHelper.IsNetworkAvailable())
+ {
+ try
+ {
+ string username = "Ivirius-Main";
+ string repo = "Rebound.SysInfo";
+ TxtLastUpdateCheck.Text = DateTime.Now.ToShortDateString();
+ Settings.LastUpdateCheck = DateTime.Now.ToShortDateString();
+ var update = await UpdateHelper.CheckUpdateAsync(username, repo, new Version(App.Current.AppVersion));
+ if (update.IsExistNewVersion)
+ {
+ BtnReleaseNote.Visibility = Visibility.Visible;
+ BtnDownloadUpdate.Visibility = Visibility.Visible;
+ ChangeLog = update.Changelog;
+ StatusCard.Header = $"We found a new version {update.TagName}, created at {update.CreatedAt} and published at {update.PublishedAt}";
+ }
+ else
+ {
+ StatusCard.Header = "You are using the latest version";
+ }
+ }
+ catch (Exception ex)
+ {
+ StatusCard.Header = ex.Message;
+ PrgLoading.IsActive = false;
+ BtnCheckUpdate.IsEnabled = true;
+ }
+ }
+ else
+ {
+ StatusCard.Header = "Connection error";
+ }
+ PrgLoading.IsActive = false;
+ BtnCheckUpdate.IsEnabled = true;
+ }
+
+ private async void GoToUpdateAsync()
+ {
+ //Todo: Change Uri
+ await Launcher.LaunchUriAsync(new Uri("https://github.com/WinUICommunity/WinUICommunity/releases"));
+ }
+
+ private async void GetReleaseNotesAsync()
+ {
+ ContentDialog dialog = new ContentDialog()
+ {
+ Title = "Release notes",
+ CloseButtonText = "Close",
+ Content = new ScrollViewer
+ {
+ Content = new TextBlock
+ {
+ Text = ChangeLog,
+ Margin = new Thickness(10)
+ },
+ Margin = new Thickness(10)
+ },
+ Margin = new Thickness(10),
+ DefaultButton = ContentDialogButton.Close,
+ XamlRoot = App.m_window.Content.XamlRoot
+ };
+
+ await dialog.ShowAsyncQueue();
+ }
+}
+
+
diff --git a/SysInfo/Views/Settings/GeneralSettingPage.xaml b/SysInfo/Views/Settings/GeneralSettingPage.xaml
new file mode 100644
index 0000000..0eaf991
--- /dev/null
+++ b/SysInfo/Views/Settings/GeneralSettingPage.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/Settings/GeneralSettingPage.xaml.cs b/SysInfo/Views/Settings/GeneralSettingPage.xaml.cs
new file mode 100644
index 0000000..0c0fa56
--- /dev/null
+++ b/SysInfo/Views/Settings/GeneralSettingPage.xaml.cs
@@ -0,0 +1,28 @@
+namespace Rebound.SysInfo.Views;
+
+public sealed partial class GeneralSettingPage : Page
+{
+ public string BreadCrumbBarItemText { get; set; }
+ public GeneralSettingPage()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+ BreadCrumbBarItemText = e.Parameter as string;
+ }
+
+ private async void NavigateToLogPath_Click(object sender, RoutedEventArgs e)
+ {
+ string folderPath = (sender as HyperlinkButton).Content.ToString();
+ if (Directory.Exists(folderPath))
+ {
+ Windows.Storage.StorageFolder folder = await Windows.Storage.StorageFolder.GetFolderFromPathAsync(folderPath);
+ await Windows.System.Launcher.LaunchFolderAsync(folder);
+ }
+ }
+}
+
+
diff --git a/SysInfo/Views/Settings/ThemeSettingPage.xaml b/SysInfo/Views/Settings/ThemeSettingPage.xaml
new file mode 100644
index 0000000..fcd875c
--- /dev/null
+++ b/SysInfo/Views/Settings/ThemeSettingPage.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/Settings/ThemeSettingPage.xaml.cs b/SysInfo/Views/Settings/ThemeSettingPage.xaml.cs
new file mode 100644
index 0000000..96a3a04
--- /dev/null
+++ b/SysInfo/Views/Settings/ThemeSettingPage.xaml.cs
@@ -0,0 +1,42 @@
+using Windows.System;
+
+namespace Rebound.SysInfo.Views;
+public sealed partial class ThemeSettingPage : Page
+{
+ public string BreadCrumbBarItemText { get; set; }
+
+ public ThemeSettingPage()
+ {
+ this.InitializeComponent();
+ Loaded += ThemeSettingPage_Loaded;
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ base.OnNavigatedTo(e);
+ BreadCrumbBarItemText = e.Parameter as string;
+ }
+
+ private void ThemeSettingPage_Loaded(object sender, RoutedEventArgs e)
+ {
+ App.Current.ThemeService.SetThemeComboBoxDefaultItem(CmbTheme);
+ App.Current.ThemeService.SetBackdropComboBoxDefaultItem(CmbBackdrop);
+ }
+
+ private void CmbTheme_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ App.Current.ThemeService.OnThemeComboBoxSelectionChanged(sender);
+ }
+
+ private void CmbBackdrop_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ App.Current.ThemeService.OnBackdropComboBoxSelectionChanged(sender);
+ }
+
+ private async void OpenWindowsColorSettings(object sender, RoutedEventArgs e)
+ {
+ _ = await Launcher.LaunchUriAsync(new Uri("ms-settings:colors"));
+ }
+}
+
+
diff --git a/SysInfo/Views/SettingsPage.xaml b/SysInfo/Views/SettingsPage.xaml
new file mode 100644
index 0000000..1ec9562
--- /dev/null
+++ b/SysInfo/Views/SettingsPage.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/SettingsPage.xaml.cs b/SysInfo/Views/SettingsPage.xaml.cs
new file mode 100644
index 0000000..29e38ad
--- /dev/null
+++ b/SysInfo/Views/SettingsPage.xaml.cs
@@ -0,0 +1,27 @@
+using Microsoft.UI.Xaml.Media.Animation;
+
+namespace Rebound.SysInfo.Views;
+public sealed partial class SettingsPage : Page
+{
+ public SettingsPage()
+ {
+ this.InitializeComponent();
+ }
+
+ private void OnSettingCard_Click(object sender, RoutedEventArgs e)
+ {
+ var item = sender as SettingsCard;
+ if (item.Tag != null)
+ {
+ Type pageType = Application.Current.GetType().Assembly.GetType($"Rebound.SysInfo.Views.{item.Tag}");
+
+ if (pageType != null)
+ {
+ SlideNavigationTransitionInfo entranceNavigation = new SlideNavigationTransitionInfo();
+ entranceNavigation.Effect = SlideNavigationTransitionEffect.FromRight;
+ App.Current.JsonNavigationViewService.NavigateTo(pageType, item.Header, false, entranceNavigation);
+ }
+ }
+ }
+}
+
diff --git a/SysInfo/Views/SystemInformationPage.xaml b/SysInfo/Views/SystemInformationPage.xaml
new file mode 100644
index 0000000..3611089
--- /dev/null
+++ b/SysInfo/Views/SystemInformationPage.xaml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/SystemInformationPage.xaml.cs b/SysInfo/Views/SystemInformationPage.xaml.cs
new file mode 100644
index 0000000..ea328cc
--- /dev/null
+++ b/SysInfo/Views/SystemInformationPage.xaml.cs
@@ -0,0 +1,191 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using Microsoft.Win32;
+using System.Management;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using System.Reflection.Metadata.Ecma335;
+using System.Diagnostics;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Rebound.SysInfo.Views;
+///
+/// An empty page that can be used on its own or navigated to within a Frame.
+///
+public sealed partial class SystemInformationPage : Page
+{
+ public SystemInformationPage()
+ {
+ this.InitializeComponent();
+ var manufacturer = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\BIOS").GetValue("SystemManufacturer");
+ var model = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\BIOS").GetValue("SystemProductName");
+ wallBox.UriSource = new Uri(GetCurrentWallpaper());
+ deviceName.Text = (string)model;
+ manufacturerName.Text = (string)manufacturer;
+ DeviceName.Text = (string)model + $" ({Environment.MachineName})";
+ cpu.Text = GetCPUSpecs("Name");
+ ram.Text = GetRAMAmount();
+ WindowsVersion.Text = Environment.OSVersion.ToString();
+ CPUModel.Text = GetCPUSpecs("Name");
+ CPUCores.Text = GetCPUSpecs("NoCores");
+ CPUUtil.Text = GetCPUSpecs("UtilPercent");
+ RAMAmount.Text = GetRAMAmount();
+ RAMTypeText.Text = RAMType;
+ RAMUtil.Text = GetRAMUtil();
+ }
+
+ public static string GetCPUSpecs(string param) {
+ var cpu =
+ new ManagementObjectSearcher("select * from Win32_Processor")
+ .Get()
+ .Cast()
+ .First();
+ if (param == "Name")
+ {
+ var ProcessorName = (string)cpu["Name"];
+
+ ProcessorName =
+ ProcessorName
+ .Replace("(TM)", "™")
+ .Replace("(tm)", "™")
+ .Replace("(R)", "®")
+ .Replace("(r)", "®")
+ .Replace("(C)", "©")
+ .Replace("(c)", "©")
+ .Replace(" ", " ")
+ .Replace(" ", " ");
+ return ProcessorName;
+ }
+ else if (param == "NoCores")
+ {
+ var ProcessorCores = cpu["NumberOfCores"].ToString();
+ return ProcessorCores;
+ }
+ else if (param == "UtilPercent") {
+ PerformanceCounter cpuCounter;
+ cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
+ var cpu_util = cpuCounter.NextValue() + "%";
+ System.Threading.Thread.Sleep(10);
+ cpu_util = cpuCounter.NextValue() + "%";
+ return cpu_util;
+ }
+ else {
+ return "";
+ }
+ }
+
+ public string GetRAMAmount()
+ {
+
+ ObjectQuery objectQuery = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
+ ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher(objectQuery);
+ ManagementObjectCollection managementObjectCollection = managementObjectSearcher.Get();
+ var amount = "";
+ foreach (ManagementObject managementObject in managementObjectCollection)
+ {
+ var MemorySize = (UInt64)managementObject["TotalVisibleMemorySize"] / 1048576;
+ amount = $"{MemorySize}GB RAM";
+ }
+ return amount;
+ }
+
+ public string GetRAMUtil()
+ {
+ PerformanceCounter ramCounter;
+ ramCounter = new PerformanceCounter("Memory", "% Committed Bytes In Use", null);
+ var ram_util = ramCounter.NextValue() + "%";
+ System.Threading.Thread.Sleep(10);
+ ram_util = ramCounter.NextValue() + "%";
+ return ram_util;
+ }
+
+ public static string RAMType
+ {
+ get
+ {
+ int type = 0;
+
+ ConnectionOptions connection = new ConnectionOptions();
+ connection.Impersonation = ImpersonationLevel.Impersonate;
+ ManagementScope scope = new ManagementScope("\\\\.\\root\\CIMV2", connection);
+ scope.Connect();
+ ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_PhysicalMemory");
+ ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
+ foreach (ManagementObject queryObj in searcher.Get())
+ {
+ type = Convert.ToInt32(queryObj["MemoryType"]);
+ }
+
+ return TypeString(type);
+ }
+ }
+
+ private static string TypeString(int type)
+ {
+ string outValue = string.Empty;
+
+ switch (type)
+ {
+ case 0x0: outValue = "Unknown"; break;
+ case 0x1: outValue = "Other"; break;
+ case 0x2: outValue = "DRAM"; break;
+ case 0x3: outValue = "Synchronous DRAM"; break;
+ case 0x4: outValue = "Cache DRAM"; break;
+ case 0x5: outValue = "EDO"; break;
+ case 0x6: outValue = "EDRAM"; break;
+ case 0x7: outValue = "VRAM"; break;
+ case 0x8: outValue = "SRAM"; break;
+ case 0x9: outValue = "RAM"; break;
+ case 0xa: outValue = "ROM"; break;
+ case 0xb: outValue = "Flash"; break;
+ case 0xc: outValue = "EEPROM"; break;
+ case 0xd: outValue = "FEPROM"; break;
+ case 0xe: outValue = "EPROM"; break;
+ case 0xf: outValue = "CDRAM"; break;
+ case 0x10: outValue = "3DRAM"; break;
+ case 0x11: outValue = "SDRAM"; break;
+ case 0x12: outValue = "SGRAM"; break;
+ case 0x13: outValue = "RDRAM"; break;
+ case 0x14: outValue = "DDR"; break;
+ case 0x15: outValue = "DDR2"; break;
+ case 0x16: outValue = "DDR2 FB-DIMM"; break;
+ case 0x17: outValue = "Undefined 23"; break;
+ case 0x18: outValue = "DDR3"; break;
+ case 0x19: outValue = "FBD2"; break;
+ case 0x1a: outValue = "DDR4"; break;
+ default: outValue = "Undefined"; break;
+ }
+
+ return outValue;
+ }
+
+ private string GetCurrentWallpaper()
+
+ {
+
+ // The current wallpaper path is stored in the registry at HKEY_CURRENT_USER\\Control Panel\\Desktop\\WallPaper
+
+ RegistryKey rkWallPaper = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", false);
+
+ string WallpaperPath = rkWallPaper.GetValue("WallPaper").ToString();
+
+ rkWallPaper.Close();
+
+ // Return the current wallpaper path
+
+ return WallpaperPath;
+
+ }
+}
diff --git a/SysInfo/Views/UserControls/BreadcrumbBarUserControl.xaml b/SysInfo/Views/UserControls/BreadcrumbBarUserControl.xaml
new file mode 100644
index 0000000..3a42441
--- /dev/null
+++ b/SysInfo/Views/UserControls/BreadcrumbBarUserControl.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SysInfo/Views/UserControls/BreadcrumbBarUserControl.xaml.cs b/SysInfo/Views/UserControls/BreadcrumbBarUserControl.xaml.cs
new file mode 100644
index 0000000..4b39085
--- /dev/null
+++ b/SysInfo/Views/UserControls/BreadcrumbBarUserControl.xaml.cs
@@ -0,0 +1,57 @@
+using System.Collections.ObjectModel;
+
+namespace Rebound.SysInfo.Views;
+public sealed partial class BreadcrumbBarUserControl : UserControl
+{
+ public ObservableCollection BreadcrumbBarCollection;
+ public List Items
+ {
+ get => (List)GetValue(ItemsProperty);
+ set => SetValue(ItemsProperty, value);
+ }
+
+ public static readonly DependencyProperty ItemsProperty =
+ DependencyProperty.Register("Items", typeof(List), typeof(BreadcrumbBarUserControl), new PropertyMetadata(null));
+
+ public string SingleItem
+ {
+ get => (string)GetValue(SingleItemProperty);
+ set => SetValue(SingleItemProperty, value);
+ }
+
+ public static readonly DependencyProperty SingleItemProperty =
+ DependencyProperty.Register("SingleItem", typeof(string), typeof(BreadcrumbBarUserControl), new PropertyMetadata(default(string)));
+
+ public BreadcrumbBarUserControl()
+ {
+ this.InitializeComponent();
+ BreadcrumbBarCollection = new ObservableCollection();
+ Loaded += BreadcrumbBarUserControl_Loaded;
+ }
+
+ private void BreadcrumbBarUserControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ BreadcrumbBarCollection.Add("Settings");
+ if (Items != null)
+ {
+ foreach (var item in Items)
+ {
+ BreadcrumbBarCollection.Add(item);
+ }
+ }
+ else
+ {
+ BreadcrumbBarCollection.Add(SingleItem);
+ }
+ }
+
+ private void BreadcrumbBar_ItemClicked(BreadcrumbBar sender, BreadcrumbBarItemClickedEventArgs args)
+ {
+ int numItemsToGoBack = BreadcrumbBarCollection.Count - args.Index - 1;
+ for (int i = 0; i < numItemsToGoBack; i++)
+ {
+ App.Current.JsonNavigationViewService.GoBack();
+ }
+ }
+}
+
diff --git a/SysInfo/app.manifest b/SysInfo/app.manifest
new file mode 100644
index 0000000..dbe1140
--- /dev/null
+++ b/SysInfo/app.manifest
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
diff --git a/TrustedPlatform/.gitattributes b/TrustedPlatform/.gitattributes
new file mode 100644
index 0000000..dfe0770
--- /dev/null
+++ b/TrustedPlatform/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto
diff --git a/TrustedPlatform/App.xaml b/TrustedPlatform/App.xaml
new file mode 100644
index 0000000..f71f852
--- /dev/null
+++ b/TrustedPlatform/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TrustedPlatform/App.xaml.cs b/TrustedPlatform/App.xaml.cs
new file mode 100644
index 0000000..146f10c
--- /dev/null
+++ b/TrustedPlatform/App.xaml.cs
@@ -0,0 +1,21 @@
+using WinUIEx;
+
+namespace Rebound.TrustedPlatform;
+
+public partial class App : Application
+{
+ public static WindowEx m_window;
+
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ m_window = new MainWindow();
+ m_window.SetWindowSize(1100, 750);
+ m_window.Show();
+ }
+}
+
diff --git a/TrustedPlatform/Assets/Store/LargeTile.scale-100.png b/TrustedPlatform/Assets/Store/LargeTile.scale-100.png
new file mode 100644
index 0000000..c9faf8c
Binary files /dev/null and b/TrustedPlatform/Assets/Store/LargeTile.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/LargeTile.scale-125.png b/TrustedPlatform/Assets/Store/LargeTile.scale-125.png
new file mode 100644
index 0000000..76cf54c
Binary files /dev/null and b/TrustedPlatform/Assets/Store/LargeTile.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/LargeTile.scale-150.png b/TrustedPlatform/Assets/Store/LargeTile.scale-150.png
new file mode 100644
index 0000000..040b798
Binary files /dev/null and b/TrustedPlatform/Assets/Store/LargeTile.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/LargeTile.scale-200.png b/TrustedPlatform/Assets/Store/LargeTile.scale-200.png
new file mode 100644
index 0000000..6708e71
Binary files /dev/null and b/TrustedPlatform/Assets/Store/LargeTile.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/LargeTile.scale-400.png b/TrustedPlatform/Assets/Store/LargeTile.scale-400.png
new file mode 100644
index 0000000..0af2a17
Binary files /dev/null and b/TrustedPlatform/Assets/Store/LargeTile.scale-400.png differ
diff --git a/TrustedPlatform/Assets/Store/LockScreenLogo.scale-200.png b/TrustedPlatform/Assets/Store/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/TrustedPlatform/Assets/Store/LockScreenLogo.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/SmallTile.scale-100.png b/TrustedPlatform/Assets/Store/SmallTile.scale-100.png
new file mode 100644
index 0000000..ae4fcb1
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SmallTile.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/SmallTile.scale-125.png b/TrustedPlatform/Assets/Store/SmallTile.scale-125.png
new file mode 100644
index 0000000..dafa3ec
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SmallTile.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/SmallTile.scale-150.png b/TrustedPlatform/Assets/Store/SmallTile.scale-150.png
new file mode 100644
index 0000000..1fa0585
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SmallTile.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/SmallTile.scale-200.png b/TrustedPlatform/Assets/Store/SmallTile.scale-200.png
new file mode 100644
index 0000000..183e416
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SmallTile.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/SmallTile.scale-400.png b/TrustedPlatform/Assets/Store/SmallTile.scale-400.png
new file mode 100644
index 0000000..2066bc8
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SmallTile.scale-400.png differ
diff --git a/TrustedPlatform/Assets/Store/SplashScreen.scale-100.png b/TrustedPlatform/Assets/Store/SplashScreen.scale-100.png
new file mode 100644
index 0000000..9618825
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SplashScreen.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/SplashScreen.scale-125.png b/TrustedPlatform/Assets/Store/SplashScreen.scale-125.png
new file mode 100644
index 0000000..b310b4b
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SplashScreen.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/SplashScreen.scale-150.png b/TrustedPlatform/Assets/Store/SplashScreen.scale-150.png
new file mode 100644
index 0000000..5233433
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SplashScreen.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/SplashScreen.scale-200.png b/TrustedPlatform/Assets/Store/SplashScreen.scale-200.png
new file mode 100644
index 0000000..d6be53f
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SplashScreen.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/SplashScreen.scale-400.png b/TrustedPlatform/Assets/Store/SplashScreen.scale-400.png
new file mode 100644
index 0000000..159a2f6
Binary files /dev/null and b/TrustedPlatform/Assets/Store/SplashScreen.scale-400.png differ
diff --git a/TrustedPlatform/Assets/Store/Square150x150Logo.scale-100.png b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..d3ec685
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/Square150x150Logo.scale-125.png b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..35dfe26
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/Square150x150Logo.scale-150.png b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..c12087c
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/Square150x150Logo.scale-200.png b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..2cf923b
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/Square150x150Logo.scale-400.png b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..2dab12b
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square150x150Logo.scale-400.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-16.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..e2461c6
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-24.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..108aa40
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-256.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..a0afef5
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-32.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..ca59522
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-48.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..c40d497
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-16.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..5c83916
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-256.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..9d3abca
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-32.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..4d80ee8
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-48.png b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..76a587c
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.scale-100.png b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..d187ab4
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.scale-125.png b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..64734a1
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.scale-150.png b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..ceaff63
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.scale-200.png b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..6bff5b9
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.scale-400.png b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..d2a7a91
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.scale-400.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-16.png b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..e268fad
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-16.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-24.png b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..3a15c08
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-24.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-24_altform-unplated.png b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..3683b2d
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-256.png b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..6149ad7
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-256.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-32.png b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..017e7bf
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-32.png differ
diff --git a/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-48.png b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..5a36609
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Square44x44Logo.targetsize-48.png differ
diff --git a/TrustedPlatform/Assets/Store/StoreLogo.backup.png b/TrustedPlatform/Assets/Store/StoreLogo.backup.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/TrustedPlatform/Assets/Store/StoreLogo.backup.png differ
diff --git a/TrustedPlatform/Assets/Store/StoreLogo.scale-100.png b/TrustedPlatform/Assets/Store/StoreLogo.scale-100.png
new file mode 100644
index 0000000..12abe7a
Binary files /dev/null and b/TrustedPlatform/Assets/Store/StoreLogo.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/StoreLogo.scale-125.png b/TrustedPlatform/Assets/Store/StoreLogo.scale-125.png
new file mode 100644
index 0000000..3b0b29d
Binary files /dev/null and b/TrustedPlatform/Assets/Store/StoreLogo.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/StoreLogo.scale-150.png b/TrustedPlatform/Assets/Store/StoreLogo.scale-150.png
new file mode 100644
index 0000000..9680580
Binary files /dev/null and b/TrustedPlatform/Assets/Store/StoreLogo.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/StoreLogo.scale-200.png b/TrustedPlatform/Assets/Store/StoreLogo.scale-200.png
new file mode 100644
index 0000000..17bd9cf
Binary files /dev/null and b/TrustedPlatform/Assets/Store/StoreLogo.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/StoreLogo.scale-400.png b/TrustedPlatform/Assets/Store/StoreLogo.scale-400.png
new file mode 100644
index 0000000..d391c8d
Binary files /dev/null and b/TrustedPlatform/Assets/Store/StoreLogo.scale-400.png differ
diff --git a/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-100.png b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..92da822
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-100.png differ
diff --git a/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-125.png b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..fe61388
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-125.png differ
diff --git a/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-150.png b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..94cb797
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-150.png differ
diff --git a/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-200.png b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..9618825
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-200.png differ
diff --git a/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-400.png b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..d6be53f
Binary files /dev/null and b/TrustedPlatform/Assets/Store/Wide310x150Logo.scale-400.png differ
diff --git a/TrustedPlatform/Assets/icon.ico b/TrustedPlatform/Assets/icon.ico
new file mode 100644
index 0000000..086ff96
Binary files /dev/null and b/TrustedPlatform/Assets/icon.ico differ
diff --git a/TrustedPlatform/Assets/icon.png b/TrustedPlatform/Assets/icon.png
new file mode 100644
index 0000000..acf388e
Binary files /dev/null and b/TrustedPlatform/Assets/icon.png differ
diff --git a/TrustedPlatform/GlobalUsings.cs b/TrustedPlatform/GlobalUsings.cs
new file mode 100644
index 0000000..c4a84c9
--- /dev/null
+++ b/TrustedPlatform/GlobalUsings.cs
@@ -0,0 +1,4 @@
+global using Microsoft.UI;
+global using Microsoft.UI.Xaml;
+global using Microsoft.UI.Xaml.Controls;
+global using Rebound.TrustedPlatform.Views;
diff --git a/TrustedPlatform/MainWindow.xaml b/TrustedPlatform/MainWindow.xaml
new file mode 100644
index 0000000..e7cb5d1
--- /dev/null
+++ b/TrustedPlatform/MainWindow.xaml
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #15AAAAAA
+
+
+ #DDc32b1b
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TrustedPlatform/MainWindow.xaml.cs b/TrustedPlatform/MainWindow.xaml.cs
new file mode 100644
index 0000000..912c353
--- /dev/null
+++ b/TrustedPlatform/MainWindow.xaml.cs
@@ -0,0 +1,673 @@
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Graphics.Display;
+using WinUIEx;
+using Microsoft.UI.Windowing;
+using CommunityToolkit.WinUI.Helpers;
+using Microsoft.UI.Xaml.Media.Imaging;
+using System.Runtime.InteropServices;
+using Microsoft.Win32;
+using Windows.Graphics;
+using WindowMessageMonitor = WinUIEx.Messaging.WindowMessageMonitor;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace Rebound.TrustedPlatform;
+///
+/// An empty window that can be used on its own or navigated to within a Frame.
+///
+public sealed partial class MainWindow : WindowEx
+{
+ public double Scale()
+ {
+ // Get the DisplayInformation object for the current view
+ DisplayInformation displayInformation = DisplayInformation.CreateForWindowId(this.AppWindow.Id);
+ // Get the RawPixelsPerViewPixel which gives the scale factor
+ var scaleFactor = displayInformation.RawPixelsPerViewPixel;
+ return scaleFactor;
+ }
+
+ public MainWindow()
+ {
+ this.InitializeComponent();
+ this.SystemBackdrop = new MicaBackdrop();
+ this.AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true;
+ WindowTitle.Text = Title;
+ RootFrame.Navigate(typeof(MainPage));
+ this.SetWindowIcon($"Assets\\icon.ico");
+
+ _msgMonitor ??= new WindowMessageMonitor(this);
+ _msgMonitor.WindowMessageReceived -= Event;
+ _msgMonitor.WindowMessageReceived += Event;
+
+ this.AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;
+ this.AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Collapsed;
+
+ mon = new RegistryMonitor(@"Software\Microsoft\Windows\DWM");
+ mon.Start();
+ var x = new ThemeListener();
+ x.ThemeChanged += X_ThemeChanged;
+
+ Rehook();
+ CheckWindow();
+ }
+
+ public async void Rehook()
+ {
+ _msgMonitor ??= new WindowMessageMonitor(this);
+ _msgMonitor.WindowMessageReceived -= Event;
+ _msgMonitor.WindowMessageReceived += Event;
+
+ await Task.Delay(1000);
+
+ Rehook();
+ }
+
+ public void SetWindowIcon(string path)
+ {
+ TitleBarIcon.Source = new BitmapImage(new Uri($"ms-appx:///{path}"));
+ this.SetIcon($"{AppContext.BaseDirectory}\\{path}");
+ }
+
+ public async void CheckWindow()
+ {
+ try
+ {
+ if (WindowTitle != null && this != null) WindowTitle.Text = Title;
+
+ await Task.Delay(50);
+
+ CheckWindow();
+ }
+ catch (AccessViolationException)
+ {
+
+ }
+ catch (COMException)
+ {
+
+ }
+ }
+
+ RegistryMonitor mon;
+
+ private async void X_ThemeChanged(ThemeListener sender)
+ {
+ await Task.Delay(200);
+ CheckFocus();
+ }
+
+ private void WindowEx_Closed(object sender, WindowEventArgs args)
+ {
+ App.m_window = null;
+ mon.Stop();
+ _msgMonitor.Dispose();
+ }
+
+ #region MaximizeButton
+
+ WindowMessageMonitor _msgMonitor;
+
+ double additionalHeight = 0;
+
+ public bool isInMaxButton = false;
+
+ private void CrimsonMaxRes_PointerEntered(object sender, PointerRoutedEventArgs e)
+ {
+ ev = e;
+ isInMaxButton = true;
+ }
+ private void CrimsonMaxRes_PointerExited(object sender, PointerRoutedEventArgs e)
+ {
+ ev = e;
+ isInMaxButton = false;
+ }
+
+ private void CrimsonMaxRes_PointerPressed(object sender, PointerRoutedEventArgs e)
+ {
+ ev = e;
+ isInMaxButton = false;
+ }
+
+ PointerRoutedEventArgs ev;
+
+ private void CrimsonMaxRes_PointerMoved(object sender, PointerRoutedEventArgs e)
+ {
+ ev = e;
+ _msgMonitor ??= new WindowMessageMonitor(this);
+ var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
+ _msgMonitor.WindowMessageReceived -= Event;
+ _msgMonitor.WindowMessageReceived += Event;
+ }
+
+ private int GET_X_LPARAM(IntPtr lParam)
+ {
+ return unchecked((short)(long)lParam);
+ }
+
+ private int GET_Y_LPARAM(IntPtr lParam)
+ {
+ return unchecked((short)((long)lParam >> 16));
+ }
+
+ bool windowFocused = false;
+
+ SolidColorBrush buttonBrush;
+
+ private const string RegistryKeyPath = @"Software\Microsoft\Windows\DWM";
+ private const string RegistryValueName = "ColorPrevalence";
+
+ private static readonly IntPtr HKEY_CURRENT_USER = unchecked((IntPtr)0x80000001);
+
+ [DllImport("advapi32.dll", SetLastError = true)]
+ private static extern IntPtr RegOpenKeyEx(IntPtr hKey, string lpSubKey, uint ulOptions, uint samDesired, out IntPtr phkResult);
+
+ [DllImport("advapi32.dll", SetLastError = true)]
+ private static extern int RegCloseKey(IntPtr hKey);
+
+ [DllImport("advapi32.dll", SetLastError = true)]
+ private static extern int RegNotifyChangeKeyValue(IntPtr hKey, bool bWatchSubtree, uint dwNotifyFilter, IntPtr hEvent, bool fAsynchronous);
+
+ private const uint REG_NOTIFY_CHANGE_NAME = 0x00000001;
+ private const uint REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002;
+ private const uint REG_NOTIFY_CHANGE_LAST_SET = 0x00000004;
+ private const uint REG_NOTIFY_CHANGE_SECURITY = 0x00000008;
+
+ private static ManualResetEvent _changeEvent = new(false);
+ private static bool _running = true;
+
+ private class RegistryMonitor : IDisposable
+ {
+ private readonly string _registryKeyPath;
+ private IntPtr _hKey;
+ private readonly Thread _monitorThread;
+
+ public RegistryMonitor(string registryKeyPath)
+ {
+ _registryKeyPath = registryKeyPath;
+ _monitorThread = new Thread(MonitorRegistry) { IsBackground = true };
+ }
+
+ public void Start()
+ {
+ _monitorThread.Start();
+ }
+
+ public void Stop()
+ {
+ _running = false;
+ _changeEvent.Set();
+ _monitorThread.Join();
+ }
+
+ private void MonitorRegistry()
+ {
+ if (RegOpenKeyEx(HKEY_CURRENT_USER, _registryKeyPath, 0, 0x20019, out _hKey) != 0)
+ {
+ throw new InvalidOperationException("Failed to open registry key.");
+ }
+
+ while (_running)
+ {
+ // Wait for registry change notification
+ if (RegNotifyChangeKeyValue(_hKey, true, REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_SECURITY, _changeEvent.SafeWaitHandle.DangerousGetHandle(), true) == 0)
+ {
+ // Handle registry change
+ if (App.m_window != null) (App.m_window as MainWindow).CheckFocus();
+ _changeEvent.WaitOne();
+ }
+ }
+
+ RegCloseKey(_hKey);
+ }
+
+ public void Dispose()
+ {
+ Stop();
+ _changeEvent.Dispose();
+ }
+ }
+
+ public static bool IsAccentColorEnabledForTitleBars()
+ {
+ try
+ {
+ using var key = Registry.CurrentUser.OpenSubKey(RegistryKeyPath);
+ if (key != null)
+ {
+ var value = key.GetValue(RegistryValueName);
+ if (value is int intValue)
+ {
+ // ColorPrevalence value of 1 means the accent color is used for title bars and window borders.
+ return intValue == 1;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ // Handle exceptions (e.g., security exceptions or key not found)
+ Console.WriteLine($"Error checking accent color: {ex.Message}");
+ }
+
+ return false; // Default to false if any issues occur
+ }
+
+ private void CheckFocus()
+ {
+ if (IsAccentColorEnabledForTitleBars() == true)
+ {
+ try
+ {
+ if (AccentStrip != null) AccentStrip.Visibility = Visibility.Visible;
+ if (!windowFocused)
+ {
+ buttonBrush = new SolidColorBrush(Colors.White);
+ AccentStrip.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ buttonBrush = Application.Current.Resources["TextFillColorDisabledBrush"] as SolidColorBrush;
+ AccentStrip.Visibility = Visibility.Collapsed;
+ }
+ }
+ catch { }
+ }
+ else
+ {
+ try
+ {
+ if (AccentStrip != null) AccentStrip.Visibility = Visibility.Collapsed;
+ if (!windowFocused)
+ {
+ buttonBrush = Application.Current.Resources["TextFillColorPrimaryBrush"] as SolidColorBrush;
+ }
+ else
+ {
+ buttonBrush = Application.Current.Resources["TextFillColorDisabledBrush"] as SolidColorBrush;
+ }
+ }
+ catch { }
+ }
+ UpdateBrush();
+ }
+
+ private void UpdateBrush()
+ {
+ try
+ {
+ Close.Foreground = buttonBrush;
+ CrimsonMaxRes.Foreground = buttonBrush;
+ Minimize.Foreground = buttonBrush;
+ WindowTitle.Foreground = buttonBrush;
+ }
+ catch
+ {
+
+ }
+ }
+
+ public enum SelectedCaptionButton
+ {
+ None = 0,
+ Minimize = 1,
+ Maximize = 2,
+ Close = 3
+ }
+
+ public SelectedCaptionButton currentCaption = SelectedCaptionButton.None;
+
+ async void Event(object sender, WinUIEx.Messaging.WindowMessageEventArgs e)
+ {
+ const int WM_NCLBUTTONDOWN = 0x00A1;
+ const int WM_NCHITTEST = 0x0084;
+ const int WM_NCLBUTTONUP = 0x00A2;
+ const int WM_NCMOUSELEAVE = 0x02A2;
+ const int WM_ACTIVATE = 0x0006;
+ const int WA_INACTIVE = 0;
+ var x = GET_X_LPARAM(e.Message.LParam);
+ var y = GET_Y_LPARAM(e.Message.LParam);
+
+ var minButtonLeftPos = (Minimize.Width + CrimsonMaxRes.Width + closeWidth) * Scale();
+ var maxButtonLeftPos = (CrimsonMaxRes.Width + closeWidth) * Scale();
+ var closeButtonLeftPos = closeWidth * Scale();
+
+ switch (e.Message.MessageId)
+ {
+ case WM_ACTIVATE:
+ {
+ var wParam = e.Message.WParam.ToUInt32();
+ if (wParam == WA_INACTIVE)
+ {
+ // The window has lost focus
+ windowFocused = true;
+ CheckFocus();
+ }
+ else
+ {
+ // The window has gained focus
+ windowFocused = false;
+ CheckFocus();
+ }
+ break;
+ }
+ case WM_NCHITTEST:
+ {
+ // Minimize Button
+ if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - minButtonLeftPos) &&
+ (x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale() - maxButtonLeftPos) &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(8);
+ if (currentCaption == SelectedCaptionButton.Minimize) VisualStateManager.GoToState(Minimize, "Pressed", true);
+ else if (currentCaption == SelectedCaptionButton.None) VisualStateManager.GoToState(Minimize, "PointerOver", true);
+ else VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ await Task.Delay(1000);
+ e.Handled = false;
+ }
+
+ // Maximize Button
+ else if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - maxButtonLeftPos) &&
+ ((x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale() - closeButtonLeftPos)) &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(9);
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ if (currentCaption == SelectedCaptionButton.Maximize) VisualStateManager.GoToState(CrimsonMaxRes, "Pressed", true);
+ else if (currentCaption == SelectedCaptionButton.None) VisualStateManager.GoToState(CrimsonMaxRes, "PointerOver", true);
+ else VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ await Task.Delay(1000);
+ e.Handled = false;
+ }
+
+ // Close Button
+ else if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - closeButtonLeftPos) &&
+ (x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale()) + 2 &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(20);
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ if (currentCaption == SelectedCaptionButton.Close) VisualStateManager.GoToState(Close, "Pressed", true);
+ else if (currentCaption == SelectedCaptionButton.None) VisualStateManager.GoToState(Close, "PointerOver", true);
+ else VisualStateManager.GoToState(Close, "Normal", true);
+ await Task.Delay(1000);
+ e.Handled = false;
+ }
+
+ // Title bar drag area
+ else
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(1);
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ e.Handled = false;
+ }
+
+ break;
+ }
+ case WM_NCLBUTTONDOWN:
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(1);
+ e.Handled = false;
+
+ // Minimize Button
+ if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - minButtonLeftPos) &&
+ (x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale() - maxButtonLeftPos) &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ currentCaption = SelectedCaptionButton.Minimize;
+ VisualStateManager.GoToState(Minimize, "Pressed", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ }
+
+ // Maximize Button
+ else if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - maxButtonLeftPos) &&
+ ((x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale() - closeButtonLeftPos)) &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ currentCaption = SelectedCaptionButton.Maximize;
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Pressed", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ }
+
+ // Close Button
+ else if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - closeButtonLeftPos) &&
+ (x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale()) + 2 &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ currentCaption = SelectedCaptionButton.Close;
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Pressed", true);
+ }
+
+ // Title bar drag area
+ else
+ {
+ currentCaption = SelectedCaptionButton.None;
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ }
+
+ break;
+ }
+ case WM_NCLBUTTONUP:
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(1);
+ e.Handled = false;
+
+ // Minimize Button
+ if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - minButtonLeftPos) &&
+ (x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale() - maxButtonLeftPos) &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ if (currentCaption == SelectedCaptionButton.Minimize)
+ {
+ this.Minimize();
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ }
+ }
+
+ // Maximize Button
+ else if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - maxButtonLeftPos) &&
+ ((x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale() - closeButtonLeftPos)) &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ if (currentCaption == SelectedCaptionButton.Maximize) RunMaximization();
+ }
+
+ // Close Button
+ else if ((x - 7 * Scale() - this.AppWindow.Position.X) >= (this.Bounds.Width * Scale() - closeButtonLeftPos) &&
+ (x - 7 * Scale() - this.AppWindow.Position.X) < (this.Bounds.Width * Scale()) + 2 &&
+ y < this.AppWindow.Position.Y + 31 * Scale() + additionalHeight * Scale() &&
+ y >= this.AppWindow.Position.Y + 1 * Scale())
+ {
+ if (currentCaption == SelectedCaptionButton.Close)
+ {
+ this.Close();
+ }
+ }
+
+ // Title bar drag area
+ else
+ {
+
+ }
+
+ currentCaption = SelectedCaptionButton.None;
+
+ _msgMonitor.WindowMessageReceived -= Event;
+ _msgMonitor.Dispose();
+ break;
+ }
+ case WM_NCMOUSELEAVE:
+ {
+ e.Handled = true;
+ e.Result = new IntPtr(1);
+ e.Handled = false;
+ VisualStateManager.GoToState(Minimize, "Normal", true);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ VisualStateManager.GoToState(Close, "Normal", true);
+ break;
+ }
+ default:
+ {
+ e.Handled = false;
+ break;
+ }
+ }
+ }
+
+ #endregion MaximizeButton
+
+ double closeWidth = 46;
+
+ public void RunMaximization()
+ {
+ var state = (this.Presenter as OverlappedPresenter).State;
+ if (state == OverlappedPresenterState.Restored)
+ {
+ this.Maximize();
+ RootFrame.Focus(FocusState.Programmatic);
+ CheckMaximization();
+ CaptionButtons.Margin = new Thickness(0, 0, 2, 0);
+ return;
+ }
+ else if (state == OverlappedPresenterState.Maximized)
+ {
+ this.Restore();
+ RootFrame.Focus(FocusState.Programmatic);
+ CheckMaximization();
+ CaptionButtons.Margin = new Thickness(0);
+ return;
+ }
+ }
+
+ public async void CheckMaximization()
+ {
+ if (Presenter is OverlappedPresenter)
+ {
+ var state = (Presenter as OverlappedPresenter).State;
+ if (state == OverlappedPresenterState.Restored)
+ {
+ MaxResGlyph.Glyph = "";
+ await Task.Delay(10);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ closeWidth = 46;
+ additionalHeight = 0;
+ return;
+ }
+ else if (state == OverlappedPresenterState.Maximized)
+ {
+ MaxResGlyph.Glyph = "";
+ await Task.Delay(10);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ closeWidth = 46;
+ additionalHeight = 6;
+ return;
+ }
+ }
+ else
+ {
+ MaxResGlyph.Glyph = "";
+ await Task.Delay(10);
+ VisualStateManager.GoToState(CrimsonMaxRes, "Normal", true);
+ return;
+ }
+ }
+
+ public void LoadBounds()
+ {
+ var appWindow = this.AppWindow;
+ var titleBar = appWindow.TitleBar;
+
+ RectInt32 rect = new RectInt32(0, 0, (int)(this.Bounds.Width * Scale()), (int)(31 * Scale()));
+
+ RectInt32[] rects =
+ [
+ rect,
+ ];
+
+ titleBar.SetDragRectangles(rects);
+ }
+
+ private void WindowEx_SizeChanged(object sender, Microsoft.UI.Xaml.WindowSizeChangedEventArgs args)
+ {
+ LoadBounds();
+ CheckMaximization();
+ }
+
+ private void WindowEx_PositionChanged(object sender, PointInt32 e)
+ {
+ LoadBounds();
+ CheckMaximization();
+ }
+
+ private void CrimsonMaxRes_Click(object sender, RoutedEventArgs e)
+ {
+ RunMaximization();
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private void Grid_PointerMoved(object sender, PointerRoutedEventArgs e)
+ {
+ if (e.GetCurrentPoint(this.Content).Properties.IsLeftButtonPressed != true)
+ {
+ currentCaption = SelectedCaptionButton.None;
+ }
+ }
+
+ private void Grid_PointerReleased(object sender, PointerRoutedEventArgs e)
+ {
+ if (e.GetCurrentPoint(this.Content).Properties.IsLeftButtonPressed != true)
+ {
+ currentCaption = SelectedCaptionButton.None;
+ }
+ }
+
+ private void Grid_PointerExited(object sender, PointerRoutedEventArgs e)
+ {
+ try
+ {
+ if (this.Content != null)
+ {
+ if (e.GetCurrentPoint(this.Content).Properties.IsLeftButtonPressed != true)
+ {
+ currentCaption = SelectedCaptionButton.None;
+ }
+ }
+ }
+ catch
+ {
+
+ }
+ }
+}
diff --git a/TrustedPlatform/Models/TpmManager.cs b/TrustedPlatform/Models/TpmManager.cs
new file mode 100644
index 0000000..7df0d9d
--- /dev/null
+++ b/TrustedPlatform/Models/TpmManager.cs
@@ -0,0 +1,172 @@
+using System;
+using System.ComponentModel;
+using System.Management;
+
+public class TpmManager : INotifyPropertyChanged
+{
+ private string _manufacturerName;
+ private string _manufacturerVersion;
+ private string _specificationVersion;
+ private string _status;
+ private string _tpmSubVersion;
+ private string _pcClientSpecVersion;
+ private string _pcrValues;
+
+ public string ManufacturerName
+ {
+ get => _manufacturerName;
+ private set
+ {
+ _manufacturerName = value;
+ OnPropertyChanged(nameof(ManufacturerName));
+ }
+ }
+
+ public string ManufacturerVersion
+ {
+ get => _manufacturerVersion;
+ private set
+ {
+ _manufacturerVersion = value;
+ OnPropertyChanged(nameof(ManufacturerVersion));
+ }
+ }
+
+ public string SpecificationVersion
+ {
+ get => _specificationVersion;
+ private set
+ {
+ _specificationVersion = value;
+ OnPropertyChanged(nameof(SpecificationVersion));
+ }
+ }
+
+ public string TpmSubVersion
+ {
+ get => _tpmSubVersion;
+ private set
+ {
+ _tpmSubVersion = value;
+ OnPropertyChanged(nameof(TpmSubVersion));
+ }
+ }
+
+ public string PcClientSpecVersion
+ {
+ get => _pcClientSpecVersion;
+ private set
+ {
+ _pcClientSpecVersion = value;
+ OnPropertyChanged(nameof(PcClientSpecVersion));
+ }
+ }
+
+ public string PcrValues
+ {
+ get => _pcrValues;
+ private set
+ {
+ _pcrValues = value;
+ OnPropertyChanged(nameof(PcrValues));
+ }
+ }
+
+ public string Status
+ {
+ get => _status;
+ private set
+ {
+ _status = value;
+ OnPropertyChanged(nameof(Status));
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public TpmManager()
+ {
+ GetTpmInfo();
+ }
+
+ public void RefreshTpmInfo()
+ {
+ GetTpmInfo();
+ }
+
+ public List GetTpmInfo()
+ {
+ try
+ {
+ using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2\Security\MicrosoftTpm", "SELECT * FROM Win32_Tpm"))
+ {
+ foreach (ManagementObject queryObj in searcher.Get())
+ {
+ return new List
+ {
+ queryObj["ManufacturerID"] != null ? ConvertManufacturerIdToName((uint)queryObj["ManufacturerID"]) : "Unknown",
+ queryObj["ManufacturerVersion"]?.ToString() ?? "Unknown",
+ queryObj["SpecVersion"]?.ToString() ?? "Unknown",
+ queryObj["ManufacturerVersion"]?.ToString() ?? "Unknown",
+ queryObj["SpecVersion"]?.ToString() ?? "Unknown",
+ GetPcrValues(),
+ queryObj["IsActivated_InitialValue"] != null && (bool)queryObj["IsActivated_InitialValue"] ? "Ready" : "Not Ready"
+ };
+ /*ManufacturerName = queryObj["ManufacturerID"] != null ? ConvertManufacturerIdToName((uint)queryObj["ManufacturerID"]) : "Unknown";
+ ManufacturerVersion = queryObj["ManufacturerVersion"]?.ToString() ?? "Unknown";
+ SpecificationVersion = queryObj["SpecVersion"]?.ToString() ?? "Unknown";
+ TpmSubVersion = queryObj["ManufacturerVersion"]?.ToString() ?? "Unknown";
+ PcClientSpecVersion = queryObj["SpecVersion"]?.ToString() ?? "Unknown";
+ PcrValues = GetPcrValues();
+
+ Status = queryObj["IsActivated_InitialValue"] != null && (bool)queryObj["IsActivated_InitialValue"] ? "Ready" : "Not Ready";*/
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ ManufacturerName = "N/A";
+ ManufacturerVersion = "N/A";
+ SpecificationVersion = "N/A";
+ TpmSubVersion = "N/A";
+ PcClientSpecVersion = "N/A";
+ PcrValues = "N/A";
+ Status = "Error communicating with TPM";
+ Console.WriteLine($"An error occurred while getting TPM information: {ex.Message}");
+ }
+
+ return new List()
+ {
+ ManufacturerName,
+ ManufacturerVersion,
+ SpecificationVersion,
+ TpmSubVersion,
+ PcClientSpecVersion,
+ PcrValues,
+
+ Status,
+ };
+ }
+
+ private string ConvertManufacturerIdToName(uint manufacturerId)
+ {
+ var manufacturerStr = string.Empty;
+ manufacturerStr += (char)((manufacturerId >> 24) & 0xFF);
+ manufacturerStr += (char)((manufacturerId >> 16) & 0xFF);
+ manufacturerStr += (char)((manufacturerId >> 8) & 0xFF);
+ manufacturerStr += (char)(manufacturerId & 0xFF);
+ return manufacturerStr;
+ }
+
+ private string GetPcrValues()
+ {
+ // Placeholder for PCR retrieval logic. This should query TPM for PCR values.
+ // Requires advanced access via TBS API or TPM library.
+ return "PCR values are not directly accessible via WMI. Requires advanced TPM API.";
+ }
+
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+}
diff --git a/TrustedPlatform/Models/TpmReset.cs b/TrustedPlatform/Models/TpmReset.cs
new file mode 100644
index 0000000..4abf8b1
--- /dev/null
+++ b/TrustedPlatform/Models/TpmReset.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Rebound.TrustedPlatform.Models;
+public class TpmReset
+{
+ public static async Task ResetTpmAsync(ContentDialog dial)
+ {
+ dial.Content = "Processing...";
+ try
+ {
+ // Path to the PowerShell script
+ string scriptPath = Path.Combine(Path.GetTempPath(), "Reset-TPM.ps1");
+
+ // Write the PowerShell script to a temporary file
+ File.WriteAllText(scriptPath, @"
+ Write-Host 'Starting TPM reset process...'
+ Clear-Tpm -ErrorAction Stop
+ Write-Host 'TPM reset successfully completed.'
+ ");
+
+ // Set up the process to run PowerShell with elevated privileges
+ ProcessStartInfo psi = new ProcessStartInfo
+ {
+ FileName = "powershell.exe",
+ Arguments = $"-NoProfile -ExecutionPolicy Bypass -File \"{scriptPath}\"",
+ Verb = "runas", // Run as administrator
+ UseShellExecute = true,
+ CreateNoWindow = true
+ };
+
+ // Start the process and wait for it to exit
+ var process = Process.Start(psi);
+ await process.WaitForExitAsync();
+
+ // Check the exit code
+ if (process.ExitCode == 0)
+ {
+ // Update InfoBar for success
+ dial.Content = "TPM reset successfully completed.";
+ dial.SecondaryButtonText = "Close";
+ }
+ else
+ {
+ // Update InfoBar for failure
+ dial.Content = "TPM reset failed. Please try again.";
+ dial.IsPrimaryButtonEnabled = true;
+ }
+ dial.IsSecondaryButtonEnabled = true;
+ }
+ catch (Exception ex)
+ {
+ // Handle exceptions and update InfoBar for failure
+ dial.Content = $"Operation cancelled from User Account Control.";
+ dial.IsPrimaryButtonEnabled = true;
+ dial.IsSecondaryButtonEnabled = true;
+ }
+ }
+}
diff --git a/TrustedPlatform/Models/TpmViewModel.cs b/TrustedPlatform/Models/TpmViewModel.cs
new file mode 100644
index 0000000..dd0f9d2
--- /dev/null
+++ b/TrustedPlatform/Models/TpmViewModel.cs
@@ -0,0 +1,46 @@
+using System;
+using System.ComponentModel;
+using System.Threading.Tasks;
+
+public class TpmViewModel : INotifyPropertyChanged
+{
+ private readonly TpmManager _tpmManager;
+
+ public string ManufacturerName => _tpmManager.ManufacturerName;
+ public string ManufacturerVersion => _tpmManager.ManufacturerVersion;
+ public string SpecificationVersion => _tpmManager.SpecificationVersion;
+ public string Status => _tpmManager.Status;
+
+ // New properties
+ public string TpmSubVersion => _tpmManager.TpmSubVersion;
+ public string PcClientSpecVersion => _tpmManager.PcClientSpecVersion;
+ public string PcrValues => _tpmManager.PcrValues;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public TpmViewModel()
+ {
+ _tpmManager = new TpmManager();
+ _tpmManager.PropertyChanged += (s, e) => OnPropertyChanged(e.PropertyName);
+ }
+
+ public async Task LoadTpmInfoAsync()
+ {
+ // Call the method to refresh TPM info
+ await Task.Run(() => _tpmManager.RefreshTpmInfo());
+ // Notify properties
+ OnPropertyChanged(nameof(ManufacturerName));
+ OnPropertyChanged(nameof(ManufacturerVersion));
+ OnPropertyChanged(nameof(SpecificationVersion));
+ OnPropertyChanged(nameof(Status));
+ // Notify new properties
+ OnPropertyChanged(nameof(TpmSubVersion));
+ OnPropertyChanged(nameof(PcClientSpecVersion));
+ OnPropertyChanged(nameof(PcrValues));
+ }
+
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+}
diff --git a/TrustedPlatform/Package.appxmanifest b/TrustedPlatform/Package.appxmanifest
new file mode 100644
index 0000000..d86a6af
--- /dev/null
+++ b/TrustedPlatform/Package.appxmanifest
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+ Rebound.TrustedPlatform
+ JPJM-
+ Assets\Store\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TrustedPlatform/Properties/launchSettings.json b/TrustedPlatform/Properties/launchSettings.json
new file mode 100644
index 0000000..b21eb7c
--- /dev/null
+++ b/TrustedPlatform/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "Rebound.TrustedPlatform (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "Rebound.TrustedPlatform (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/TrustedPlatform/Rebound.TrustedPlatform.csproj b/TrustedPlatform/Rebound.TrustedPlatform.csproj
new file mode 100644
index 0000000..4370514
--- /dev/null
+++ b/TrustedPlatform/Rebound.TrustedPlatform.csproj
@@ -0,0 +1,87 @@
+
+
+ WinExe
+ net8.0-windows10.0.22621.0
+ 10.0.17763.0
+ 10.0.22621.35-preview
+ Rebound.TrustedPlatform
+ app.manifest
+ x64;x86
+ win-x86;win-x64
+ win10-x86;win10-x64
+ win-$(Platform).pubxml
+ true
+ true
+ 1.0.1
+ true
+ Latest
+ Assets\icon.ico
+ false
+ true
+ MSIX
+ False
+ True
+ SHA256
+ False
+ False
+ True
+ Never
+ 0
+ Rebound.TrustedPlatform_TemporaryKey.pfx
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+
+ true
+
+
diff --git a/TrustedPlatform/Views/MainPage.xaml b/TrustedPlatform/Views/MainPage.xaml
new file mode 100644
index 0000000..0c6e0a9
--- /dev/null
+++ b/TrustedPlatform/Views/MainPage.xaml
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reset TPM
+
+
+ Refresh
+
+
+
+
+
+
+
+
+
diff --git a/TrustedPlatform/Views/MainPage.xaml.cs b/TrustedPlatform/Views/MainPage.xaml.cs
new file mode 100644
index 0000000..b41c90a
--- /dev/null
+++ b/TrustedPlatform/Views/MainPage.xaml.cs
@@ -0,0 +1,105 @@
+using Rebound.TrustedPlatform.Models;
+
+namespace Rebound.TrustedPlatform.Views;
+
+public sealed partial class MainPage : Page
+{
+ public TpmViewModel ViewModelTpm { get; }
+ public TpmManager TpmManager { get; } // Old method for original properties
+
+ public MainPage()
+ {
+ this.InitializeComponent();
+
+ // Initialize TpmManager for the original properties
+ TpmManager = new TpmManager();
+ // Initialize ViewModelTpm for new properties
+ ViewModelTpm = new TpmViewModel();
+
+ // Set DataContext to TpmManager for original properties
+ this.DataContext = this;
+
+ // Load new TPM information asynchronously
+ _ = ViewModelTpm.LoadTpmInfoAsync();
+
+ var list = TpmManager.GetTpmInfo();
+
+ ManufacturerName.Text = list[0];
+ ManufacturerVersion.Text = list[1];
+ SpecificationVersion.Text = list[2];
+ TpmSubVersion.Text = list[3];
+ PcClientSpecVersion.Text = list[4];
+ PcrValues.Text = list[5];
+ Status.Text = list[6];
+
+ StatusBar.Severity = list[6] == "Ready" ? InfoBarSeverity.Success : InfoBarSeverity.Error;
+ StatusBar.Title = $"Status: {list[6]}";
+ }
+
+ ContentDialog dial;
+
+ private async void Button_Click(object sender, RoutedEventArgs e)
+ {
+ var dialog = new ContentDialog()
+ {
+ XamlRoot = this.XamlRoot,
+ PrimaryButtonText = "Reset",
+ SecondaryButtonText = "Cancel",
+ DefaultButton = ContentDialogButton.Primary,
+ Title = "TPM Management",
+ Content = "This action cannot be undone. Are you sure you want to proceed?",
+ };
+ dial = dialog;
+ dialog.PrimaryButtonClick += Dialog_PrimaryButtonClick;
+ dialog.SecondaryButtonClick += Dialog_SecondaryButtonClick;
+ await dialog.ShowAsync(); // Show the dialog
+ }
+
+ private void Dialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
+ {
+ sender.Hide();
+ dial = null;
+ sender = null;
+ }
+
+ private async void Dialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
+ {
+ args.Cancel = true;
+ dial.Content = "Starting TPM reset... Please wait.";
+ dial.IsPrimaryButtonEnabled = false;
+ dial.IsSecondaryButtonEnabled = false;
+
+ // Call the TPM reset function
+ await TpmReset.ResetTpmAsync(sender);
+
+ var list = TpmManager.GetTpmInfo();
+
+ ManufacturerName.Text = list[0];
+ ManufacturerVersion.Text = list[1];
+ SpecificationVersion.Text = list[2];
+ TpmSubVersion.Text = list[3];
+ PcClientSpecVersion.Text = list[4];
+ PcrValues.Text = list[5];
+ Status.Text = list[6];
+
+ StatusBar.Severity = list[6] == "Ready" ? InfoBarSeverity.Success : InfoBarSeverity.Error;
+ StatusBar.Title = $"Status: {list[6]}";
+ }
+
+ private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
+ {
+ var list = TpmManager.GetTpmInfo();
+
+ ManufacturerName.Text = list[0];
+ ManufacturerVersion.Text = list[1];
+ SpecificationVersion.Text = list[2];
+ TpmSubVersion.Text = list[3];
+ PcClientSpecVersion.Text = list[4];
+ PcrValues.Text = list[5];
+ Status.Text = list[6];
+
+ StatusBar.Severity = list[6] == "Ready" ? InfoBarSeverity.Success : InfoBarSeverity.Error;
+ StatusBar.Title = $"Status: {list[6]}";
+ }
+}
+
diff --git a/TrustedPlatform/app.manifest b/TrustedPlatform/app.manifest
new file mode 100644
index 0000000..581f5f9
--- /dev/null
+++ b/TrustedPlatform/app.manifest
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
+
+
+
+
+
+
+
+
+