From c76775d82e6091cd2ee2d4432d040cb5b80b9b45 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Mon, 11 Aug 2025 10:40:59 +0200 Subject: [PATCH] BewoAppInfo --- BeWo/BeWo.csproj | 1 + BeWo/BeWoApp.xaml.cs | 20 ++++---------------- BeWo/BeWoAppInfo.cs | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 BeWo/BeWoAppInfo.cs diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 84455077f..3fa124c68 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -93,6 +93,7 @@ + diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 9e5087528..c1ae8c9b0 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -52,7 +52,6 @@ namespace BeWo private static EmployeeDC _LoggedOnEmployee; private static UserDC _LoggedOnUser; private static MandatorDC _Mandator; - private static bool _IsInDeveloperMode; public static LoginControl LoginControl; public static MainControl MainControl; @@ -62,8 +61,7 @@ namespace BeWo public static string Version = "Version 3.26 - 1.3 AI Test"; public static int RenderTier = 0; - public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject()); - + internal static string IpAddress = string.Empty; internal static string Tenant = string.Empty; internal static string ServerName = string.Empty; @@ -83,17 +81,7 @@ namespace BeWo public static BeWoApp CurrentBeWo => Current as BeWoApp; public static Dictionary ICD10Diagnosis { get; set; } - public static bool IsInDeveloperMode { - get => _IsInDeveloperMode; - set - { - if(IsInDeveloperMode == value) - return; - - _IsInDeveloperMode = value; - CurrentBeWo.FirePropertyChanged(nameof(IsInDeveloperMode)); - } - } + public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject()); public static EmployeeDC LoggedOnEmployee { @@ -677,7 +665,7 @@ namespace BeWo BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths = AppSettings.HilfeplanAuslaufAuswahl; - if (IsInDeveloperMode) + if (BeWoAppInfo.IsInDeveloperMode) { applyDeveloperMode(); } @@ -1039,7 +1027,7 @@ namespace BeWo if(e.Args.Contains("/bewodevmode") || e.Args.Contains("--bewodevmode")) { - IsInDeveloperMode = true; + BeWoAppInfo.IsInDeveloperMode = true; } //if(e.Args.LastOrDefault(x => x.StartsWith("/timeout:") || x.StartsWith("--timeout:")) is string str) diff --git a/BeWo/BeWoAppInfo.cs b/BeWo/BeWoAppInfo.cs new file mode 100644 index 000000000..4ee9bd078 --- /dev/null +++ b/BeWo/BeWoAppInfo.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo +{ + public static class BeWoAppInfo + { + private static bool _IsInDeveloperMode; + + public static bool IsInDeveloperMode + { + get => _IsInDeveloperMode; + set + { + if (IsInDeveloperMode == value) + return; + + _IsInDeveloperMode = value; + BeWoApp.CurrentBeWo.FirePropertyChanged(nameof(IsInDeveloperMode)); + } + } + } +}