Files
BeWoPlaner/BeWo/DebugConfig.cs
2024-09-19 15:34:32 +02:00

60 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo
{
public enum DebugConfigMode
{
SimpleAutoLogin,
FeatureCustomerWohnhilfe,
FeatureWohnheimWohneinheit
}
public class DebugConfig
{
private static DebugConfig _CurrentConfig;
public static DebugConfig CurrentConfig
{
get
{
#if DEBUG
return _CurrentConfig ?? (_CurrentConfig = Feature_Customer_Wohnhilfe);
#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 Feature_Customer_Wohnhilfe => new DebugConfig()
{
DebugConfigMode = DebugConfigMode.FeatureCustomerWohnhilfe,
AutoLogin = true,
SelectView = UIContext.Customer
};
public static DebugConfig Feature_Wohnheim_Wohneinheit => new DebugConfig()
{
DebugConfigMode = DebugConfigMode.FeatureWohnheimWohneinheit,
AutoLogin = true,
SelectView = UIContext.Wohnheim
};
}
}