mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-27 03:14:46 +00:00
Removes the default from proces%type%Path mehods. If no path no change.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -118,36 +118,41 @@ namespace PepperDash.Core.JsonToSimpl
|
||||
void ProcessBoolPath(ushort index)
|
||||
{
|
||||
string response;
|
||||
if (Process(BoolPaths[index], out response))
|
||||
OnBoolChange(response.Equals("true", StringComparison.OrdinalIgnoreCase),
|
||||
index, JsonToSimplConstants.BoolValueChange);
|
||||
else
|
||||
OnBoolChange(false, index, JsonToSimplConstants.BoolValueChange);
|
||||
}
|
||||
if (Process(BoolPaths[index], out response))
|
||||
OnBoolChange(response.Equals("true", StringComparison.OrdinalIgnoreCase),
|
||||
index, JsonToSimplConstants.BoolValueChange);
|
||||
else { }
|
||||
|
||||
// OnBoolChange(false, index, JsonToSimplConstants.BoolValueChange);
|
||||
|
||||
}
|
||||
|
||||
// Processes the path to a ushort, converting to ushort if able, firing off UshrtChange event
|
||||
void ProcessUshortPath(ushort index)
|
||||
{
|
||||
string response;
|
||||
if (Process(UshortPaths[index], out response))
|
||||
{
|
||||
ushort val;
|
||||
try { val = Convert.ToUInt16(response); }
|
||||
catch { val = 0; }
|
||||
OnUShortChange(val, index, JsonToSimplConstants.UshortValueChange);
|
||||
}
|
||||
else
|
||||
OnUShortChange(0, index, JsonToSimplConstants.UshortValueChange);
|
||||
if (Process(UshortPaths[index], out response))
|
||||
{
|
||||
ushort val;
|
||||
try { val = Convert.ToUInt16(response); }
|
||||
catch
|
||||
{
|
||||
val = 0;
|
||||
}
|
||||
OnUShortChange(val, index, JsonToSimplConstants.UshortValueChange);
|
||||
}
|
||||
else { }
|
||||
// OnUShortChange(0, index, JsonToSimplConstants.UshortValueChange);
|
||||
}
|
||||
|
||||
// Processes the path to a string property and fires of a StringChange event.
|
||||
void ProcessStringPath(ushort index)
|
||||
{
|
||||
string response;
|
||||
if (Process(StringPaths[index], out response))
|
||||
OnStringChange(response, index, JsonToSimplConstants.StringValueChange);
|
||||
else
|
||||
OnStringChange("", index, JsonToSimplConstants.StringValueChange);
|
||||
if (Process(StringPaths[index], out response))
|
||||
OnStringChange(response, index, JsonToSimplConstants.StringValueChange);
|
||||
else { }
|
||||
// OnStringChange("", index, JsonToSimplConstants.StringValueChange);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user