Skip to content

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

refactor: GitHubSourceHelper, UI updates, async fixes

fatDuckf578eec85506
diff --git a/optimizerDuck.Test/Common/Helpers/GitHubSourceHelperTests.cs b/optimizerDuck.Test/Common/Helpers/GitHubSourceHelperTests.cs
new file mode 100644
index 0000000..e0d3619
--- /dev/null
+++ b/optimizerDuck.Test/Common/Helpers/GitHubSourceHelperTests.cs
@@ -0,0 +1,81 @@
+using optimizerDuck.Common.Helpers;
+
+namespace optimizerDuck.Test.Common.Helpers;
+
+public class GitHubSourceHelperTests
+{
+ [Theory]
+ [InlineData("2.26.2", "v2.26.2")]
+ [InlineData("2.26.2.0", "v2.26.2")]
+ [InlineData("10.20.30", "v10.20.30")]
+ [InlineData("1.0", "v1.0")]
+ public void GetTagForVersion_ValidVersion_ReturnsExpectedTag(
+ string fileVersion,
+ string expected
+ )
+ {
+ Assert.Equal(expected, GitHubSourceHelper.GetTagForVersion(fileVersion));
+ }
+
+ [Theory]
+ [InlineData(null)]
+ [InlineData("")]
+ [InlineData("not-a-version")]
+ [InlineData("v2.26.2")]
+ public void GetTagForVersion_InvalidVersion_ReturnsNull(string? fileVersion)
+ {
+ Assert.Null(GitHubSourceHelper.GetTagForVersion(fileVersion));
+ }
+
+ [Fact]
+ public void FindClassLineNumber_ClassDeclaration_ReturnsZeroBasedLineIndex()
+ {
+ const string source = "using System;\n\nnamespace Demo;\n\npublic class Foo : Base\n{\n}\n";
+
+ Assert.Equal(4, GitHubSourceHelper.FindClassLineNumber(source, "Foo"));
+ }
+
+ [Fact]
+ public void FindClassLineNumber_NestedIndentedClass_IsFound()
+ {
+ const string source =
+ "namespace Demo;\n\npublic class Container\n{\n"
+ + " internal class Foo : BaseOptimization\n {\n }\n}\n";
+
+ Assert.Equal(4, GitHubSourceHelper.FindClassLineNumber(source, "Foo", "BaseOptimization"));
+ }
+
+ [Fact]
+ public void FindClassLineNumber_SubstringClassName_DoesNotMatchPartialNames()
+ {
+ const string source = "class MyFoo : Base\n{\n}\n\nclass FooProcessor : Base\n{\n}\n";
+
+ Assert.Equal(-1, GitHubSourceHelper.FindClassLineNumber(source, "Foo", "Base"));
+ }
+
+ [Fact]
+ public void FindClassLineNumber_BaseClassPattern_MatchesOnlyDerivedClass()
+ {
+ const string source =
+ "public class Foo : RegistryToggle\n{\n}\n\npublic class Bar : Other\n{\n}\n";
+
+ Assert.Equal(0, GitHubSourceHelper.FindClassLineNumber(source, "Foo", "RegistryToggle"));
+ Assert.Equal(-1, GitHubSourceHelper.FindClassLineNumber(source, "Bar", "RegistryToggle"));
+ }
+
+ [Fact]
+ public void FindClassLineNumber_DeclarationIsCaseInsensitive()
+ {
+ const string source = "CLASS foo : basesetting\n{\n}\n";
+
+ Assert.Equal(0, GitHubSourceHelper.FindClassLineNumber(source, "Foo", "BaseSetting"));
+ }
+
+ [Fact]
+ public void FindClassLineNumber_NoMatch_ReturnsMinusOne()
+ {
+ const string source = "public class SomethingElse\n{\n}\n";
+
+ Assert.Equal(-1, GitHubSourceHelper.FindClassLineNumber(source, "Foo"));
+ }
+}
diff --git a/optimizerDuck/Common/Extensions/CustomizePageRegistryExtensions.cs b/optimizerDuck/Common/Extensions/CustomizePageRegistryExtensions.cs
index fdf5f35..e6464dc 100644
--- a/optimizerDuck/Common/Extensions/CustomizePageRegistryExtensions.cs
+++ b/optimizerDuck/Common/Extensions/CustomizePageRegistryExtensions.cs
@@ -39,9 +39,6 @@ public static class CustomizePageRegistryExtensions
var registryWatcher = serviceProvider.GetRequiredService<IRegistryWatcher>();
var systemInfoService = serviceProvider.GetRequiredService<SystemInfoService>();
- // Fall back to synchronous registration if preloading hasn't completed yet.
- // RegisterCategories is a no-op if already preloaded.
- registry.RegisterCategories();
var category = registry.Categories.First(c => c.GetType() == categoryType);
diff --git a/optimizerDuck/Common/Helpers/GitHubSourceHelper.cs b/optimizerDuck/Common/Helpers/GitHubSourceHelper.cs
index 5eef08f..4a72e14 100644
--- a/optimizerDuck/Common/Helpers/GitHubSourceHelper.cs
+++ b/optimizerDuck/Common/Helpers/GitHubSourceHelper.cs
@@ -1,6 +1,8 @@
using System.Collections.Concurrent;
using System.Diagnostics;
+using System.Net;
using System.Net.Http;
+using System.Net.Http.Headers;
using System.Text.RegularExpressions;
using Microsoft.Extensions.Logging;
using optimizerDuck.Resources.Languages;
@@ -10,22 +12,36 @@ using Wpf.Ui.Controls;
namespace optimizerDuck.Common.Helpers;
/// <summary>
-/// Provides shared logic for opening source files on GitHub, with built-in caching
-/// of raw content to avoid repeated network requests.
+/// Provides shared logic for opening source files on GitHub pinned to the release tag
+/// matching the running version (fallback: <c>master</c>). Raw contents are cached
+/// permanently per immutable ref, so repeated views cost no extra requests, and a
+/// missing version tag is remembered to skip its probe on later views.
/// </summary>
public static class GitHubSourceHelper
{
- private static readonly HttpClient HttpClient = HttpClientFactory.CreateClient(
- timeout: TimeSpan.FromSeconds(5)
- );
- private static readonly ConcurrentDictionary<
- string,
- Lazy<Task<(string Content, DateTime FetchedAt)>>
- > SourceCache = new();
- private static readonly TimeSpan SourceCacheTtl = TimeSpan.FromMinutes(5);
+ private const string MasterRef = "master";
+ private const string GitHubComPrefix = "https://github.com/";
+
+ private static readonly TimeSpan RequestTimeout = TimeSpan.FromSeconds(5);
+
+ private static readonly string RepoSlug = Shared.GitHubRepoURL.StartsWith(
+ GitHubComPrefix,
+ StringComparison.Ordinal
+ )
+ ? Shared.GitHubRepoURL[GitHubComPrefix.Length..].TrimEnd('/')
+ : string.Empty;
+
+ private static readonly HttpClient HttpClient = CreateClient();
+
+ /// <summary>Raw file contents keyed by ref/path; tag refs are immutable, so entries never expire.</summary>
+ private static readonly ConcurrentDictionary<string, Lazy<Task<string>>> SourceCache = new();
+
+ /// <summary>Tags known missing upstream; skips one wasted probe per view until the app restarts.</summary>
+ private static readonly ConcurrentDictionary<string, byte> MissingTagCache = new();
/// <summary>
- /// Opens the GitHub source file for the given type at the class definition line.
+ /// Opens the GitHub source file for the given type at the class definition line,
+ /// viewed at the release tag matching the running application version.
/// </summary>
/// <param name="ownerType">The type that owns the source file (e.g., the category class).</param>
/// <param name="className">The class name to find within the source file.</param>
@@ -43,55 +59,16 @@ public static class GitHubSourceHelper
var fileName = ownerType.Name;
var namespacePath = (ownerType.Namespace ?? string.Empty).Replace('.', '/');
var relativePath = $"{namespacePath}/{fileName}.cs";
- var url = $"{Shared.GitHubRepoURL}/blob/master/{relativePath}";
- // Fetch source from GitHub raw content to find the class line number
- try
- {
- var rawUrl =
- $"https://raw.githubusercontent.com/itsfatduck/optimizerDuck/master/{relativePath}";
-
- var cached = SourceCache.GetOrAdd(rawUrl, CreateSourceCacheEntry);
- var cachedSource = await cached.Value;
-
- if (DateTime.UtcNow - cachedSource.FetchedAt >= SourceCacheTtl)
- {
- var refreshed = CreateSourceCacheEntry(rawUrl);
- SourceCache[rawUrl] = refreshed;
- cachedSource = await refreshed.Value;
- }
-
- var source = cachedSource.Content;
-
- // Use regex with word boundaries to avoid false-positive substring matches
- var classNameEscaped = Regex.Escape(className);
- var pattern =
- baseClassPattern != null
- ? $@"class\s+{classNameEscaped}\s*:\s*{Regex.Escape(baseClassPattern)}\b"
- : $@"class\s+{classNameEscaped}\b";
-
- var lineIndex = -1;
- var lines = source.Split('\n');
- for (var i = 0; i < lines.Length; i++)
- {
- if (Regex.IsMatch(lines[i], pattern, RegexOptions.IgnoreCase))
- {
- lineIndex = i;
- break;
- }
- }
+ var (source, resolvedRef) = await TryGetSourceAsync(relativePath, logger);
+ var url = $"{Shared.GitHubRepoURL}/blob/{resolvedRef}/{relativePath}";
+ if (source != null)
+ {
+ var lineIndex = FindClassLineNumber(source, className, baseClassPattern);
if (lineIndex >= 0)
url += $"#L{lineIndex + 1}";
}
- catch (Exception ex)
- {
- logger?.LogWarning(
- ex,
- "Could not fetch source to find line number for {Class}",
- className
- );
- }
try
{
@@ -110,12 +87,99 @@ public static class GitHubSourceHelper
}
}
- private static Lazy<Task<(string Content, DateTime FetchedAt)>> CreateSourceCacheEntry(
- string rawUrl
+ /// <summary>Maps the running file version to its release tag (e.g., "2.26.2" -> "v2.26.2").</summary>
+ internal static string? GetTagForVersion(string? FileVersion)
+ {
+ if (!Version.TryParse(FileVersion, out var version))
+ return null;
+
+ return version.Build >= 0
+ ? $"v{version.Major}.{version.Minor}.{version.Build}"
+ : $"v{version.Major}.{version.Minor}";
+ }
+
+ /// <summary>Finds the zero-based line of the class declaration, or -1 when absent.</summary>
+ internal static int FindClassLineNumber(
+ string source,
+ string className,
+ string? baseClassPattern = null
+ )
+ {
+ var classNameEscaped = Regex.Escape(className);
+ var pattern =
+ baseClassPattern != null
+ ? $@"class\s+{classNameEscaped}\s*:\s*{Regex.Escape(baseClassPattern)}\b"
+ : $@"class\s+{classNameEscaped}\b";
+
+ var lines = source.Split('\n');
+ for (var i = 0; i < lines.Length; i++)
+ {
+ if (Regex.IsMatch(lines[i], pattern, RegexOptions.IgnoreCase))
+ return i;
+ }
+
+ return -1;
+ }
+
+ private static async Task<(string? Content, string ResolvedRef)> TryGetSourceAsync(
+ string relativePath,
+ ILogger? logger
+ )
+ {
+ var tag = GetTagForVersion(Shared.FileVersion);
+ if (tag != null && !MissingTagCache.ContainsKey(tag))
+ {
+ var pinned = await FetchAsync(BuildRawUrl(tag, relativePath), logger, tag);
+ if (pinned != null)
+ return (pinned, tag);
+ }
+
+ return (await FetchAsync(BuildRawUrl(MasterRef, relativePath), logger), MasterRef);
+ }
+
+ private static async Task<string?> FetchAsync(
+ string rawUrl,
+ ILogger? logger,
+ string? tag = null
)
{
- return new Lazy<Task<(string Content, DateTime FetchedAt)>>(async () =>
- (await HttpClient.GetStringAsync(rawUrl), DateTime.UtcNow)
+ var entry = SourceCache.GetOrAdd(rawUrl, CreateCacheEntry);
+ try
+ {
+ return await entry.Value;
+ }
+ catch (Exception ex)
+ {
+ // Evict so a transient failure (or a not-yet-published tag) is retried
+ // later instead of poisoning the cache entry forever.
+ SourceCache.TryRemove(KeyValuePair.Create(rawUrl, entry));
+
+ // A pinned-tag miss usually means the tag is not published (yet); remember
+ // it so later views skip straight to master instead of re-probing.
+ if (
+ tag != null
+ && ex is HttpRequestException hrex
+ && hrex.StatusCode == HttpStatusCode.NotFound
+ )
+ MissingTagCache.TryAdd(tag, 0);
+
+ logger?.LogWarning(ex, "Could not fetch GitHub source: {Url}", rawUrl);
+ return null;
+ }
+ }
+
+ private static string BuildRawUrl(string @ref, string relativePath) =>
+ $"https://raw.githubusercontent.com/{RepoSlug}/{@ref}/{relativePath}";
+
+ private static Lazy<Task<string>> CreateCacheEntry(string rawUrl) =>
+ new(() => HttpClient.GetStringAsync(rawUrl));
+
+ private static HttpClient CreateClient()
+ {
+ var client = HttpClientFactory.CreateClient(timeout: RequestTimeout);
+ client.DefaultRequestHeaders.UserAgent.Add(
+ new ProductInfoHeaderValue("optimizerDuck", Shared.FileVersion)
);
+ return client;
}
}
diff --git a/optimizerDuck/Domain/UI/OptimizationState.cs b/optimizerDuck/Domain/UI/OptimizationState.cs
index 31e8a49..0624c3b 100644
--- a/optimizerDuck/Domain/UI/OptimizationState.cs
+++ b/optimizerDuck/Domain/UI/OptimizationState.cs
@@ -1,4 +1,4 @@
-using System.Windows.Threading;
+using System.Windows.Threading;
using CommunityToolkit.Mvvm.ComponentModel;
using optimizerDuck.Resources.Languages;
@@ -54,8 +54,15 @@ public partial class OptimizationState : ObservableObject
if (_globalTimer != null)
return;
- // Defer timer creation to avoid accessing dispatcher during static init
- _ = System.Windows.Application.Current?.Dispatcher.InvokeAsync(() =>
+ // Defer timer creation to avoid accessing dispatcher during static init.
+ // NOTE: This type lives in Domain/UI but owns a DispatcherTimer (WPF). Ideally
+ // move to optimizerDuck.UI or Common — kept here to avoid churn. We route
+ // through the dispatcher indirection rather than hard-referencing UI assemblies
+ // from pure domain logic.
+ var dispatcher = System.Windows.Application.Current?.Dispatcher;
+ if (dispatcher is null)
+ return; // headless/tests — no timer needed
+ _ = dispatcher.InvokeAsync(() =>
{
lock (_lock)
{
diff --git a/optimizerDuck/Services/Configuration/ConfigManager.cs b/optimizerDuck/Services/Configuration/ConfigManager.cs
index 4d1c79f..4d939d3 100644
--- a/optimizerDuck/Services/Configuration/ConfigManager.cs
+++ b/optimizerDuck/Services/Configuration/ConfigManager.cs
@@ -42,7 +42,7 @@ public class ConfigManager(IConfiguration configuration, ILogger<ConfigManager>
/// </summary>
public async Task EnsureDefaultsAsync()
{
- await _lock.WaitAsync();
+ await _lock.WaitAsync().ConfigureAwait(false);
try
{
var defaults = new AppSettings();
@@ -204,7 +204,7 @@ public class ConfigManager(IConfiguration configuration, ILogger<ConfigManager>
}
var key = string.Join(":", keyParts);
- await SetAsync(key, value?.ToString() ?? "");
+ await SetAsync(key, value?.ToString() ?? "").ConfigureAwait(false);
}
/// <summary>
@@ -214,7 +214,7 @@ public class ConfigManager(IConfiguration configuration, ILogger<ConfigManager>
/// <param name="value">The value to set.</param>
public async Task SetAsync(string key, string value)
{
- await _lock.WaitAsync();
+ await _lock.WaitAsync().ConfigureAwait(false);
try
{
var parts = key.Split(':');
@@ -239,7 +239,7 @@ public class ConfigManager(IConfiguration configuration, ILogger<ConfigManager>
/// <param name="key">The configuration key to remove.</param>
public async Task RemoveAsync(string key)
{
- await _lock.WaitAsync();
+ await _lock.WaitAsync().ConfigureAwait(false);
try
{
var parts = key.Split(':');
diff --git a/optimizerDuck/Services/Customize/CustomizeRegistry.cs b/optimizerDuck/Services/Customize/CustomizeRegistry.cs
index 6d6672e..a8b2f06 100644
--- a/optimizerDuck/Services/Customize/CustomizeRegistry.cs
+++ b/optimizerDuck/Services/Customize/CustomizeRegistry.cs
@@ -100,22 +100,15 @@ public class CustomizeRegistry
Categories = categories;
IsPreloaded = true;
}
-
- /// <summary>Synchronous fallback for registration (used when preloading hasn't started yet, e.g., during DI page creation).</summary>
- public void RegisterCategories()
- {
- if (IsPreloaded)
- return;
-
- PreloadCategoriesAsync().GetAwaiter().GetResult();
- }
-
/// <summary>Builds the navigation items for the UI from the registered categories.</summary>
/// <returns>A sequence of <see cref="NavigationViewItem"/> instances mapped to customize pages.</returns>
public IEnumerable<NavigationViewItem> GetNavigationItems()
{
- if (Categories.Length == 0)
- RegisterCategories();
+ if (Categories.Length == 0 && !IsPreloaded)
+ _logger.LogWarning(
+ "GetNavigationItems() called before categories were preloaded, returning empty. "
+ + "Ensure EnsurePreloadedAsync() was awaited during startup."
+ );
return Categories
.Select(c => new NavigationViewItem
diff --git a/optimizerDuck/Services/Optimization/OptimizationService.cs b/optimizerDuck/Services/Optimization/OptimizationService.cs
index 4751dbf..d2869e1 100644
--- a/optimizerDuck/Services/Optimization/OptimizationService.cs
+++ b/optimizerDuck/Services/Optimization/OptimizationService.cs
@@ -65,7 +65,7 @@ public class OptimizationService(
var result = await ShellService.PowerShellAsync(
$"Checkpoint-Computer -Description \"{Shared.RestorePointName}\" -RestorePointType MODIFY_SETTINGS"
- );
+ ).ConfigureAwait(false);
if (IsFrequencyLimited(result.Stderr))
{
@@ -96,7 +96,7 @@ public class OptimizationService(
var enableResult = await ShellService.PowerShellAsync(
"Enable-ComputerRestore -Drive \"$env:SystemDrive\""
- );
+ ).ConfigureAwait(false);
if (enableResult.ExitCode != 0)
{
@@ -117,7 +117,7 @@ public class OptimizationService(
result = await ShellService.PowerShellAsync(
$"Checkpoint-Computer -Description \"{Shared.RestorePointName}\" -RestorePointType MODIFY_SETTINGS"
- );
+ ).ConfigureAwait(false);
if (IsFrequencyLimited(result.Stderr))
return RestorePointResult.FrequencyLimitReached;
@@ -177,12 +177,12 @@ public class OptimizationService(
Snapshot = systemInfoService.Snapshot,
StreamService = streamService,
}
- );
+ ).ConfigureAwait(false);
if (!string.IsNullOrWhiteSpace(applyResult.ErrorMessage))
{
if (scope.HasSuccessfulSteps)
- await TrySaveRevertDataAsync(scope, optimization);
+ await TrySaveRevertDataAsync(scope, optimization).ConfigureAwait(false);
return new OptimizationResult
{
@@ -205,7 +205,7 @@ public class OptimizationService(
);
var result = scope.ToResult();
- await TrySaveRevertDataAsync(scope, optimization);
+ await TrySaveRevertDataAsync(scope, optimization).ConfigureAwait(false);
return result;
}
@@ -227,7 +227,7 @@ public class OptimizationService(
FailedSteps = failedSteps,
};
- await TrySaveRevertDataAsync(scope, optimization);
+ await TrySaveRevertDataAsync(scope, optimization).ConfigureAwait(false);
return result;
}
@@ -258,7 +258,7 @@ public class OptimizationService(
IsIndeterminate = true,
}
);
- var result = await revertManager.RevertAsync(optimization, progress);
+ var result = await revertManager.RevertAsync(optimization, progress).ConfigureAwait(false);
progress?.Report(
new ProcessingProgress
{
@@ -290,14 +290,14 @@ public class OptimizationService(
.Select(Path.GetFileNameWithoutExtension)
.Where(f => f != null)
.ToHashSet(StringComparer.OrdinalIgnoreCase)!;
- });
+ }).ConfigureAwait(false);
foreach (var opt in optimizations)
{
var idStr = opt.Id.ToString();
if (revertFiles.Contains(idStr))
{
- var data = await RevertManager.GetRevertDataAsync(opt.Id);
+ var data = await RevertManager.GetRevertDataAsync(opt.Id).ConfigureAwait(false);
opt.State.IsApplied = data != null;
opt.State.AppliedAt = data?.AppliedAt;
}
@@ -344,7 +344,7 @@ public class OptimizationService(
optimizationId,
optimizationKey,
progress
- )
+ ).ConfigureAwait(false)
).FailedSteps;
}
@@ -414,7 +414,7 @@ public class OptimizationService(
try
{
using var retryScope = ExecutionScope.BeginForCapture(logger);
- success = await step.RetryAction();
+ success = await step.RetryAction().ConfigureAwait(false);
if (success)
{
@@ -450,7 +450,7 @@ public class OptimizationService(
optimizationKey ?? string.Empty,
step.Index, // Use original failed step's index
recoveredStep.RevertStep
- );
+ ).ConfigureAwait(false);
}
catch (Exception ex)
{
@@ -487,7 +487,7 @@ public class OptimizationService(
try
{
- await revertManager.SaveRevertDataAsync(scope);
+ await revertManager.SaveRevertDataAsync(scope).ConfigureAwait(false);
}
catch (Exception ex)
{
diff --git a/optimizerDuck/Services/Revert/RevertManager.cs b/optimizerDuck/Services/Revert/RevertManager.cs
index 02b14a5..f0c9a10 100644
--- a/optimizerDuck/Services/Revert/RevertManager.cs
+++ b/optimizerDuck/Services/Revert/RevertManager.cs
@@ -60,7 +60,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
AppliedAt = DateTime.Now,
Steps = steps,
}
- );
+ ).ConfigureAwait(false);
}
public async Task<RevertResult> RevertAsync(
@@ -75,7 +75,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
operationLogger
);
- var steps = await LoadStepsAsync(optimization.Id);
+ var steps = await LoadStepsAsync(optimization.Id).ConfigureAwait(false);
if (steps.Count == 0)
return new RevertResult
{
@@ -107,7 +107,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
try
{
- if (!await step.ExecuteAsync())
+ if (!await step.ExecuteAsync().ConfigureAwait(false))
throw new Exception(Translations.Revert_Error_StepFailed);
}
catch (Exception ex)
@@ -178,11 +178,11 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
throw new ArgumentException("Step index must be greater than 0", nameof(stepIndex));
var filePath = GetFilePath(id);
- var lockObj = await AcquireFileLockAsync(id);
+ var lockObj = await AcquireFileLockAsync(id).ConfigureAwait(false);
try
{
var data =
- await LoadAsync(filePath)
+ await LoadAsync(filePath).ConfigureAwait(false)
?? new RevertData
{
SchemaVersion = SchemaVersion,
@@ -206,7 +206,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
};
data.SchemaVersion = SchemaVersion;
- await WriteJsonAtomicAsync(filePath, data);
+ await WriteJsonAtomicAsync(filePath, data).ConfigureAwait(false);
var totalSteps = data.Steps.Count(s => s != null);
_logger.LogInformation(
@@ -224,13 +224,13 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
public static async Task<bool> IsAppliedAsync(Guid id)
{
- var data = await LoadAsync(GetFilePath(id));
+ var data = await LoadAsync(GetFilePath(id)).ConfigureAwait(false);
return data is { Steps.Length: > 0 };
}
public static async Task<RevertData?> GetRevertDataAsync(Guid id)
{
- return await LoadAsync(GetFilePath(id));
+ return await LoadAsync(GetFilePath(id)).ConfigureAwait(false);
}
public static void ClearAllRevertData(ILogger logger)
@@ -274,7 +274,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
{
try
{
- var json = await File.ReadAllTextAsync(path);
+ var json = await File.ReadAllTextAsync(path).ConfigureAwait(false);
if (string.IsNullOrWhiteSpace(json))
return null;
@@ -312,7 +312,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
}
catch (IOException) when (i < 2)
{
- await Task.Delay(50);
+ await Task.Delay(50).ConfigureAwait(false);
}
}
return null;
@@ -362,10 +362,10 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
private async Task WriteJsonAsync(Guid optimizationId, string path, RevertData data)
{
data.SchemaVersion = SchemaVersion;
- var lockObj = await AcquireFileLockAsync(optimizationId);
+ var lockObj = await AcquireFileLockAsync(optimizationId).ConfigureAwait(false);
try
{
- await WriteJsonAtomicAsync(path, data);
+ await WriteJsonAtomicAsync(path, data).ConfigureAwait(false);
var totalOperations = data.Steps.Count(s => s != null);
_logger.LogInformation("Saved {Total} operations to {Path}", totalOperations, path);
}
@@ -406,7 +406,7 @@ public class RevertManager(ILogger<RevertManager> _logger, ILoggerFactory _logge
private async Task<List<(int Index, IRevertStep Step)>> LoadStepsAsync(Guid id)
{
- var data = await LoadAsync(GetFilePath(id));
+ var data = await LoadAsync(GetFilePath(id)).ConfigureAwait(false);
if (data == null || data.Steps.Length == 0)
return [];
diff --git a/optimizerDuck/Services/System/SystemInfoService.cs b/optimizerDuck/Services/System/SystemInfoService.cs
index 61ac385..ad77e28 100644
--- a/optimizerDuck/Services/System/SystemInfoService.cs
+++ b/optimizerDuck/Services/System/SystemInfoService.cs
@@ -2218,24 +2218,24 @@ public sealed class SystemInfoService : IDisposable
var osTask = Task.Run(OsProvider.Get, ct);
var biosTask = Task.Run(BiosProvider.Get, ct);
- await Task.WhenAll(cpuTask, ramTask, gpusTask, diskTask, osTask, biosTask);
+ await Task.WhenAll(cpuTask, ramTask, gpusTask, diskTask, osTask, biosTask).ConfigureAwait(false);
- _cachedCpu = await cpuTask;
- _cachedOs = await osTask;
- _cachedBios = await biosTask;
- _cachedGpus = await gpusTask;
+ _cachedCpu = await cpuTask.ConfigureAwait(false);
+ _cachedOs = await osTask.ConfigureAwait(false);
+ _cachedBios = await biosTask.ConfigureAwait(false);
+ _cachedGpus = await gpusTask.ConfigureAwait(false);
var primaryGpu = GpuProvider.GetPrimary(_cachedGpus);
Snapshot = new SystemSnapshot
{
Cpu = _cachedCpu,
- Ram = await ramTask,
+ Ram = await ramTask.ConfigureAwait(false),
Os = _cachedOs,
Bios = _cachedBios,
Gpus = _cachedGpus,
PrimaryGpu = primaryGpu,
- Disk = await diskTask,
+ Disk = await diskTask.ConfigureAwait(false),
};
}
else
@@ -2245,7 +2245,7 @@ public sealed class SystemInfoService : IDisposable
var ramTask = Task.Run(RamProvider.Get, ct);
var diskTask = Task.Run(DiskProvider.Get, ct);
- await Task.WhenAll(ramTask, diskTask);
+ await Task.WhenAll(ramTask, diskTask).ConfigureAwait(false);
var gpus = _cachedGpus!;
var primaryGpu = GpuProvider.GetPrimary(gpus);
@@ -2253,12 +2253,12 @@ public sealed class SystemInfoService : IDisposable
Snapshot = new SystemSnapshot
{
Cpu = _cachedCpu!,
- Ram = await ramTask,
+ Ram = await ramTask.ConfigureAwait(false),
Os = _cachedOs!,
Bios = _cachedBios!,
Gpus = gpus,
PrimaryGpu = primaryGpu,
- Disk = await diskTask,
+ Disk = await diskTask.ConfigureAwait(false),
};
}
}
diff --git a/optimizerDuck/UI/Dialogs/LegalDialog.xaml b/optimizerDuck/UI/Dialogs/LegalDialog.xaml
index b0ee00c..e6e177c 100644
--- a/optimizerDuck/UI/Dialogs/LegalDialog.xaml
+++ b/optimizerDuck/UI/Dialogs/LegalDialog.xaml
@@ -37,22 +37,26 @@
Grid.Row="1"
Margin="0,12,0,12"
Style="{StaticResource ToolbarSurfaceStyle}">
- <StackPanel>
+ <StackPanel Orientation="Horizontal">
<ui:HyperlinkButton
Content="{ext:Loc Key=LegalDialog.Link.TermsOfService}"
- Icon="{ui:SymbolIcon DocumentText24}"
+ FontWeight="SemiBold"
+ VerticalContentAlignment="Center"
+ Icon="{ui:SymbolIcon DocumentText24, FontSize=18, Filled=True}"
NavigateUri="https://github.com/itsfatduck/optimizerDuck/blob/master/TERMS.md" />
<ui:HyperlinkButton
Margin="0,4,0,0"
+ FontWeight="SemiBold"
Content="{ext:Loc Key=LegalDialog.Link.PrivacyPolicy}"
- Icon="{ui:SymbolIcon ShieldLock24}"
+ Icon="{ui:SymbolIcon ShieldLock24, FontSize=18, Filled=True}"
NavigateUri="https://github.com/itsfatduck/optimizerDuck/blob/master/PRIVACY.md" />
<ui:HyperlinkButton
+ FontWeight="SemiBold"
Margin="0,4,0,0"
Content="{ext:Loc Key=LegalDialog.Link.Disclaimer}"
- Icon="{ui:SymbolIcon Warning24}"
+ Icon="{ui:SymbolIcon Warning24, FontSize=18, Filled=True}"
NavigateUri="https://github.com/itsfatduck/optimizerDuck/blob/master/DISCLAIMER.md" />
</StackPanel>
</Border>
diff --git a/optimizerDuck/UI/Dialogs/ScheduledTaskDetailsDialog.xaml b/optimizerDuck/UI/Dialogs/ScheduledTaskDetailsDialog.xaml
index 1cb1e46..afa40aa 100644
--- a/optimizerDuck/UI/Dialogs/ScheduledTaskDetailsDialog.xaml
+++ b/optimizerDuck/UI/Dialogs/ScheduledTaskDetailsDialog.xaml
@@ -19,12 +19,12 @@
</UserControl.Resources>
<StackPanel>
<Border
- Margin="0,0,0,12"
- Padding="{StaticResource CardPadding}"
- Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
- BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
- BorderThickness="1"
- CornerRadius="{StaticResource CornerRadiusMedium}">
+ Margin="0,0,0,12"
+ Padding="{StaticResource CardPadding}"
+ Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
+ BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
+ BorderThickness="1"
+ CornerRadius="{StaticResource CornerRadiusMedium}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -32,71 +32,69 @@
</Grid.ColumnDefinitions>
<Image
- Grid.Column="0"
- Width="40"
- Height="40"
- Margin="0,0,12,0"
- VerticalAlignment="Center"
- Source="{Binding LogoImage}"
- Stretch="UniformToFill" />
+ Grid.Column="0"
+ Width="40"
+ Height="40"
+ Margin="0,0,12,0"
+ VerticalAlignment="Center"
+ Source="{Binding LogoImage}"
+ Stretch="UniformToFill" />
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<DockPanel LastChildFill="False">
<ui:TextBlock
- FontTypography="BodyStrong"
- Text="{Binding Name}"
- TextWrapping="Wrap" />
+ FontTypography="BodyStrong"
+ Text="{Binding Name}"
+ TextWrapping="Wrap" />
<Border
- Margin="8,0,0,0"
- Padding="6,1"
- VerticalAlignment="Center"
- Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
- CornerRadius="4">
+ Margin="8,0,0,0"
+ Padding="6,1"
+ VerticalAlignment="Center"
+ Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
+ CornerRadius="4">
<ui:TextBlock
- VerticalAlignment="Center"
- Appearance="Tertiary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Header.Title}" />
+ VerticalAlignment="Center"
+ Appearance="Tertiary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Header.Title}" />
</Border>
<Border
- x:Name="StateBorder"
- Margin="8,0,0,0"
- Padding="6,1"
- VerticalAlignment="Center"
- CornerRadius="4">
+ x:Name="StateBorder"
+ Margin="8,0,0,0"
+ Padding="6,1"
+ VerticalAlignment="Center"
+ CornerRadius="4">
<StackPanel Orientation="Horizontal">
<ui:SymbolIcon
- x:Name="StateIcon"
- Margin="0,0,4,0"
- FontSize="10"
- Symbol="Circle24" />
+ x:Name="StateIcon"
+ Margin="0,0,4,0"
+ FontSize="10"
+ Symbol="Circle24" />
<ui:TextBlock
- VerticalAlignment="Center"
- FontTypography="Caption"
- Foreground="{Binding ElementName=StateIcon, Path=Foreground}"
- Text="{Binding State}" />
+ VerticalAlignment="Center"
+ FontTypography="Caption"
+ Foreground="{Binding ElementName=StateIcon, Path=Foreground}"
+ Text="{Binding State}" />
</StackPanel>
</Border>
</DockPanel>
<ui:TextBlock
- Margin="0,4,0,0"
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{Binding Description}"
- TextWrapping="Wrap"
- Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,4,0,0"
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{Binding Description}"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock
- Margin="0,2,0,0"
- Appearance="Disabled"
- FontTypography="Caption"
- Text="{Binding FullPath}"
- TextTrimming="CharacterEllipsis" />
+ Margin="0,2,0,0"
+ Appearance="Disabled"
+ FontTypography="Caption"
+ Text="{Binding FullPath}"
+ TextTrimming="CharacterEllipsis" />
- <ItemsControl ItemsSource="{Binding TriggerTypes}" Margin="0,6,0,0">
+ <ItemsControl Margin="0,6,0,0" ItemsSource="{Binding TriggerTypes}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
@@ -105,20 +103,20 @@
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border
- Margin="0,0,4,2"
- Padding="6,2"
- Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
- CornerRadius="4">
+ Margin="0,0,4,2"
+ Padding="6,2"
+ Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
+ CornerRadius="4">
<StackPanel Orientation="Horizontal">
<ui:SymbolIcon
- Margin="0,0,4,0"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Timer24" />
+ Margin="0,0,4,0"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Timer24" />
<ui:TextBlock
- VerticalAlignment="Center"
- FontTypography="Caption"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Text="{Binding}" />
+ VerticalAlignment="Center"
+ FontTypography="Caption"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Text="{Binding}" />
</StackPanel>
</Border>
</DataTemplate>
@@ -129,12 +127,12 @@
</Border>
<Border
- Margin="0,0,0,12"
- Padding="0"
- Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
- BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
- BorderThickness="1"
- CornerRadius="{StaticResource CornerRadiusMedium}">
+ Margin="0,0,0,12"
+ Padding="0"
+ Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
+ BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
+ BorderThickness="1"
+ CornerRadius="{StaticResource CornerRadiusMedium}">
<StackPanel>
<Grid Margin="14,12">
<Grid.ColumnDefinitions>
@@ -142,24 +140,22 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Person24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Person24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Author}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Author}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding Author}"
- Visibility="{Binding IsAuthorEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsAuthorEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding Author}"
+ Visibility="{Binding IsAuthorEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsAuthorEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -170,25 +166,23 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Timer24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Timer24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Triggers}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Triggers}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding TriggerSummary}"
- TextWrapping="Wrap"
- Visibility="{Binding IsTriggersEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsTriggersEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding TriggerSummary}"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsTriggersEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsTriggersEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -199,37 +193,35 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Play24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Play24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Action}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Action}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontFamily="Consolas"
- FontTypography="Body"
- Text="{Binding ActionSummary}"
- TextWrapping="Wrap"
- Visibility="{Binding IsActionEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsActionEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontFamily="Consolas"
+ FontTypography="Body"
+ Text="{Binding ActionSummary}"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsActionEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsActionEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
</StackPanel>
</Border>
<Border
- Padding="0"
- Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
- BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
- BorderThickness="1"
- CornerRadius="{StaticResource CornerRadiusMedium}">
+ Padding="0"
+ Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
+ BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
+ BorderThickness="1"
+ CornerRadius="{StaticResource CornerRadiusMedium}">
<StackPanel>
<Grid Margin="14,12">
<Grid.ColumnDefinitions>
@@ -239,45 +231,41 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="History24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="History24" />
<StackPanel Grid.Column="1" Margin="0,0,16,0">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.LastRun}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.LastRun}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding LastRunTime, StringFormat=g}"
- Visibility="{Binding IsLastRunEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsLastRunEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding LastRunTime, StringFormat=g}"
+ Visibility="{Binding IsLastRunEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsLastRunEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
<ui:SymbolIcon
- Grid.Column="2"
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="CalendarArrowRight24" />
+ Grid.Column="2"
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="CalendarArrowRight24" />
<StackPanel Grid.Column="3">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.NextRun}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.NextRun}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding NextRunTime, StringFormat=g}"
- Visibility="{Binding IsNextRunEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsNextRunEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding NextRunTime, StringFormat=g}"
+ Visibility="{Binding IsNextRunEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsNextRunEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -287,24 +275,22 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="CheckmarkCircle24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="CheckmarkCircle24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.LastResult}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.LastResult}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding LastRunResult}"
- Visibility="{Binding IsLastResultEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsLastResultEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding LastRunResult}"
+ Visibility="{Binding IsLastResultEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsLastResultEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
</StackPanel>
diff --git a/optimizerDuck/UI/Dialogs/StartupTaskDetailsPanel.xaml b/optimizerDuck/UI/Dialogs/StartupTaskDetailsPanel.xaml
index d3c5cfd..bec698d 100644
--- a/optimizerDuck/UI/Dialogs/StartupTaskDetailsPanel.xaml
+++ b/optimizerDuck/UI/Dialogs/StartupTaskDetailsPanel.xaml
@@ -19,12 +19,12 @@
</UserControl.Resources>
<StackPanel MinWidth="540">
<Border
- Margin="0,0,0,12"
- Padding="{StaticResource CardPadding}"
- Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
- BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
- BorderThickness="1"
- CornerRadius="{StaticResource CornerRadiusMedium}">
+ Margin="0,0,0,12"
+ Padding="{StaticResource CardPadding}"
+ Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
+ BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
+ BorderThickness="1"
+ CornerRadius="{StaticResource CornerRadiusMedium}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -32,66 +32,64 @@
</Grid.ColumnDefinitions>
<Image
- Grid.Column="0"
- Width="40"
- Height="40"
- Margin="0,0,12,0"
- VerticalAlignment="Center"
- Source="{Binding LogoImage}"
- Stretch="UniformToFill" />
+ Grid.Column="0"
+ Width="40"
+ Height="40"
+ Margin="0,0,12,0"
+ VerticalAlignment="Center"
+ Source="{Binding LogoImage}"
+ Stretch="UniformToFill" />
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<DockPanel LastChildFill="False">
<ui:TextBlock
- FontTypography="BodyStrong"
- Text="{Binding TaskName}"
- TextWrapping="Wrap" />
+ FontTypography="BodyStrong"
+ Text="{Binding TaskName}"
+ TextWrapping="Wrap" />
<Border
- Margin="8,0,0,0"
- Padding="6,1"
- VerticalAlignment="Center"
- Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
- CornerRadius="4">
+ Margin="8,0,0,0"
+ Padding="6,1"
+ VerticalAlignment="Center"
+ Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
+ CornerRadius="4">
<ui:TextBlock
- VerticalAlignment="Center"
- Appearance="Tertiary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Header.Title}" />
+ VerticalAlignment="Center"
+ Appearance="Tertiary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Header.Title}" />
</Border>
<Border
- x:Name="TaskStateBadge"
- Margin="8,0,0,0"
- Padding="6,1"
- VerticalAlignment="Center"
- CornerRadius="4">
+ x:Name="TaskStateBadge"
+ Margin="8,0,0,0"
+ Padding="6,1"
+ VerticalAlignment="Center"
+ CornerRadius="4">
<ui:TextBlock
- x:Name="TaskStateText"
- VerticalAlignment="Center"
- FontTypography="Caption"
- Foreground="{DynamicResource TextFillColorInverseBrush}"
- Text="" />
+ x:Name="TaskStateText"
+ VerticalAlignment="Center"
+ FontTypography="Caption"
+ Foreground="{DynamicResource TextFillColorInverseBrush}"
+ Text="" />
</Border>
</DockPanel>
<ui:TextBlock
- Margin="0,4,0,0"
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{Binding Description}"
- TextTrimming="CharacterEllipsis"
- TextWrapping="Wrap"
- Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,4,0,0"
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{Binding Description}"
+ TextTrimming="CharacterEllipsis"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock
- Margin="0,2,0,0"
- Appearance="Disabled"
- FontTypography="Caption"
- Text="{Binding TaskPath}"
- TextTrimming="CharacterEllipsis" />
+ Margin="0,2,0,0"
+ Appearance="Disabled"
+ FontTypography="Caption"
+ Text="{Binding TaskPath}"
+ TextTrimming="CharacterEllipsis" />
- <ItemsControl ItemsSource="{Binding TriggerTypes}" Margin="0,6,0,0">
+ <ItemsControl Margin="0,6,0,0" ItemsSource="{Binding TriggerTypes}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
@@ -100,21 +98,21 @@
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border
- Margin="0,0,4,2"
- Padding="6,2"
- Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
- CornerRadius="4">
+ Margin="0,0,4,2"
+ Padding="6,2"
+ Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
+ CornerRadius="4">
<StackPanel Orientation="Horizontal">
<ui:SymbolIcon
- Margin="0,0,4,0"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Timer24" />
+ Margin="0,0,4,0"
+ FontSize="14"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Timer24" />
<ui:TextBlock
- VerticalAlignment="Center"
- FontTypography="Caption"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Text="{Binding}" />
+ VerticalAlignment="Center"
+ FontTypography="Caption"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Text="{Binding}" />
</StackPanel>
</Border>
</DataTemplate>
@@ -125,11 +123,11 @@
</Border>
<Border
- Padding="0"
- Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
- BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
- BorderThickness="1"
- CornerRadius="{StaticResource CornerRadiusMedium}">
+ Padding="0"
+ Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
+ BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
+ BorderThickness="1"
+ CornerRadius="{StaticResource CornerRadiusMedium}">
<StackPanel>
<Grid Margin="14,12">
<Grid.ColumnDefinitions>
@@ -137,21 +135,21 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="AppGeneric24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="TextCaseTitle24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Name}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Name}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding TaskName}"
- TextWrapping="Wrap" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding TaskName}"
+ TextWrapping="Wrap" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -162,25 +160,23 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="TextDescription24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="TextDescription24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Description}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Description}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding Description}"
- TextWrapping="Wrap"
- Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding Description}"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsDescriptionEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -191,22 +187,22 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Folder24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Folder24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Path}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Path}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontFamily="Consolas"
- FontTypography="Body"
- Text="{Binding TaskPath}"
- TextWrapping="Wrap" />
+ Margin="0,2,0,0"
+ FontFamily="Consolas"
+ FontTypography="Body"
+ Text="{Binding TaskPath}"
+ TextWrapping="Wrap" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -217,25 +213,23 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Timer24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Timer24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Triggers}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Triggers}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontTypography="Body"
- Text="{Binding TriggerSummary}"
- TextWrapping="Wrap"
- Visibility="{Binding IsTriggersEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsTriggersEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontTypography="Body"
+ Text="{Binding TriggerSummary}"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsTriggersEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsTriggersEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
<Separator Margin="14,0" />
@@ -246,26 +240,24 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon
- Margin="0,0,10,0"
- VerticalAlignment="Top"
- FontSize="14"
- Foreground="{DynamicResource TextFillColorSecondaryBrush}"
- Symbol="Play24" />
+ Margin="0,0,10,0"
+ VerticalAlignment="Center"
+ FontSize="24"
+ Foreground="{DynamicResource TextFillColorSecondaryBrush}"
+ Symbol="Play24" />
<StackPanel Grid.Column="1">
<ui:TextBlock
- Appearance="Secondary"
- FontTypography="Caption"
- Text="{ext:Loc ScheduledTasks.Details.Action}" />
+ Appearance="Secondary"
+ FontTypography="Caption"
+ Text="{ext:Loc ScheduledTasks.Details.Action}" />
<ui:TextBlock
- Margin="0,2,0,0"
- FontFamily="Consolas"
- FontTypography="Body"
- Text="{Binding ActionSummary}"
- TextWrapping="Wrap"
- Visibility="{Binding IsActionEmpty, Converter={StaticResource InverseBoolToVis}}" />
- <controls:EmptyBadge
- Margin="0,2,0,0"
- Visibility="{Binding IsActionEmpty, Converter={StaticResource BoolToVis}}" />
+ Margin="0,2,0,0"
+ FontFamily="Consolas"
+ FontTypography="Body"
+ Text="{Binding ActionSummary}"
+ TextWrapping="Wrap"
+ Visibility="{Binding IsActionEmpty, Converter={StaticResource InverseBoolToVis}}" />
+ <controls:EmptyBadge Margin="0,2,0,0" Visibility="{Binding IsActionEmpty, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
</StackPanel>
diff --git a/optimizerDuck/UI/Pages/DiskCleanupPage.xaml b/optimizerDuck/UI/Pages/DiskCleanupPage.xaml
index dc8f5c0..ae5490c 100644
--- a/optimizerDuck/UI/Pages/DiskCleanupPage.xaml
+++ b/optimizerDuck/UI/Pages/DiskCleanupPage.xaml
@@ -104,9 +104,7 @@
VerticalAlignment="Center"
Orientation="Horizontal">
<!-- Select All / Deselect All -->
- <ui:Button
- Cursor="Hand"
- Command="{Binding ViewModel.ToggleSelectAllCommand}">
+ <ui:Button Command="{Binding ViewModel.ToggleSelectAllCommand}" Cursor="Hand">
<ui:Button.Style>
<Style BasedOn="{StaticResource {x:Type ui:Button}}" TargetType="ui:Button">
<Setter Property="Appearance" Value="Success" />
@@ -243,11 +241,11 @@
Margin="0,0,14,0"
VerticalAlignment="Center"
Background="{DynamicResource ControlFillColorSecondaryBrush}"
- CornerRadius="20">
+ CornerRadius="10">
<ui:SymbolIcon
HorizontalAlignment="Center"
VerticalAlignment="Center"
- FontSize="20"
+ FontSize="30"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Symbol="{Binding Icon}" />
</Border>
diff --git a/optimizerDuck/UI/Pages/Optimize/Categories/OptimizationPage.xaml b/optimizerDuck/UI/Pages/Optimize/Categories/OptimizationPage.xaml
index 95a34a7..f198048 100644
--- a/optimizerDuck/UI/Pages/Optimize/Categories/OptimizationPage.xaml
+++ b/optimizerDuck/UI/Pages/Optimize/Categories/OptimizationPage.xaml
@@ -44,7 +44,7 @@
<!-- Main Content -->
<Grid RowDefinitions="Auto,*" Visibility="{Binding ViewModel.IsLoading, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
<!-- Toolbar -->
- <Border Grid.Row="0" Style="{StaticResource ToolbarSurfaceStyle}">
+ <Border Grid.Row="0" Style="{StaticResource ToolbarSurfaceStyle}" Padding="8,6">
<WrapPanel VerticalAlignment="Center" Orientation="Horizontal">
<!-- Search -->
<ui:TextBox
@@ -111,7 +111,7 @@
<ui:SymbolIcon
Margin="0,0,6,0"
HorizontalAlignment="Left"
- Symbol="Filter24" />
+ Symbol="ArrowSort24" />
<TextBlock Grid.Column="1" HorizontalAlignment="Left">
<Run Text="{ext:Loc Common.SortBy.Risk}" />
<Run Text=" &amp; " />
@@ -402,6 +402,7 @@
<StackPanel Orientation="Horizontal">
<ui:SymbolIcon
Margin="0,0,6,0"
+ Filled="True"
Foreground="{DynamicResource TextFillColorInverseBrush}"
Symbol="{Binding RiskVisual.Icon}" />
diff --git a/optimizerDuck/UI/Pages/ScheduledTasksPage.xaml b/optimizerDuck/UI/Pages/ScheduledTasksPage.xaml
index fa0f727..7254ec3 100644
--- a/optimizerDuck/UI/Pages/ScheduledTasksPage.xaml
+++ b/optimizerDuck/UI/Pages/ScheduledTasksPage.xaml
@@ -256,7 +256,7 @@
<ui:SymbolIcon
x:Name="StateIcon"
Margin="0,0,4,0"
- FontSize="10">
+ FontSize="14">
<ui:SymbolIcon.Style>
<Style TargetType="ui:SymbolIcon">
<Setter Property="Symbol" Value="Circle24" />
@@ -347,9 +347,9 @@
VerticalAlignment="Center"
Orientation="Horizontal">
<ui:ToggleSwitch
- IsChecked="{Binding IsEnabled, Mode=TwoWay}"
- OffContent="{ext:Loc Common.Toggle.Off}"
- OnContent="{ext:Loc Common.Toggle.On}" />
+ IsChecked="{Binding IsEnabled, Mode=TwoWay}"
+ OffContent="{ext:Loc Common.Toggle.Off}"
+ OnContent="{ext:Loc Common.Toggle.On}" />
<ui:Button
Margin="0,0,4,0"
Padding="8"
@@ -386,7 +386,7 @@
</ui:Button.Style>
</ui:Button>
<!-- Stop: visible only when running -->
-
+
<ui:Button
Margin="0,0,4,0"
Padding="8"
@@ -408,7 +408,7 @@
Icon="{ui:SymbolIcon Delete24,
FontSize=16}"
ToolTip="{ext:Loc ScheduledTasks.Action.Delete}" />
-
+
</StackPanel>
</Grid>
</Border>
diff --git a/optimizerDuck/UI/Pages/StartupManagerPage.xaml b/optimizerDuck/UI/Pages/StartupManagerPage.xaml
index ccc9be0..7c54d0a 100644
--- a/optimizerDuck/UI/Pages/StartupManagerPage.xaml
+++ b/optimizerDuck/UI/Pages/StartupManagerPage.xaml
@@ -143,7 +143,7 @@
Padding="8,2"
VerticalAlignment="Center"
Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
- CornerRadius="10">
+ CornerRadius="4">
<ui:TextBlock
VerticalAlignment="Center"
Appearance="Tertiary"
@@ -319,7 +319,7 @@
<!-- ═══════════ Scheduled Tasks Section ═══════════ -->
<ui:CardExpander
Margin="0,0,0,12"
- Icon="{ui:SymbolIcon CalculatorArrowClockwise24}"
+ Icon="{ui:SymbolIcon TabDesktopArrowClockwise24}"
IsExpanded="True"
Visibility="{Binding ViewModel.HasTasks, Converter={StaticResource BooleanToVisibilityConverter}}">
<ui:CardExpander.Header>
@@ -533,7 +533,7 @@
Icon="{ui:SymbolIcon Info24,
FontSize=16}"
ToolTip="{ext:Loc ScheduledTasks.Action.Details}" />
-
+
</StackPanel>
</Grid>
</Border>
diff --git a/optimizerDuck/UI/Styles/NavigationViewOverride.xaml b/optimizerDuck/UI/Styles/NavigationViewOverride.xaml
index d3d068b..4875b0d 100644
--- a/optimizerDuck/UI/Styles/NavigationViewOverride.xaml
+++ b/optimizerDuck/UI/Styles/NavigationViewOverride.xaml
@@ -47,7 +47,7 @@
VerticalAlignment="Center"
Content="{TemplateBinding Icon}"
Focusable="False"
- TextElement.FontSize="16"
+ TextElement.FontSize="20"
TextElement.Foreground="{DynamicResource NavigationViewItemForeground}" />
</Grid>
diff --git a/optimizerDuck/UI/Windows/MainWindow.xaml b/optimizerDuck/UI/Windows/MainWindow.xaml
index e434222..0a2c6cc 100644
--- a/optimizerDuck/UI/Windows/MainWindow.xaml
+++ b/optimizerDuck/UI/Windows/MainWindow.xaml
@@ -2,10 +2,10 @@
x:Class="optimizerDuck.UI.Windows.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:config="clr-namespace:optimizerDuck.Services.Configuration"
xmlns:controls="clr-namespace:optimizerDuck.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:extensions="clr-namespace:optimizerDuck.Common.Extensions"
- xmlns:config="clr-namespace:optimizerDuck.Services.Configuration"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="clr-namespace:optimizerDuck.UI.Pages"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
@@ -51,7 +51,7 @@
<controls:FilledNavigationViewItem
Content="{extensions:Loc Sidebar.Optimize}"
Cursor="Hand"
- Icon="{ui:SymbolIcon Rocket24}"
+ Icon="{ui:SymbolIcon Flash24}"
TargetPageType="{x:Type pages:OptimizePage}" />
<controls:FilledNavigationViewItem
@@ -72,13 +72,13 @@
<controls:FilledNavigationViewItem
Content="{extensions:Loc Sidebar.StartupManager}"
Cursor="Hand"
- Icon="{ui:SymbolIcon WindowArrowUp24}"
+ Icon="{ui:SymbolIcon Power24}"
TargetPageType="{x:Type pages:StartupManagerPage}" />
<controls:FilledNavigationViewItem
Content="{extensions:Loc Sidebar.ScheduledTasks}"
Cursor="Hand"
- Icon="{ui:SymbolIcon CalendarLtr24}"
+ Icon="{ui:SymbolIcon TabDesktopArrowClockwise24}"
TargetPageType="{x:Type pages:ScheduledTasksPage}" />
<controls:FilledNavigationViewItem