Geht nicht so, wie ich es mir vorgestellt hab. Überlege mir was anderes
This commit is contained in:
51
BeWo/DebugConfig.cs
Normal file
51
BeWo/DebugConfig.cs
Normal file
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user