BewoAppInfo

This commit is contained in:
2025-08-11 10:40:59 +02:00
parent 6610ad9eb2
commit c76775d82e
3 changed files with 31 additions and 16 deletions

View File

@@ -93,6 +93,7 @@
</StartupObject>
</PropertyGroup>
<ItemGroup>
<Compile Include="BeWoAppInfo.cs" />
<Compile Include="Converter\AddressToStringConverter.cs" />
<Compile Include="Converter\ComparisonConverter.cs" />
<Compile Include="Converter\NewlineConverter.cs" />

View File

@@ -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<string, string> 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)

26
BeWo/BeWoAppInfo.cs Normal file
View File

@@ -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));
}
}
}
}