From 97735cbcd74961c0cb17f54c701c51e7d8879cd4 Mon Sep 17 00:00:00 2001 From: Maksim Khomutov Date: Mon, 16 Dec 2024 18:11:56 +1100 Subject: [PATCH 1/6] reduce usage of Catel.IO.Path.GetApplicationDataDirectory() --- src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs b/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs index 3b762c121..c331b3e25 100644 --- a/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs +++ b/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs @@ -1,9 +1,12 @@ namespace Orchestra { - using System.IO; + using Catel.IO; + using Catel.IoC; + using Catel.Services; + using Path = System.IO.Path; public static class TaskRunnerEnvironment { - public static readonly string CurrentLogFileName = Path.Combine(Catel.IO.Path.GetApplicationDataDirectory(), "current.log"); + public static readonly string CurrentLogFileName = Path.Combine(ServiceLocator.Default.ResolveType()?.GetApplicationDataDirectory(ApplicationDataTarget.UserRoaming) ?? Catel.IO.Path.GetApplicationDataDirectory(), "current.log"); } } From 3f27141a92243fdcf1689d28b4baafb6168089f0 Mon Sep 17 00:00:00 2001 From: Maksim Khomutov Date: Mon, 16 Dec 2024 18:16:48 +1100 Subject: [PATCH 2/6] remove net6.0 --- src/Orchestra.Core/Orchestra.Core.csproj | 2 +- src/Orchestra.Shell.MahApps/Orchestra.Shell.MahApps.csproj | 2 +- .../Orchestra.Shell.Ribbon.Fluent.csproj | 2 +- .../Orchestra.Shell.TaskRunner.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Orchestra.Core/Orchestra.Core.csproj b/src/Orchestra.Core/Orchestra.Core.csproj index 54d1b7ba8..02244679e 100644 --- a/src/Orchestra.Core/Orchestra.Core.csproj +++ b/src/Orchestra.Core/Orchestra.Core.csproj @@ -1,6 +1,6 @@  - net6.0-windows;net8.0-windows + net8.0-windows Orchestra.Core Orchestra en-US diff --git a/src/Orchestra.Shell.MahApps/Orchestra.Shell.MahApps.csproj b/src/Orchestra.Shell.MahApps/Orchestra.Shell.MahApps.csproj index 4b625a145..b9884c0bf 100644 --- a/src/Orchestra.Shell.MahApps/Orchestra.Shell.MahApps.csproj +++ b/src/Orchestra.Shell.MahApps/Orchestra.Shell.MahApps.csproj @@ -1,6 +1,6 @@  - net6.0-windows;net8.0-windows + net8.0-windows Orchestra.Shell.MahApps Orchestra en-US diff --git a/src/Orchestra.Shell.Ribbon.Fluent/Orchestra.Shell.Ribbon.Fluent.csproj b/src/Orchestra.Shell.Ribbon.Fluent/Orchestra.Shell.Ribbon.Fluent.csproj index 3056f3c29..749c74a7d 100644 --- a/src/Orchestra.Shell.Ribbon.Fluent/Orchestra.Shell.Ribbon.Fluent.csproj +++ b/src/Orchestra.Shell.Ribbon.Fluent/Orchestra.Shell.Ribbon.Fluent.csproj @@ -1,6 +1,6 @@  - net6.0-windows;net8.0-windows + net8.0-windows Orchestra.Shell.Ribbon.Fluent Orchestra en-US diff --git a/src/Orchestra.Shell.TaskRunner/Orchestra.Shell.TaskRunner.csproj b/src/Orchestra.Shell.TaskRunner/Orchestra.Shell.TaskRunner.csproj index 8c85a2e3d..d1f363258 100644 --- a/src/Orchestra.Shell.TaskRunner/Orchestra.Shell.TaskRunner.csproj +++ b/src/Orchestra.Shell.TaskRunner/Orchestra.Shell.TaskRunner.csproj @@ -1,6 +1,6 @@  - net6.0-windows;net8.0-windows + net8.0-windows Orchestra.Shell.TaskRunner Orchestra en-US From dd3e6844f73f66db7003389415a1bc06660fd344 Mon Sep 17 00:00:00 2001 From: Maksim Khomutov Date: Mon, 16 Dec 2024 18:20:15 +1100 Subject: [PATCH 3/6] update Orc.Controls --- src/Orchestra.Core/Orchestra.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchestra.Core/Orchestra.Core.csproj b/src/Orchestra.Core/Orchestra.Core.csproj index 02244679e..c85504c79 100644 --- a/src/Orchestra.Core/Orchestra.Core.csproj +++ b/src/Orchestra.Core/Orchestra.Core.csproj @@ -35,7 +35,7 @@ - + From 1cb635d7c044c864e6b0d752df114a4d6d11552a Mon Sep 17 00:00:00 2001 From: Maksim Khomutov Date: Mon, 16 Dec 2024 18:35:28 +1100 Subject: [PATCH 4/6] fix build error --- src/Orchestra.Core/Behaviors/RememberWindowSize.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Orchestra.Core/Behaviors/RememberWindowSize.cs b/src/Orchestra.Core/Behaviors/RememberWindowSize.cs index bf9bcdd34..899c7f972 100644 --- a/src/Orchestra.Core/Behaviors/RememberWindowSize.cs +++ b/src/Orchestra.Core/Behaviors/RememberWindowSize.cs @@ -2,7 +2,9 @@ { using System; using System.Windows; + using Catel.IoC; using Catel.Logging; + using Catel.Services; using Catel.Windows.Interactivity; using Orc.Controls; @@ -44,7 +46,8 @@ protected override void OnAssociatedObjectLoaded() window.SetCurrentValue(Window.ResizeModeProperty, ResizeMode.CanResize); } - window.LoadWindowSize(RememberWindowState); + var appDataService = ServiceLocator.Default.ResolveType(); + appDataService?.LoadWindowSize(window, RememberWindowState); switch (window.WindowStartupLocation) { @@ -77,7 +80,9 @@ protected override void OnAssociatedObjectUnloaded() private void OnWindowClosed(object? sender, EventArgs e) { - AssociatedObject.SaveWindowSize(); + var window = AssociatedObject; + var appDataService = ServiceLocator.Default.ResolveType(); + appDataService?.SaveWindowSize(window); } } } From c23d2dabcefdfca039ca41ff117bad14513bd009 Mon Sep 17 00:00:00 2001 From: Maksim Khomutov Date: Wed, 18 Dec 2024 01:22:35 +1100 Subject: [PATCH 5/6] use ResolveRequiredType for IAppDataService --- src/Orchestra.Core/Behaviors/RememberWindowSize.cs | 8 ++++---- src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Orchestra.Core/Behaviors/RememberWindowSize.cs b/src/Orchestra.Core/Behaviors/RememberWindowSize.cs index 899c7f972..40f9797f2 100644 --- a/src/Orchestra.Core/Behaviors/RememberWindowSize.cs +++ b/src/Orchestra.Core/Behaviors/RememberWindowSize.cs @@ -46,8 +46,8 @@ protected override void OnAssociatedObjectLoaded() window.SetCurrentValue(Window.ResizeModeProperty, ResizeMode.CanResize); } - var appDataService = ServiceLocator.Default.ResolveType(); - appDataService?.LoadWindowSize(window, RememberWindowState); + var appDataService = ServiceLocator.Default.ResolveRequiredType(); + appDataService.LoadWindowSize(window, RememberWindowState); switch (window.WindowStartupLocation) { @@ -81,8 +81,8 @@ protected override void OnAssociatedObjectUnloaded() private void OnWindowClosed(object? sender, EventArgs e) { var window = AssociatedObject; - var appDataService = ServiceLocator.Default.ResolveType(); - appDataService?.SaveWindowSize(window); + var appDataService = ServiceLocator.Default.ResolveRequiredType(); + appDataService.SaveWindowSize(window); } } } diff --git a/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs b/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs index c331b3e25..4c5d2d8d3 100644 --- a/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs +++ b/src/Orchestra.Shell.TaskRunner/TaskRunnerEnvironment.cs @@ -7,6 +7,6 @@ public static class TaskRunnerEnvironment { - public static readonly string CurrentLogFileName = Path.Combine(ServiceLocator.Default.ResolveType()?.GetApplicationDataDirectory(ApplicationDataTarget.UserRoaming) ?? Catel.IO.Path.GetApplicationDataDirectory(), "current.log"); + public static readonly string CurrentLogFileName = Path.Combine(ServiceLocator.Default.ResolveRequiredType().GetApplicationDataDirectory(ApplicationDataTarget.UserRoaming), "current.log"); } } From c03b461f196d6dfbec148b92f4ac322aeb625e33 Mon Sep 17 00:00:00 2001 From: Maksim Khomutov Date: Wed, 18 Dec 2024 09:47:51 +1100 Subject: [PATCH 6/6] update stable cotfixed components --- src/Orchestra.Core/Orchestra.Core.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchestra.Core/Orchestra.Core.csproj b/src/Orchestra.Core/Orchestra.Core.csproj index c85504c79..1f1a3b873 100644 --- a/src/Orchestra.Core/Orchestra.Core.csproj +++ b/src/Orchestra.Core/Orchestra.Core.csproj @@ -35,9 +35,9 @@ - + - +