Skip to content

Portable Tool for an Ideal Windows Setup

fix square icons logic & expand app list

Greedeks3ea64e9288f7
diff --git a/.Source/GTweak/Assets/Images/DownloadApps/Rufus.png b/.Source/GTweak/Assets/Images/DownloadApps/Rufus.png
new file mode 100644
index 00000000..60622f03
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadApps/Rufus.png differ
diff --git a/.Source/GTweak/Assets/Images/ImageResources.xaml b/.Source/GTweak/Assets/Images/ImageResources.xaml
index 7a1740c7..79f5f5b8 100644
--- a/.Source/GTweak/Assets/Images/ImageResources.xaml
+++ b/.Source/GTweak/Assets/Images/ImageResources.xaml
@@ -11,6 +11,7 @@
<BitmapImage x:Key="Img_Nvidia" UriSource="/GTweak;component/Assets/Images/DownloadApps/Nvidia.png"/>
<BitmapImage x:Key="Img_NvidiaPI" UriSource="/GTweak;component/Assets/Images/DownloadApps/NvidiaPI.png"/>
<BitmapImage x:Key="Img_Occt" UriSource="/GTweak;component/Assets/Images/DownloadApps/Occt.png"/>
+ <BitmapImage x:Key="Img_Rufus" UriSource="/GTweak;component/Assets/Images/DownloadApps/Rufus.png"/>
<BitmapImage x:Key="Img_BatFile" UriSource="/GTweak;component/Assets/Images/AddonsFiles/BatFile.png"/>
<BitmapImage x:Key="Img_CmdFile" UriSource="/GTweak;component/Assets/Images/AddonsFiles/CmdFile.png"/>
diff --git a/.Source/GTweak/Core/ViewModel/Components/DownloadSession.cs b/.Source/GTweak/Core/ViewModel/Components/DownloadSession.cs
index c879abaf..b7ba1682 100644
--- a/.Source/GTweak/Core/ViewModel/Components/DownloadSession.cs
+++ b/.Source/GTweak/Core/ViewModel/Components/DownloadSession.cs
@@ -3,6 +3,7 @@ using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
+using System.Windows.Input;
using GTweak.Core.Base;
using GTweak.Core.Models;
using GTweak.Core.Services;
@@ -27,7 +28,7 @@ namespace GTweak.Core.ViewModel.Components
{
_isDownloading = value;
OnPropertyChanged();
- System.Windows.Input.CommandManager.InvalidateRequerySuggested();
+ CommandManager.InvalidateRequerySuggested();
}
}
}
@@ -67,14 +68,8 @@ namespace GTweak.Core.ViewModel.Components
await ToolsetDownloadService.DownloadFile(finalUrl, destinationPath, _model.SourceUrl, new Progress<double>(v => Progress = v), _cts.Token);
}
}
- catch (Exception ex) when (ex.Message == "GitHubRateLimit")
- {
- NotificationManager.Show("warn", "error_git_limit_noty").Perform();
- }
- catch (HttpRequestException)
- {
- NotificationManager.Show("warn", "error_download_noty").Perform();
- }
+ catch (Exception ex) when (ex.Message == "GitHubRateLimit") { NotificationManager.Show("warn", "error_git_limit_noty").Perform(); }
+ catch (HttpRequestException) { NotificationManager.Show("warn", "error_download_noty").Perform(); }
catch (Exception ex) { ErrorLogging.LogDebug(ex); }
finally
{
@@ -84,10 +79,7 @@ namespace GTweak.Core.ViewModel.Components
}
}
- public void Cancel()
- {
- _cts?.Cancel();
- }
+ public void Cancel() => _cts?.Cancel();
private string GetFileNameFromUrl(string url)
{
diff --git a/.Source/GTweak/Core/ViewModel/Components/ToolsetItem.cs b/.Source/GTweak/Core/ViewModel/Components/ToolsetItem.cs
index fe193224..9fed46b1 100644
--- a/.Source/GTweak/Core/ViewModel/Components/ToolsetItem.cs
+++ b/.Source/GTweak/Core/ViewModel/Components/ToolsetItem.cs
@@ -70,7 +70,7 @@ namespace GTweak.Core.Item
(ImageSource Image, bool IsFallback) = await ToolsetIconService.GetAuthorIcon(_model.Group, _model.AuthorIconUrl);
AuthorIconSource = Image;
- IsSquareIcon = string.Equals(_model.Group, "web", StringComparison.OrdinalIgnoreCase) && !IsFallback;
+ IsSquareIcon = !string.Equals(_model.Group, "github", StringComparison.OrdinalIgnoreCase) && !IsFallback;
}
catch (Exception ex) { ErrorLogging.LogDebug(ex); }
}
diff --git a/.Source/GTweak/Core/ViewModel/ToolsetViewModel.cs b/.Source/GTweak/Core/ViewModel/ToolsetViewModel.cs
index e110e39a..cd56ade1 100644
--- a/.Source/GTweak/Core/ViewModel/ToolsetViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/ToolsetViewModel.cs
@@ -50,24 +50,6 @@ namespace GTweak.Core.ViewModel
ToolsView.Filter = FilterTools;
}
- private bool FilterTools(object obj)
- {
- if (!string.IsNullOrWhiteSpace(SearchText))
- {
- if (obj is ToolsetItem item)
- {
- bool nameMatch = item.AppName?.IndexOf(SearchText, StringComparison.OrdinalIgnoreCase) >= 0;
- bool authorMatch = item.AuthorName?.IndexOf(SearchText, StringComparison.OrdinalIgnoreCase) >= 0;
-
- return nameMatch || authorMatch;
- }
-
- return false;
- }
-
- return true;
- }
-
private void LoadApps()
{
try
@@ -78,7 +60,7 @@ namespace GTweak.Core.ViewModel
{
XDocument doc = XDocument.Parse(xmlContent);
- foreach (var appElement in doc.Descendants("App"))
+ foreach (XElement appElement in doc.Descendants("App"))
{
ToolsetModel model = new ToolsetModel(appElement);
Tools.Add(new ToolsetItem(model));
@@ -88,6 +70,24 @@ namespace GTweak.Core.ViewModel
catch (Exception ex) { ErrorLogging.LogDebug(ex); }
}
+ private bool FilterTools(object obj)
+ {
+ if (!string.IsNullOrWhiteSpace(SearchText))
+ {
+ if (obj is ToolsetItem item)
+ {
+ bool nameMatch = item.AppName?.IndexOf(SearchText, StringComparison.OrdinalIgnoreCase) >= 0;
+ bool authorMatch = item.AuthorName?.IndexOf(SearchText, StringComparison.OrdinalIgnoreCase) >= 0;
+
+ return nameMatch || authorMatch;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
private void SelectFolder()
{
try
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csproj
index 796df06f..a130bb6e 100644
--- a/.Source/GTweak/GTweak.csproj
+++ b/.Source/GTweak/GTweak.csproj
@@ -636,6 +636,7 @@
<Resource Include="Assets\Images\DownloadApps\DiskInfo.png" />
<Resource Include="Assets\Images\DownloadApps\DiskMark.png" />
<Resource Include="Assets\Images\DownloadApps\CPUz.png" />
+ <Resource Include="Assets\Images\DownloadApps\Rufus.png" />
<Content Include="Properties\AssemblyInfo.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
diff --git a/.Source/GTweak/Resources/AppsCatalog.xml b/.Source/GTweak/Resources/AppsCatalog.xml
index f93f8cf0..538c0fcc 100644
--- a/.Source/GTweak/Resources/AppsCatalog.xml
+++ b/.Source/GTweak/Resources/AppsCatalog.xml
@@ -1,5 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<Apps>
+ <App>
+ <Icon>Img_Nvidia</Icon>
+ <Name>NVIDIA App</Name>
+ <Group>web</Group>
+ <Author>(C) NVIDIA Corporation</Author>
+ <AuthorIcon>nvidia.com</AuthorIcon>
+ <Source>https://www.nvidia.com/en-eu/software/nvidia-app/</Source>
+ <DownloadPath>https://www.nvidia.com/en-us/software/nvidia-app/</DownloadPath>
+ <UrlPattern><![CDATA[https://.*?download\.nvidia\.com/nvapp/client/.*?/NVIDIA_app_.*?\.exe]]></UrlPattern>
+ </App>
+
+ <App>
+ <Icon>Img_Amd</Icon>
+ <Name>AMD Software: Adrenalin Edition™</Name>
+ <Group>web</Group>
+ <Author>Advanced Micro Devices, Inc</Author>
+ <AuthorIcon>amd.com</AuthorIcon>
+ <Source>https://www.amd.com/en/support/download/drivers.html</Source>
+ <DownloadPath>https://www.amd.com/en/support/download/drivers.html</DownloadPath>
+ <UrlPattern><![CDATA[https://drivers\.amd\.com/drivers/installer/.*?/whql/.*?minimalsetup.*?\.exe]]></UrlPattern>
+ </App>
+
<App>
<Icon>Img_FirstEverTech</Icon>
<Name>Universal Intel Chipset Device Updater</Name>
@@ -10,7 +32,7 @@
<DownloadPath>FirstEverTech/Universal-Intel-Chipset-Updater</DownloadPath>
<FilePattern><![CDATA[.*\.exe$]]></FilePattern>
</App>
-
+
<App>
<Icon>Img_FirstEverTech</Icon>
<Name>Universal Intel Wi-Fi and Bluetooth Drivers Updater</Name>
@@ -22,17 +44,6 @@
<FilePattern><![CDATA[.*\.exe$]]></FilePattern>
</App>
- <App>
- <Icon>Img_DeviceTweaker</Icon>
- <Name>DEVICE TWEAKER</Name>
- <Group>github</Group>
- <Author>arsenzaaa</Author>
- <AuthorIcon>https://github.com/arsenzaaa.png</AuthorIcon>
- <Source>https://github.com/arsenzaaa/DEVICE-TWEAKER</Source>
- <DownloadPath>arsenzaaa/DEVICE-TWEAKER</DownloadPath>
- <FilePattern><![CDATA[(?i)DEVICE.*NET.*FRAMEWORK.*\.exe$]]></FilePattern>
- </App>
-
<App>
<Icon>Img_NvidiaPI</Icon>
<Name>NVIDIA Profile Inspector</Name>
@@ -43,29 +54,18 @@
<DownloadPath>Orbmu2k/nvidiaProfileInspector</DownloadPath>
<FilePattern><![CDATA[(?i)nvidiaProfileInspector.*\.zip$]]></FilePattern>
</App>
-
- <App>
- <Icon>Img_Nvidia</Icon>
- <Name>NVIDIA App</Name>
- <Group>web</Group>
- <Author>(C) NVIDIA Corporation</Author>
- <AuthorIcon>nvidia.com</AuthorIcon>
- <Source>https://www.nvidia.com/en-eu/software/nvidia-app/</Source>
- <DownloadPath>https://www.nvidia.com/en-us/software/nvidia-app/</DownloadPath>
- <UrlPattern><![CDATA[https://.*?download\.nvidia\.com/nvapp/client/.*?/NVIDIA_app_.*?\.exe]]></UrlPattern>
- </App>
-
+
<App>
- <Icon>Img_Amd</Icon>
- <Name>AMD Software: Adrenalin Edition™</Name>
- <Group>web</Group>
- <Author>Advanced Micro Devices, Inc</Author>
- <AuthorIcon>amd.com</AuthorIcon>
- <Source>https://www.amd.com/en/support/download/drivers.html</Source>
- <DownloadPath>https://www.amd.com/en/support/download/drivers.html</DownloadPath>
- <UrlPattern><![CDATA[https://drivers\.amd\.com/drivers/installer/.*?/whql/.*?minimalsetup.*?\.exe]]></UrlPattern>
+ <Icon>Img_DeviceTweaker</Icon>
+ <Name>DEVICE TWEAKER</Name>
+ <Group>github</Group>
+ <Author>arsenzaaa</Author>
+ <AuthorIcon>https://github.com/arsenzaaa.png</AuthorIcon>
+ <Source>https://github.com/arsenzaaa/DEVICE-TWEAKER</Source>
+ <DownloadPath>arsenzaaa/DEVICE-TWEAKER</DownloadPath>
+ <FilePattern><![CDATA[(?i)DEVICE.*NET.*FRAMEWORK.*\.exe$]]></FilePattern>
</App>
-
+
<App>
<Icon>Img_Autoruns</Icon>
<Name>Autoruns</Name>
@@ -75,6 +75,17 @@
<Source>https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns</Source>
<DownloadPath>https://download.sysinternals.com/files/Autoruns.zip</DownloadPath>
</App>
+
+ <App>
+ <Icon>Img_Rufus</Icon>
+ <Name>Rufus</Name>
+ <Group>github</Group>
+ <Author>pbatard</Author>
+ <AuthorIcon>https://github.com/pbatard.png</AuthorIcon>
+ <Source>https://github.com/pbatard/rufus</Source>
+ <DownloadPath>pbatard/rufus</DownloadPath>
+ <FilePattern><![CDATA[(?i)rufus-.*?p\.exe$]]></FilePattern>
+ </App>
<App>
<Icon>Img_CPUz</Icon>
@@ -85,7 +96,7 @@
<Source>https://sourceforge.net/projects/cpu-z/</Source>
<DownloadPath>https://sourceforge.net/projects/cpu-z/files/latest/download</DownloadPath>
</App>
-
+
<App>
<Icon>Img_DiskInfo</Icon>
<Name>Crystal Disk Info</Name>
diff --git a/Assets/Images/DownloadApps/Rufus.png b/Assets/Images/DownloadApps/Rufus.png
new file mode 100644
index 00000000..60622f03
Binary files /dev/null and b/Assets/Images/DownloadApps/Rufus.png differ