mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-15 20:54:46 +00:00
Added In JsonToSimplFileMaster and JsonToSimplPortalFileMaster - Made 'ActualFilePath' a public property, created a new event type (JsonActualFileChange) and raise the event whenever ActualFilePath is determined
This commit is contained in:
@@ -11,12 +11,14 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class JsonToSimplConstants
|
public class JsonToSimplConstants
|
||||||
{
|
{
|
||||||
public const ushort JsonIsValidBoolChange = 2;
|
public const ushort JsonIsValidBoolChange = 2;
|
||||||
|
|
||||||
|
|
||||||
public const ushort BoolValueChange = 1;
|
public const ushort BoolValueChange = 1;
|
||||||
public const ushort UshortValueChange = 101;
|
public const ushort UshortValueChange = 101;
|
||||||
public const ushort StringValueChange = 201;
|
public const ushort StringValueChange = 201;
|
||||||
public const ushort FullPathToArrayChange = 202;
|
public const ushort FullPathToArrayChange = 202;
|
||||||
|
public const ushort JsonActualFileChange = 203;
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************************//
|
//**************************************************************************************************//
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Filepath { get; private set; }
|
public string Filepath { get; private set; }
|
||||||
|
|
||||||
string ActualFilePath;
|
public string ActualFilePath { get; private set; }
|
||||||
|
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
/** Privates **/
|
/** Privates **/
|
||||||
@@ -67,7 +67,8 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//var actualFileName = actualFile.FullName;
|
//var actualFileName = actualFile.FullName;
|
||||||
ActualFilePath = actualFile.FullName;
|
ActualFilePath = actualFile.FullName;
|
||||||
|
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.JsonActualFileChange);
|
||||||
Debug.Console(1, "Actual JSON file is {0}", ActualFilePath);
|
Debug.Console(1, "Actual JSON file is {0}", ActualFilePath);
|
||||||
|
|
||||||
string json = File.ReadToEnd(ActualFilePath, System.Text.Encoding.ASCII);
|
string json = File.ReadToEnd(ActualFilePath, System.Text.Encoding.ASCII);
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the filepath as well as registers this with the Global.Masters list
|
/// Sets the filepath as well as registers this with the Global.Masters list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PortalFilepath { get; private set; }
|
public string PortalFilepath { get; private set; }
|
||||||
|
|
||||||
string ActualFilePath;
|
public string ActualFilePath { get; private set; }
|
||||||
|
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
/** Privates **/
|
/** Privates **/
|
||||||
@@ -61,7 +61,8 @@ namespace PepperDash.Core.JsonToSimpl
|
|||||||
|
|
||||||
if (actualLocalFile != null)
|
if (actualLocalFile != null)
|
||||||
{
|
{
|
||||||
ActualFilePath = actualLocalFile.FullName;
|
ActualFilePath = actualLocalFile.FullName;
|
||||||
|
OnStringChange(ActualFilePath, 0, JsonToSimplConstants.JsonActualFileChange);
|
||||||
}
|
}
|
||||||
// If the local file does not exist, then read the portal file xyz.json
|
// If the local file does not exist, then read the portal file xyz.json
|
||||||
// and create the local.
|
// and create the local.
|
||||||
|
|||||||
Reference in New Issue
Block a user