Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

refactor(features): use neutral toggle naming, format files, and improve MouseAcceleration feature state checks

fatDucke226e01a083d
diff --git a/optimizerDuck/App.xaml.cs b/optimizerDuck/App.xaml.cs
index 4332cdb..1654015 100644
--- a/optimizerDuck/App.xaml.cs
+++ b/optimizerDuck/App.xaml.cs
@@ -54,7 +54,7 @@ public class ScopeBlockTextFormatter : ITextFormatter
};
//var prefix = $"{timestamp} | {ctx,-67} | {levelText,-7} | "; // byebye 67 char SourceContext truncation, we have a new design now...
- var prefix = $"{timestamp} | {ctx,-35} | {levelText,-7} | ";
+ var prefix = $"{timestamp} | {ctx, -35} | {levelText, -7} | ";
// print message
output.WriteLine(prefix + RenderWithoutQuotes(logEvent));
@@ -318,8 +318,7 @@ public partial class App : Application
base.OnExit(e);
}
- protected async void MainWindow_Closing(object? sender,
- CancelEventArgs e)
+ protected async void MainWindow_Closing(object? sender, CancelEventArgs e)
{
if (_allowClose)
{
@@ -335,50 +334,38 @@ public partial class App : Application
try
{
- _contentDialogService ??=
- _host!.Services.GetRequiredService<IContentDialogService>();
+ _contentDialogService ??= _host!.Services.GetRequiredService<IContentDialogService>();
var result = await _contentDialogService.ShowSimpleDialogAsync(
new SimpleContentDialogCreateOptions
{
Title = Translations.Dialog_PendingChanges_Title,
Content = Translations.Dialog_PendingChanges_Content,
- CloseButtonText =
- Translations.Dialog_PendingChanges_CloseButton,
- PrimaryButtonText =
- Translations.Dialog_PendingChanges_PrimaryButton,
- SecondaryButtonText =
- Translations.Dialog_PendingChanges_SecondaryButton
+ CloseButtonText = Translations.Dialog_PendingChanges_CloseButton,
+ PrimaryButtonText = Translations.Dialog_PendingChanges_PrimaryButton,
+ SecondaryButtonText = Translations.Dialog_PendingChanges_SecondaryButton,
}
);
switch (result)
{
case ContentDialogResult.Primary:
- _logger.LogInformation(
- "User chose to restart PC."
- );
+ _logger.LogInformation("User chose to restart PC.");
ShellService.CMD("shutdown /r /t 0");
break;
case ContentDialogResult.Secondary:
- _logger.LogInformation(
- "User chose to restart Explorer."
- );
+ _logger.LogInformation("User chose to restart Explorer.");
- ShellService.CMD(
- "taskkill /f /im explorer.exe && start explorer.exe"
- );
+ ShellService.CMD("taskkill /f /im explorer.exe && start explorer.exe");
_allowClose = true;
Current.Shutdown();
break;
case ContentDialogResult.None:
- _logger.LogInformation(
- "User chose to exit without applying changes."
- );
+ _logger.LogInformation("User chose to exit without applying changes.");
_allowClose = true;
Current.Shutdown();
@@ -387,10 +374,7 @@ public partial class App : Application
}
catch (Exception ex)
{
- _logger.LogError(
- ex,
- "Failed to show pending changes dialog."
- );
+ _logger.LogError(ex, "Failed to show pending changes dialog.");
_allowClose = true;
Current.Shutdown();
diff --git a/optimizerDuck/Domain/Features/Categories/Desktop.cs b/optimizerDuck/Domain/Features/Categories/Desktop.cs
index f4af312..9f7d60f 100644
--- a/optimizerDuck/Domain/Features/Categories/Desktop.cs
+++ b/optimizerDuck/Domain/Features/Categories/Desktop.cs
@@ -1,4 +1,4 @@
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using optimizerDuck.Domain.Abstractions;
using optimizerDuck.Domain.Attributes;
using optimizerDuck.Domain.Features.Models;
@@ -140,7 +140,7 @@ public class Desktop : IFeatureCategory
}
[Feature(Section = nameof(Sections.Behaviors), Icon = SymbolRegular.ArrowForward24)]
- public class RemoveShortcutArrow : BaseFeature
+ public class ShortcutArrow : BaseFeature
{
private const string Path =
@"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons";
@@ -150,18 +150,13 @@ public class Desktop : IFeatureCategory
public override Task<bool> GetStateAsync()
{
var value = RegistryService.Read<string>(new RegistryItem(Path, "29"));
- return Task.FromResult(value?.ToString() == @"%windir%\System32\shell32.dll,-50");
+ return Task.FromResult(string.Equals(value, "", StringComparison.OrdinalIgnoreCase));
}
public override async Task EnableAsync()
{
RegistryService.Write(
- new RegistryItem(
- Path,
- "29",
- @"%windir%\System32\shell32.dll,-50",
- Microsoft.Win32.RegistryValueKind.String
- )
+ new RegistryItem(Path, "29", @"%windir%\System32\shell32.dll,-50")
);
if (NeedsPostAction)
await ExecutePostActionAsync();
diff --git a/optimizerDuck/Domain/Features/Categories/Gaming.cs b/optimizerDuck/Domain/Features/Categories/Gaming.cs
index 113103a..eda723a 100644
--- a/optimizerDuck/Domain/Features/Categories/Gaming.cs
+++ b/optimizerDuck/Domain/Features/Categories/Gaming.cs
@@ -1,4 +1,4 @@
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using optimizerDuck.Domain.Abstractions;
using optimizerDuck.Domain.Attributes;
using optimizerDuck.Domain.Features.Models;
@@ -142,33 +142,75 @@ public class Gaming : IFeatureCategory
[Feature(Section = nameof(Sections.Input), Icon = SymbolRegular.Cursor24)]
public class MouseAcceleration : BaseFeature
{
- protected override IEnumerable<RegistryToggle> RegistryToggles =>
- [
- new()
- {
- Path = @"HKCU\Control Panel\Mouse",
- Name = "MouseSpeed",
- OnValue = "0",
- OffValue = "1",
- DefaultValue = "1",
- },
- new()
- {
- Path = @"HKCU\Control Panel\Mouse",
- Name = "MouseThreshold1",
- OnValue = "0",
- OffValue = "6",
- DefaultValue = "6",
- },
- new()
- {
- Path = @"HKCU\Control Panel\Mouse",
- Name = "MouseThreshold2",
- OnValue = "0",
- OffValue = "10",
- DefaultValue = "10",
- },
- ];
+ private const string Path = @"HKCU\Control Panel\Mouse";
+
+ public override Task<bool> GetStateAsync()
+ {
+ // Mouse acceleration is ON if any of the values are non-zero
+ var mouseSpeed = RegistryService.Read<string>(new RegistryItem(Path, "MouseSpeed"));
+ var threshold1 = RegistryService.Read<string>(
+ new RegistryItem(Path, "MouseThreshold1")
+ );
+ var threshold2 = RegistryService.Read<string>(
+ new RegistryItem(Path, "MouseThreshold2")
+ );
+
+ // Check if any value is non-zero (acceleration enabled)
+ var isNonZero =
+ (int.TryParse(mouseSpeed, out var speed) && speed != 0)
+ || (int.TryParse(threshold1, out var t1) && t1 != 0)
+ || (int.TryParse(threshold2, out var t2) && t2 != 0);
+
+ return Task.FromResult(isNonZero);
+ }
+
+ public override async Task EnableAsync()
+ {
+ RegistryService.Write(
+ new RegistryItem(Path, "MouseSpeed", "1")
+ );
+ RegistryService.Write(
+ new RegistryItem(
+ Path,
+ "MouseThreshold1",
+ "6"
+ )
+ );
+ RegistryService.Write(
+ new RegistryItem(
+ Path,
+ "MouseThreshold2",
+ "10"
+ )
+ );
+
+ if (NeedsPostAction)
+ await ExecutePostActionAsync();
+ }
+
+ public override async Task DisableAsync()
+ {
+ RegistryService.Write(
+ new RegistryItem(Path, "MouseSpeed", "0")
+ );
+ RegistryService.Write(
+ new RegistryItem(
+ Path,
+ "MouseThreshold1",
+ "0"
+ )
+ );
+ RegistryService.Write(
+ new RegistryItem(
+ Path,
+ "MouseThreshold2",
+ "0"
+ )
+ );
+
+ if (NeedsPostAction)
+ await ExecutePostActionAsync();
+ }
}
[Feature(Section = nameof(Sections.Display), Icon = SymbolRegular.FullScreenMaximize24)]
diff --git a/optimizerDuck/Domain/Features/Categories/Preferences.cs b/optimizerDuck/Domain/Features/Categories/Preferences.cs
index e0841fa..4ed997b 100644
--- a/optimizerDuck/Domain/Features/Categories/Preferences.cs
+++ b/optimizerDuck/Domain/Features/Categories/Preferences.cs
@@ -1,4 +1,4 @@
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using optimizerDuck.Domain.Abstractions;
using optimizerDuck.Domain.Attributes;
using optimizerDuck.Domain.Features.Models;
@@ -121,8 +121,7 @@ public class Preferences : IFeatureCategory
[
new()
{
- Path =
- @"HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize",
+ Path = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize",
Name = "AppsUseLightTheme",
OnValue = 0,
OffValue = 1,
@@ -130,8 +129,7 @@ public class Preferences : IFeatureCategory
},
new()
{
- Path =
- @"HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize",
+ Path = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize",
Name = "SystemUsesLightTheme",
OnValue = 0,
OffValue = 1,
@@ -355,7 +353,7 @@ public class Preferences : IFeatureCategory
}
[Feature(Section = nameof(Sections.Taskbar), Icon = SymbolRegular.Search24)]
- public class DisableBingSearch : BaseFeature
+ public class BingSearch : BaseFeature
{
protected override bool NeedsPostAction => true;
@@ -365,8 +363,8 @@ public class Preferences : IFeatureCategory
{
Path = @"HKCU\Software\Policies\Microsoft\Windows\Explorer",
Name = "DisableSearchBoxSuggestions",
- OnValue = 1,
- OffValue = 0,
+ OnValue = 0,
+ OffValue = 1,
DefaultValue = 0,
},
];
diff --git a/optimizerDuck/Domain/Features/Categories/SystemFeatures.cs b/optimizerDuck/Domain/Features/Categories/SystemFeatures.cs
index a30aa5c..c8a2fc8 100644
--- a/optimizerDuck/Domain/Features/Categories/SystemFeatures.cs
+++ b/optimizerDuck/Domain/Features/Categories/SystemFeatures.cs
@@ -1,8 +1,7 @@
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using optimizerDuck.Domain.Abstractions;
using optimizerDuck.Domain.Attributes;
using optimizerDuck.Domain.Features.Models;
-using optimizerDuck.Domain.Optimizations.Models.Services;
using optimizerDuck.Domain.UI;
using optimizerDuck.Services.Managers;
using optimizerDuck.UI.Pages.Features;
@@ -25,7 +24,7 @@ public class SystemFeatures : IFeatureCategory
public ObservableCollection<IFeature> Features { get; init; } = [];
[Feature(Section = nameof(Sections.Input), Icon = SymbolRegular.NumberSymbol24)]
- public class EnableNumLockOnBoot : BaseFeature
+ public class NumLockOnBoot : BaseFeature
{
protected override IEnumerable<RegistryToggle> RegistryToggles =>
[
diff --git a/optimizerDuck/Domain/Features/Models/RegistryToggle.cs b/optimizerDuck/Domain/Features/Models/RegistryToggle.cs
index 5d4dc95..35525c4 100644
--- a/optimizerDuck/Domain/Features/Models/RegistryToggle.cs
+++ b/optimizerDuck/Domain/Features/Models/RegistryToggle.cs
@@ -17,7 +17,7 @@ public class RegistryToggle
public bool GetState()
{
var value = GetRawValue();
-
+
if (value == null)
{
// If value is null and TreatMissingAsDefault is false,
@@ -50,21 +50,39 @@ public class RegistryToggle
// For numeric types, compare as the most precise type
var typeA = a.GetType();
var typeB = b.GetType();
-
+
// If both are integers, compare as long
- if ((typeA == typeof(int) || typeA == typeof(long) || typeA == typeof(short) || typeA == typeof(byte)) &&
- (typeB == typeof(int) || typeB == typeof(long) || typeB == typeof(short) || typeB == typeof(byte)))
+ if (
+ (
+ typeA == typeof(int)
+ || typeA == typeof(long)
+ || typeA == typeof(short)
+ || typeA == typeof(byte)
+ )
+ && (
+ typeB == typeof(int)
+ || typeB == typeof(long)
+ || typeB == typeof(short)
+ || typeB == typeof(byte)
+ )
+ )
{
return Convert.ToInt64(a) == Convert.ToInt64(b);
}
-
+
// For floating point, compare as double
- if ((typeA == typeof(float) || typeA == typeof(double) || typeA == typeof(decimal)) &&
- (typeB == typeof(float) || typeB == typeof(double) || typeB == typeof(decimal)))
+ if (
+ (typeA == typeof(float) || typeA == typeof(double) || typeA == typeof(decimal))
+ && (
+ typeB == typeof(float)
+ || typeB == typeof(double)
+ || typeB == typeof(decimal)
+ )
+ )
{
return Convert.ToDouble(a) == Convert.ToDouble(b);
}
-
+
// Fallback to decimal comparison for other convertible types
var da = Convert.ToDecimal(a);
var db = Convert.ToDecimal(b);
diff --git a/optimizerDuck/Resources/Languages/Translations.Designer.cs b/optimizerDuck/Resources/Languages/Translations.Designer.cs
index b94472e..6641f5e 100644
--- a/optimizerDuck/Resources/Languages/Translations.Designer.cs
+++ b/optimizerDuck/Resources/Languages/Translations.Designer.cs
@@ -1124,38 +1124,38 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Hide the small arrow overlay on desktop shortcut icons.
+ /// Looks up a localized string similar to Shortcut Behaviors.
/// </summary>
- internal static string Features_Desktop_RemoveShortcutArrow_Description {
+ internal static string Features_Desktop_Section_Behaviors {
get {
- return ResourceManager.GetString("Features.Desktop.RemoveShortcutArrow.Description", resourceCulture);
+ return ResourceManager.GetString("Features.Desktop.Section.Behaviors", resourceCulture);
}
}
/// <summary>
- /// Looks up a localized string similar to Remove Shortcut Arrow.
+ /// Looks up a localized string similar to Desktop Icons.
/// </summary>
- internal static string Features_Desktop_RemoveShortcutArrow_Name {
+ internal static string Features_Desktop_Section_Icons {
get {
- return ResourceManager.GetString("Features.Desktop.RemoveShortcutArrow.Name", resourceCulture);
+ return ResourceManager.GetString("Features.Desktop.Section.Icons", resourceCulture);
}
}
/// <summary>
- /// Looks up a localized string similar to Shortcut Behaviors.
+ /// Looks up a localized string similar to Show or hide the shortcut arrow overlay on desktop icons.
/// </summary>
- internal static string Features_Desktop_Section_Behaviors {
+ internal static string Features_Desktop_ShortcutArrow_Description {
get {
- return ResourceManager.GetString("Features.Desktop.Section.Behaviors", resourceCulture);
+ return ResourceManager.GetString("Features.Desktop.ShortcutArrow.Description", resourceCulture);
}
}
/// <summary>
- /// Looks up a localized string similar to Desktop Icons.
+ /// Looks up a localized string similar to Shortcut Arrow.
/// </summary>
- internal static string Features_Desktop_Section_Icons {
+ internal static string Features_Desktop_ShortcutArrow_Name {
get {
- return ResourceManager.GetString("Features.Desktop.Section.Icons", resourceCulture);
+ return ResourceManager.GetString("Features.Desktop.ShortcutArrow.Name", resourceCulture);
}
}
@@ -1367,7 +1367,7 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Controls Windows&apos; automatic mouse speed adjustment. Disabling provides precise, 1:1 cursor movement..
+ /// Looks up a localized string similar to Enables or disables Windows mouse acceleration for more consistent cursor movement..
/// </summary>
internal static string Features_Gaming_MouseAcceleration_Description {
get {
@@ -1421,20 +1421,20 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Controls Bing web search results appearing in the Start menu search..
+ /// Looks up a localized string similar to Show or hide Bing web results and suggestions in Windows Search.
/// </summary>
- internal static string Features_Preferences_BingSearchInStartMenu_Description {
+ internal static string Features_Preferences_BingSearch_Description {
get {
- return ResourceManager.GetString("Features.Preferences.BingSearchInStartMenu.Description", resourceCulture);
+ return ResourceManager.GetString("Features.Preferences.BingSearch.Description", resourceCulture);
}
}
/// <summary>
- /// Looks up a localized string similar to Bing Search in Start Menu.
+ /// Looks up a localized string similar to Bing Search.
/// </summary>
- internal static string Features_Preferences_BingSearchInStartMenu_Name {
+ internal static string Features_Preferences_BingSearch_Name {
get {
- return ResourceManager.GetString("Features.Preferences.BingSearchInStartMenu.Name", resourceCulture);
+ return ResourceManager.GetString("Features.Preferences.BingSearch.Name", resourceCulture);
}
}
@@ -1501,24 +1501,6 @@ namespace optimizerDuck.Resources.Languages {
}
}
- /// <summary>
- /// Looks up a localized string similar to Remove Bing web results and suggestions from Windows Search.
- /// </summary>
- internal static string Features_Preferences_DisableBingSearch_Description {
- get {
- return ResourceManager.GetString("Features.Preferences.DisableBingSearch.Description", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Disable Bing Search.
- /// </summary>
- internal static string Features_Preferences_DisableBingSearch_Name {
- get {
- return ResourceManager.GetString("Features.Preferences.DisableBingSearch.Name", resourceCulture);
- }
- }
-
/// <summary>
/// Looks up a localized string similar to Decreases spacing between items in File Explorer for a denser view..
/// </summary>
@@ -1925,7 +1907,7 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Automatically turns on NumLock at the Windows login screen.
+ /// Looks up a localized string similar to Turn NumLock on or off at the Windows login screen.
/// </summary>
internal static string Features_SystemFeatures_EnableNumLockOnBoot_Description {
get {
@@ -1934,7 +1916,7 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Enable NumLock on Boot.
+ /// Looks up a localized string similar to NumLock on Boot.
/// </summary>
internal static string Features_SystemFeatures_EnableNumLockOnBoot_Name {
get {
@@ -4233,8 +4215,7 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Thank you for your trust and support &lt;3!
- ///Current version: {0}.
+ /// Looks up a localized string similar to Current version: {0}.
/// </summary>
internal static string Settings_About_Duck_Description {
get {
@@ -4772,5 +4753,23 @@ namespace optimizerDuck.Resources.Languages {
return ResourceManager.GetString("StartupManager.Tasks.Title", resourceCulture);
}
}
+
+ /// <summary>
+ /// Looks up a localized string similar to Join the Discord community.
+ /// </summary>
+ internal static string TitleBar_Discord {
+ get {
+ return ResourceManager.GetString("TitleBar.Discord", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Support the Project.
+ /// </summary>
+ internal static string TitleBar_Support {
+ get {
+ return ResourceManager.GetString("TitleBar.Support", resourceCulture);
+ }
+ }
}
}
diff --git a/optimizerDuck/Resources/Languages/Translations.resx b/optimizerDuck/Resources/Languages/Translations.resx
index 5730c94..58b965a 100644
--- a/optimizerDuck/Resources/Languages/Translations.resx
+++ b/optimizerDuck/Resources/Languages/Translations.resx
@@ -440,8 +440,7 @@
<value>Retry</value>
</data>
<data name="Settings.About.Duck.Description" xml:space="preserve">
- <value>Thank you for your trust and support &lt;3!
-Current version: {0}</value>
+ <value>Current version: {0}</value>
</data>
<data name="Settings.Advanced.Header" xml:space="preserve">
<value>Advanced</value>
@@ -821,12 +820,6 @@ Current version: {0}</value>
<data name="Features.Preferences.TaskbarSearchBox.Description" xml:space="preserve">
<value>Controls visibility of the search box on the taskbar.</value>
</data>
- <data name="Features.Preferences.BingSearchInStartMenu.Name" xml:space="preserve">
- <value>Bing Search in Start Menu</value>
- </data>
- <data name="Features.Preferences.BingSearchInStartMenu.Description" xml:space="preserve">
- <value>Controls Bing web search results appearing in the Start menu search.</value>
- </data>
<data name="Features.Preferences.TaskbarChatButton.Name" xml:space="preserve">
<value>Taskbar Chat Button</value>
</data>
@@ -978,7 +971,7 @@ Current version: {0}</value>
<value>Mouse Acceleration</value>
</data>
<data name="Features.Gaming.MouseAcceleration.Description" xml:space="preserve">
- <value>Controls Windows' automatic mouse speed adjustment. Disabling provides precise, 1:1 cursor movement.</value>
+ <value>Enables or disables Windows mouse acceleration for more consistent cursor movement.</value>
</data>
<data name="Features.Gaming.FullscreenOptimizations.Name" xml:space="preserve">
<value>Fullscreen Optimizations</value>
@@ -1580,10 +1573,10 @@ Update now to enjoy the latest features, improvements, and bug fixes.</value>
<value>Input Settings</value>
</data>
<data name="Features.SystemFeatures.EnableNumLockOnBoot.Name" xml:space="preserve">
- <value>Enable NumLock on Boot</value>
+ <value>NumLock on Boot</value>
</data>
<data name="Features.SystemFeatures.EnableNumLockOnBoot.Description" xml:space="preserve">
- <value>Automatically turns on NumLock at the Windows login screen</value>
+ <value>Turn NumLock on or off at the Windows login screen</value>
</data>
<data name="Features.Desktop.Name" xml:space="preserve">
<value>Desktop</value>
@@ -1633,11 +1626,11 @@ Update now to enjoy the latest features, improvements, and bug fixes.</value>
<data name="Features.Desktop.ShowDesktopIcons.Description" xml:space="preserve">
<value>Show or hide all desktop icons at once</value>
</data>
- <data name="Features.Desktop.RemoveShortcutArrow.Name" xml:space="preserve">
- <value>Remove Shortcut Arrow</value>
+ <data name="Features.Desktop.ShortcutArrow.Name" xml:space="preserve">
+ <value>Shortcut Arrow</value>
</data>
- <data name="Features.Desktop.RemoveShortcutArrow.Description" xml:space="preserve">
- <value>Hide the small arrow overlay on desktop shortcut icons</value>
+ <data name="Features.Desktop.ShortcutArrow.Description" xml:space="preserve">
+ <value>Show or hide the shortcut arrow overlay on desktop icons</value>
</data>
<data name="Features.Preferences.LaunchToThisPc.Name" xml:space="preserve">
<value>Launch to "This PC"</value>
@@ -1645,11 +1638,11 @@ Update now to enjoy the latest features, improvements, and bug fixes.</value>
<data name="Features.Preferences.LaunchToThisPc.Description" xml:space="preserve">
<value>Open File Explorer to This PC instead of Quick Access</value>
</data>
- <data name="Features.Preferences.DisableBingSearch.Name" xml:space="preserve">
- <value>Disable Bing Search</value>
+ <data name="Features.Preferences.BingSearch.Name" xml:space="preserve">
+ <value>Bing Search</value>
</data>
- <data name="Features.Preferences.DisableBingSearch.Description" xml:space="preserve">
- <value>Remove Bing web results and suggestions from Windows Search</value>
+ <data name="Features.Preferences.BingSearch.Description" xml:space="preserve">
+ <value>Show or hide Bing web results and suggestions in Windows Search</value>
</data>
<data name="Button.Accept" xml:space="preserve">
<value>Accept</value>
diff --git a/optimizerDuck/Resources/Languages/Translations.vi-VN.resx b/optimizerDuck/Resources/Languages/Translations.vi-VN.resx
index c3543c0..c3b2a6e 100644
--- a/optimizerDuck/Resources/Languages/Translations.vi-VN.resx
+++ b/optimizerDuck/Resources/Languages/Translations.vi-VN.resx
@@ -434,8 +434,7 @@
<value>Thử lại</value>
</data>
<data name="Settings.About.Duck.Description" xml:space="preserve">
- <value>Cảm ơn bạn đã tin tưởng và ủng hộ &lt;3!
-Phiên bản hiện tại: {0}</value>
+ <value>Phiên bản hiện tại: {0}</value>
</data>
<data name="Settings.Advanced.Header" xml:space="preserve">
<value>Nâng cao</value>
@@ -815,12 +814,6 @@ Phiên bản hiện tại: {0}</value>
<data name="Features.Preferences.TaskbarSearchBox.Description" xml:space="preserve">
<value>Kiểm soát hiển thị ô tìm kiếm trên thanh tác vụ.</value>
</data>
- <data name="Features.Preferences.BingSearchInStartMenu.Name" xml:space="preserve">
- <value>Tìm kiếm Bing trong Start Menu</value>
- </data>
- <data name="Features.Preferences.BingSearchInStartMenu.Description" xml:space="preserve">
- <value>Kiểm soát kết quả tìm kiếm Bing xuất hiện trong menu Start.</value>
- </data>
<data name="Features.Preferences.TaskbarChatButton.Name" xml:space="preserve">
<value>Nút Chat trên Taskbar</value>
</data>
@@ -942,7 +935,7 @@ Phiên bản hiện tại: {0}</value>
<value>Gia tốc chuột</value>
</data>
<data name="Features.Gaming.MouseAcceleration.Description" xml:space="preserve">
- <value>Kiểm soát tự động điều chỉnh tốc độ chuột của Windows. Tắt để di chuột chính xác 1:1.</value>
+ <value>Bật hoặc tắt tăng tốc chuột của Windows để di chuyển con trỏ ổn định hơn.</value>
</data>
<data name="Features.Gaming.FullscreenOptimizations.Name" xml:space="preserve">
<value>Tối ưu hóa toàn màn hình</value>
@@ -1572,10 +1565,10 @@ Cập nhật ngay để trải nghiệm các tính năng mới, cải tiến và
<value>Đầu vào</value>
</data>
<data name="Features.SystemFeatures.EnableNumLockOnBoot.Name" xml:space="preserve">
- <value>Bật NumLock khi khởi động</value>
+ <value>NumLock khi khởi động</value>
</data>
<data name="Features.SystemFeatures.EnableNumLockOnBoot.Description" xml:space="preserve">
- <value>Tự động bật NumLock ở màn hình đăng nhập Windows</value>
+ <value>Bật hoặc tắt NumLock tại màn hình đăng nhập Windows</value>
</data>
<data name="Features.Desktop.Name" xml:space="preserve">
<value>Màn hình chính</value>
@@ -1625,11 +1618,11 @@ Cập nhật ngay để trải nghiệm các tính năng mới, cải tiến và
<data name="Features.Desktop.ShowDesktopIcons.Description" xml:space="preserve">
<value>Hiện hoặc ẩn toàn bộ biểu tượng trên Desktop cùng lúc</value>
</data>
- <data name="Features.Desktop.RemoveShortcutArrow.Name" xml:space="preserve">
- <value>Xóa mũi tên lối tắt</value>
+ <data name="Features.Desktop.ShortcutArrow.Name" xml:space="preserve">
+ <value>Mũi tên lối tắt</value>
</data>
- <data name="Features.Desktop.RemoveShortcutArrow.Description" xml:space="preserve">
- <value>Ẩn biểu tượng mũi tên nhỏ trên các lối tắt Desktop</value>
+ <data name="Features.Desktop.ShortcutArrow.Description" xml:space="preserve">
+ <value>Hiện hoặc ẩn mũi tên lối tắt trên biểu tượng Desktop</value>
</data>
<data name="Features.Preferences.LaunchToThisPc.Name" xml:space="preserve">
<value>Mở mặc định vào "This PC"</value>
@@ -1637,11 +1630,11 @@ Cập nhật ngay để trải nghiệm các tính năng mới, cải tiến và
<data name="Features.Preferences.LaunchToThisPc.Description" xml:space="preserve">
<value>Mở File Explorer thẳng vào This PC thay vì Quick Access</value>
</data>
- <data name="Features.Preferences.DisableBingSearch.Name" xml:space="preserve">
- <value>Tắt Tìm kiếm Bing</value>
+ <data name="Features.Preferences.BingSearch.Name" xml:space="preserve">
+ <value>Tìm kiếm Bing</value>
</data>
- <data name="Features.Preferences.DisableBingSearch.Description" xml:space="preserve">
- <value>Xóa kết quả tìm kiếm web và đề xuất của Bing khỏi Windows Search</value>
+ <data name="Features.Preferences.BingSearch.Description" xml:space="preserve">
+ <value>Hiện hoặc ẩn kết quả tìm kiếm web và đề xuất Bing trong Windows Search</value>
</data>
<data name="Button.Accept" xml:space="preserve">
<value>Chấp nhận</value>
diff --git a/optimizerDuck/Resources/Languages/Translations.zh-TW.resx b/optimizerDuck/Resources/Languages/Translations.zh-TW.resx
index dd0c873..d846c6a 100644
--- a/optimizerDuck/Resources/Languages/Translations.zh-TW.resx
+++ b/optimizerDuck/Resources/Languages/Translations.zh-TW.resx
@@ -409,8 +409,7 @@
<value>重試</value>
</data>
<data name="Settings.About.Duck.Description" xml:space="preserve">
- <value>感謝您的信任與支持 &lt;3!
-目前版本:{0}</value>
+ <value>目前版本:{0}</value>
</data>
<data name="Settings.Advanced.Header" xml:space="preserve">
<value>進階</value>
@@ -1346,12 +1345,6 @@
<data name="Features.Preferences.TaskbarSearchBox.Description" xml:space="preserve">
<value>控制工作列上搜尋方塊的可見性。</value>
</data>
- <data name="Features.Preferences.BingSearchInStartMenu.Name" xml:space="preserve">
- <value>開始功能表中的 Bing 搜尋</value>
- </data>
- <data name="Features.Preferences.BingSearchInStartMenu.Description" xml:space="preserve">
- <value>控制開始功能表搜尋中是否出現 Bing 網頁搜尋結果。</value>
- </data>
<data name="Features.Preferences.TaskbarChatButton.Name" xml:space="preserve">
<value>工作列聊天按鈕</value>
</data>
@@ -1503,7 +1496,7 @@
<value>滑鼠加速</value>
</data>
<data name="Features.Gaming.MouseAcceleration.Description" xml:space="preserve">
- <value>控制 Windows 自動調整滑鼠速度的功能。停用可提供精確的 1:1 游標移動。</value>
+ <value>啟用或停用 Windows 滑鼠加速,以獲得更一致的游標移動。</value>
</data>
<data name="Features.Gaming.FullscreenOptimizations.Name" xml:space="preserve">
<value>全螢幕最佳化</value>
@@ -1539,10 +1532,10 @@
<value>輸入設定</value>
</data>
<data name="Features.SystemFeatures.EnableNumLockOnBoot.Name" xml:space="preserve">
- <value>開機時啟用 NumLock</value>
+ <value>開機時的 NumLock</value>
</data>
<data name="Features.SystemFeatures.EnableNumLockOnBoot.Description" xml:space="preserve">
- <value>在 Windows 登入畫面自動開啟 NumLock</value>
+ <value>在 Windows 登入畫面啟用或停用 NumLock</value>
</data>
<data name="Features.Desktop.Name" xml:space="preserve">
<value>桌面</value>
@@ -1592,11 +1585,11 @@
<data name="Features.Desktop.ShowDesktopIcons.Description" xml:space="preserve">
<value>一次顯示或隱藏所有桌面圖示</value>
</data>
- <data name="Features.Desktop.RemoveShortcutArrow.Name" xml:space="preserve">
- <value>移除捷徑箭頭</value>
+ <data name="Features.Desktop.ShortcutArrow.Name" xml:space="preserve">
+ <value>捷徑箭頭</value>
</data>
- <data name="Features.Desktop.RemoveShortcutArrow.Description" xml:space="preserve">
- <value>隱藏桌面捷徑圖示上的小箭頭覆疊</value>
+ <data name="Features.Desktop.ShortcutArrow.Description" xml:space="preserve">
+ <value>顯示或隱藏桌面圖示上的捷徑箭頭覆疊</value>
</data>
<data name="Features.Preferences.LaunchToThisPc.Name" xml:space="preserve">
<value>啟動至「本機」</value>
@@ -1604,11 +1597,11 @@
<data name="Features.Preferences.LaunchToThisPc.Description" xml:space="preserve">
<value>開啟檔案總管時預設顯示「本機」而非「快速存取」</value>
</data>
- <data name="Features.Preferences.DisableBingSearch.Name" xml:space="preserve">
- <value>停用 Bing 搜尋</value>
+ <data name="Features.Preferences.BingSearch.Name" xml:space="preserve">
+ <value>Bing 搜尋</value>
</data>
- <data name="Features.Preferences.DisableBingSearch.Description" xml:space="preserve">
- <value>從 Windows 搜尋中移除 Bing 網頁結果與建議</value>
+ <data name="Features.Preferences.BingSearch.Description" xml:space="preserve">
+ <value>顯示或隱藏 Windows 搜尋中的 Bing 網頁結果與建議</value>
</data>
<data name="Dialog.PendingChanges.Title" xml:space="preserve">
<value>套用變更</value>
diff --git a/optimizerDuck/UI/ViewModels/Features/FeatureCategoryViewModel.cs b/optimizerDuck/UI/ViewModels/Features/FeatureCategoryViewModel.cs
index 7c25aa4..e70bd35 100644
--- a/optimizerDuck/UI/ViewModels/Features/FeatureCategoryViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Features/FeatureCategoryViewModel.cs
@@ -129,7 +129,10 @@ public partial class FeatureCategoryViewModel : ViewModel
if (featureViewModel is null)
return;
- if (featureViewModel.Feature is not BaseFeature baseFeature || baseFeature.OwnerType == null)
+ if (
+ featureViewModel.Feature is not BaseFeature baseFeature
+ || baseFeature.OwnerType == null
+ )
return;
var fileName = baseFeature.OwnerType.Name;
@@ -160,7 +163,13 @@ public partial class FeatureCategoryViewModel : ViewModel
var lines = source.Split('\n');
for (var i = 0; i < lines.Length; i++)
- if (lines[i].Contains($"class {className} : {nameof(BaseFeature)}", StringComparison.OrdinalIgnoreCase))
+ if (
+ lines[i]
+ .Contains(
+ $"class {className} : {nameof(BaseFeature)}",
+ StringComparison.OrdinalIgnoreCase
+ )
+ )
{
url += $"#L{i + 1}";
break;
@@ -180,7 +189,9 @@ public partial class FeatureCategoryViewModel : ViewModel
}
catch (Exception ex)
{
- System.Diagnostics.Debug.WriteLine($"Failed to open GitHub URL: {url}. Error: {ex.Message}");
+ System.Diagnostics.Debug.WriteLine(
+ $"Failed to open GitHub URL: {url}. Error: {ex.Message}"
+ );
}
}
}
diff --git a/optimizerDuck/UI/ViewModels/Features/FeatureViewModel.cs b/optimizerDuck/UI/ViewModels/Features/FeatureViewModel.cs
index 95c56cd..d3d62b4 100644
--- a/optimizerDuck/UI/ViewModels/Features/FeatureViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Features/FeatureViewModel.cs
@@ -16,7 +16,6 @@ public partial class FeatureViewModel(IFeature feature, ILoggerFactory loggerFac
public IFeature Feature => feature;
-
[ObservableProperty]
private string _description = feature.Description;
diff --git a/optimizerDuck/UI/ViewModels/Optimizer/OptimizationCategoryViewModel.cs b/optimizerDuck/UI/ViewModels/Optimizer/OptimizationCategoryViewModel.cs
index b765644..53efdec 100644
--- a/optimizerDuck/UI/ViewModels/Optimizer/OptimizationCategoryViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Optimizer/OptimizationCategoryViewModel.cs
@@ -366,7 +366,13 @@ public partial class OptimizationCategoryViewModel : ViewModel
var lines = source.Split('\n');
for (var i = 0; i < lines.Length; i++)
- if (lines[i].Contains($"class {className} : {nameof(BaseOptimization)}", StringComparison.OrdinalIgnoreCase))
+ if (
+ lines[i]
+ .Contains(
+ $"class {className} : {nameof(BaseOptimization)}",
+ StringComparison.OrdinalIgnoreCase
+ )
+ )
{
url += $"#L{i + 1}";
break;
@@ -435,8 +441,8 @@ public partial class OptimizationCategoryViewModel : ViewModel
string rawUrl
)
{
- return new Lazy<Task<(string Content, DateTime FetchedAt)>>(
- async () => (await httpClient.GetStringAsync(rawUrl), DateTime.UtcNow)
+ return new Lazy<Task<(string Content, DateTime FetchedAt)>>(async () =>
+ (await httpClient.GetStringAsync(rawUrl), DateTime.UtcNow)
);
}
diff --git a/optimizerDuck/UI/ViewModels/Pages/DashboardViewModel.cs b/optimizerDuck/UI/ViewModels/Pages/DashboardViewModel.cs
index 41c3efb..4a044a3 100644
--- a/optimizerDuck/UI/ViewModels/Pages/DashboardViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Pages/DashboardViewModel.cs
@@ -142,13 +142,7 @@ public partial class DashboardViewModel : ViewModel
{
var drivePath = $"{diskVolume.DriveLetter}\\";
- Process.Start(
- new ProcessStartInfo
- {
- FileName = drivePath,
- UseShellExecute = true,
- }
- );
+ Process.Start(new ProcessStartInfo { FileName = drivePath, UseShellExecute = true });
}
catch (Exception ex)
{
@@ -159,7 +153,11 @@ public partial class DashboardViewModel : ViewModel
new SymbolIcon { Symbol = SymbolRegular.ErrorCircle24, Filled = true },
TimeSpan.FromSeconds(5)
);
- _logger.LogError(ex, "Failed to open disk volume {DriveLetter}", diskVolume.DriveLetter);
+ _logger.LogError(
+ ex,
+ "Failed to open disk volume {DriveLetter}",
+ diskVolume.DriveLetter
+ );
}
}
diff --git a/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs b/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
index 99afdd9..c58df5c 100644
--- a/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
@@ -185,7 +185,10 @@ public partial class SettingsViewModel(
switch (type)
{
case "Documentation":
- logger.LogInformation("Opening page: {Url}", Shared.WebsiteURL + "docs/guides/getting-started");
+ logger.LogInformation(
+ "Opening page: {Url}",
+ Shared.WebsiteURL + "docs/guides/getting-started"
+ );
Process.Start(
new ProcessStartInfo
{