mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 21:24:43 +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 int Level { get; private set; }
|
||||||
|
|
||||||
|
public static bool DoNotStartOnNextBoot { get; private set; }
|
||||||
|
|
||||||
static DebugContextCollection Contexts;
|
static DebugContextCollection Contexts;
|
||||||
|
|
||||||
static int SaveTimeoutMs = 30000;
|
static int SaveTimeoutMs = 30000;
|
||||||
@@ -81,7 +83,10 @@ namespace PepperDash.Core
|
|||||||
CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler;
|
CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironment_ProgramStatusEventHandler;
|
||||||
|
|
||||||
LoadMemory();
|
LoadMemory();
|
||||||
Level = Contexts.GetOrCreateItem("DEFAULT").Level;
|
|
||||||
|
var context = Contexts.GetOrCreateItem("DEFAULT");
|
||||||
|
Level = context.Level;
|
||||||
|
DoNotStartOnNextBoot = context.DoNotStartOnNextBoot;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -243,10 +248,12 @@ namespace PepperDash.Core
|
|||||||
/// <param name="state"></param>
|
/// <param name="state"></param>
|
||||||
public static void SetDoNotStartOnNextBoot(bool state)
|
public static void SetDoNotStartOnNextBoot(bool state)
|
||||||
{
|
{
|
||||||
Contexts.DoNotStartOnNextBoot = state;
|
DoNotStartOnNextBoot = state;
|
||||||
CrestronConsole.PrintLine("[Application {0}], Do Not Start on Next Boot set to {1}",
|
Contexts.GetOrCreateItem("DEFAULT").DoNotStartOnNextBoot = state;
|
||||||
InitialParametersClass.ApplicationNumber, Contexts.DoNotStartOnNextBoot);
|
|
||||||
SaveMemoryOnTimeout();
|
SaveMemoryOnTimeout();
|
||||||
|
|
||||||
|
CrestronConsole.PrintLine("[Application {0}], Do Not Start on Next Boot set to {1}",
|
||||||
|
InitialParametersClass.ApplicationNumber, DoNotStartOnNextBoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,12 +10,6 @@ namespace PepperDash.Core.DebugThings
|
|||||||
{
|
{
|
||||||
public class DebugContextCollection
|
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")]
|
[JsonProperty("items")]
|
||||||
Dictionary<string, DebugContextItem> Items;
|
Dictionary<string, DebugContextItem> Items;
|
||||||
|
|
||||||
@@ -59,6 +53,13 @@ namespace PepperDash.Core.DebugThings
|
|||||||
[JsonProperty("level")]
|
[JsonProperty("level")]
|
||||||
public int Level { get; set; }
|
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)
|
public DebugContextItem(DebugContextCollection parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user