mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-05 15:54:50 +00:00
Exposes DoNotStartOnNextBoot property on the Debug class properly.
This commit is contained in:
@@ -28,6 +28,8 @@ namespace PepperDash.Core
|
||||
|
||||
public static int Level { get; private set; }
|
||||
|
||||
public static bool DoNotStartOnNextBoot { get; private set; }
|
||||
|
||||
static DebugContextCollection Contexts;
|
||||
|
||||
static int SaveTimeoutMs = 30000;
|
||||
@@ -81,7 +83,10 @@ namespace PepperDash.Core
|
||||
CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler;
|
||||
|
||||
LoadMemory();
|
||||
Level = Contexts.GetOrCreateItem("DEFAULT").Level;
|
||||
|
||||
var context = Contexts.GetOrCreateItem("DEFAULT");
|
||||
Level = context.Level;
|
||||
DoNotStartOnNextBoot = context.DoNotStartOnNextBoot;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -243,10 +248,12 @@ namespace PepperDash.Core
|
||||
/// <param name="state"></param>
|
||||
public static void SetDoNotStartOnNextBoot(bool state)
|
||||
{
|
||||
Contexts.DoNotStartOnNextBoot = state;
|
||||
CrestronConsole.PrintLine("[Application {0}], Do Not Start on Next Boot set to {1}",
|
||||
InitialParametersClass.ApplicationNumber, Contexts.DoNotStartOnNextBoot);
|
||||
DoNotStartOnNextBoot = state;
|
||||
Contexts.GetOrCreateItem("DEFAULT").DoNotStartOnNextBoot = state;
|
||||
SaveMemoryOnTimeout();
|
||||
|
||||
CrestronConsole.PrintLine("[Application {0}], Do Not Start on Next Boot set to {1}",
|
||||
InitialParametersClass.ApplicationNumber, DoNotStartOnNextBoot);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,12 +10,6 @@ namespace PepperDash.Core.DebugThings
|
||||
{
|
||||
public class DebugContextCollection
|
||||
{
|
||||
/// <summary>
|
||||
/// Property to tell the program not to intitialize when it boots, if desired
|
||||
/// </summary>
|
||||
[JsonProperty("doNotStartOnNextBoot")]
|
||||
public bool DoNotStartOnNextBoot { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
Dictionary<string, DebugContextItem> Items;
|
||||
|
||||
@@ -59,6 +53,13 @@ namespace PepperDash.Core.DebugThings
|
||||
[JsonProperty("level")]
|
||||
public int Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Property to tell the program not to intitialize when it boots, if desired
|
||||
/// </summary>
|
||||
[JsonProperty("doNotStartOnNextBoot")]
|
||||
public bool DoNotStartOnNextBoot { get; set; }
|
||||
|
||||
|
||||
public DebugContextItem(DebugContextCollection parent)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user