This commit is contained in:
parent
8ef4ae0fb3
commit
b2e98ff8dc
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Configuration;
|
||||||
|
|
||||||
namespace Volian.Base.Library
|
namespace Volian.Base.Library
|
||||||
{
|
{
|
||||||
@ -15,13 +16,48 @@ namespace Volian.Base.Library
|
|||||||
// <add key ="Debug" value ="false"/>
|
// <add key ="Debug" value ="false"/>
|
||||||
// For DataLoader, this is set via the Debug checkbox on the form.
|
// For DataLoader, this is set via the Debug checkbox on the form.
|
||||||
|
|
||||||
private static bool _DebugMode = true;
|
private static bool WasLoaded = false;
|
||||||
|
private static bool _DebugMode = false;
|
||||||
public static bool DebugMode
|
public static bool DebugMode
|
||||||
{
|
{
|
||||||
get { return _DebugMode; }
|
get
|
||||||
|
{
|
||||||
|
if (!WasLoaded) LoadOperatingMode();
|
||||||
|
return _DebugMode;
|
||||||
|
}
|
||||||
set { _DebugMode = value; }
|
set { _DebugMode = value; }
|
||||||
}
|
}
|
||||||
|
private static bool _DemoMode = false;
|
||||||
|
public static bool DemoMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!WasLoaded) LoadOperatingMode();
|
||||||
|
return _DemoMode;
|
||||||
|
}
|
||||||
|
set { _DemoMode = value; }
|
||||||
|
}
|
||||||
|
private static bool _ProductionMode = true; // default to OperatingMode to production
|
||||||
|
public static bool ProductionMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!WasLoaded) LoadOperatingMode();
|
||||||
|
return _ProductionMode;
|
||||||
|
}
|
||||||
|
set { _ProductionMode = value; }
|
||||||
|
}
|
||||||
|
private static void LoadOperatingMode()
|
||||||
|
{
|
||||||
|
string opMode = ConfigurationManager.AppSettings["OperatingMode"];
|
||||||
|
if (opMode != null && opMode != "")
|
||||||
|
{
|
||||||
|
_DebugMode = opMode.ToUpper() == "DEBUG";
|
||||||
|
_DemoMode = opMode.ToUpper() == "DEMO";
|
||||||
|
_ProductionMode = opMode.ToUpper() == "PRODUCTION";
|
||||||
|
}
|
||||||
|
WasLoaded = true;
|
||||||
|
}
|
||||||
private static string _TemporaryFolder = null;
|
private static string _TemporaryFolder = null;
|
||||||
public static string TemporaryFolder
|
public static string TemporaryFolder
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user