From 600c0460ffdc7fa091ed62eb8ae03e2f8f7880d9 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 11 Sep 2024 14:34:48 +0200 Subject: [PATCH] =?UTF-8?q?Geht=20nicht=20so,=20wie=20ich=20es=20mir=20vor?= =?UTF-8?q?gestellt=20hab.=20=C3=9Cberlege=20mir=20was=20anderes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +--- BeWo/DebugConfig.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 BeWo/DebugConfig.cs diff --git a/.gitignore b/.gitignore index 8bc2c8d4a..ba03d13d0 100644 --- a/.gitignore +++ b/.gitignore @@ -643,6 +643,4 @@ obj /ReportImp/demo_Sozio/SoziotherapieRechnung.Designer.cs /ReportImp/demo_Sozio/SoziotherapieRechnung.cs /ReportImp/demo_Sozio/SoziotherapieRechnung.resx -/ReportImp/demo_Sozio/demo_Sozio.csproj - -BeWo/DebugConfig.cs \ No newline at end of file +/ReportImp/demo_Sozio/demo_Sozio.csproj \ No newline at end of file diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs new file mode 100644 index 000000000..904ee51c2 --- /dev/null +++ b/BeWo/DebugConfig.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo +{ + public enum DebugConfigMode + { + SimpleAutoLogin, + FeatureWohnhilfe + } + + public class DebugConfig + { + private static DebugConfig _CurrentConfig; + public static DebugConfig CurrentConfig + { + get + { + #if DEBUG + + return _CurrentConfig ?? (_CurrentConfig = SimpleAutoLogin); + + #endif + + return null; + } + } + + + public DebugConfigMode DebugConfigMode { get; set; } + + public bool AutoLogin { get; set; } + public UIContext? SelectView { get; set; } + + public static DebugConfig SimpleAutoLogin => new DebugConfig() + { + DebugConfigMode = DebugConfigMode.SimpleAutoLogin, + AutoLogin = true + }; + + public static DebugConfig FeatureWohnhilfe => new DebugConfig() + { + DebugConfigMode = DebugConfigMode.FeatureWohnhilfe, + AutoLogin = true, + SelectView = UIContext.Customer + }; + } +}