Titano: editor, import/archive screens, analysis and render jobs, server sync — in progress #2

Merged
Alby96 merged 86 commits from claude/keen-knuth-uhxv8w into main 2026-10-05 23:55:39 +02:00
Showing only changes of commit b6533b4c1c - Show all commits
@@ -290,7 +290,6 @@ public sealed class ScreenSmokeTests
/// </summary>
internal static class ScreenHost
{
private static readonly Uri SectionTemplates = new("pack://application:,,,/Titano;component/Shell/SectionTemplates.xaml", UriKind.Absolute);
private static readonly Lazy<Dispatcher> Dispatcher = new(Start, LazyThreadSafetyMode.ExecutionAndPublication);
public static Task RunAsync(Func<Task> body) => Dispatcher.Value.InvokeAsync(body).Task.Unwrap();
@@ -317,10 +316,13 @@ internal static class ScreenHost
}
dispatcher!.Invoke(() =>
{
// pack:// URIs parse only once an Application exists (it registers the scheme), so this one is built here,
// not in a static field: the first WPF test of a run may be the one that starts the Application.
var sectionTemplates = new Uri("pack://application:,,,/Titano;component/Shell/SectionTemplates.xaml", UriKind.Absolute);
var current = Application.Current;
AppResources.Merge(current);
if (!current.Resources.MergedDictionaries.Any(d => d.Source == SectionTemplates))
current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = SectionTemplates });
if (!current.Resources.MergedDictionaries.Any(d => d.Source == sectionTemplates))
current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = sectionTemplates });
});
return dispatcher;
}