mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-29 12:24:48 +00:00
Web API, changed loading of default to happen when no preset is received - to allow proper structure from previously-loaded preset to be overwritten
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
1/24/2017 10:34:11 AM, Info: Initializing SIMPLSharp Services...
|
||||
1/24/2017 10:34:11 AM, Info: ProjectInfo successfully initialized.
|
||||
1/24/2017 1:02:44 PM, Info: Terminating SIMPLSharp Services
|
||||
@@ -0,0 +1,3 @@
|
||||
2/9/2017 2:54:30 PM, Info: Initializing SIMPLSharp Services...
|
||||
2/9/2017 2:54:30 PM, Info: ProjectInfo successfully initialized.
|
||||
2/9/2017 2:55:59 PM, Info: Terminating SIMPLSharp Services
|
||||
@@ -0,0 +1,3 @@
|
||||
2/10/2017 11:04:32 AM, Info: Initializing SIMPLSharp Services...
|
||||
2/10/2017 11:04:32 AM, Info: ProjectInfo successfully initialized.
|
||||
2/10/2017 1:09:48 PM, Info: Terminating SIMPLSharp Services
|
||||
@@ -0,0 +1,3 @@
|
||||
2/13/2017 8:30:12 AM, Info: Initializing SIMPLSharp Services...
|
||||
2/13/2017 8:30:12 AM, Info: ProjectInfo successfully initialized.
|
||||
2/13/2017 9:48:40 AM, Info: Terminating SIMPLSharp Services
|
||||
@@ -125,12 +125,13 @@ namespace PepperDash.Core.WebApi.Presets
|
||||
var client = new HttpsClient();
|
||||
client.HostVerification = false;
|
||||
client.PeerVerification = false;
|
||||
|
||||
// ask for the preset
|
||||
var resp = client.Dispatch(req);
|
||||
if (resp.Code == 200)
|
||||
if (resp.Code == 200) // got it
|
||||
{
|
||||
Debug.Console(1, this, "Received: {0}", resp.ContentString);
|
||||
var preset = JsonConvert.DeserializeObject<Preset>(resp.ContentString);
|
||||
|
||||
CurrentPreset = preset;
|
||||
|
||||
//if there's no preset data, load the template
|
||||
@@ -145,6 +146,11 @@ namespace PepperDash.Core.WebApi.Presets
|
||||
var handler = PresetReceived;
|
||||
if (handler != null)
|
||||
PresetReceived(this, new PresetReceivedEventArgs(preset));
|
||||
}
|
||||
else // no existing preset
|
||||
{
|
||||
CurrentPreset = new Preset();
|
||||
LoadDefaultPresetData();
|
||||
}
|
||||
}
|
||||
catch (HttpException e)
|
||||
|
||||
Binary file not shown.
@@ -10,8 +10,8 @@
|
||||
<ArchiveName />
|
||||
</RequiredInfo>
|
||||
<OptionalInfo>
|
||||
<CompiledOn>1/11/2017 3:24:24 PM</CompiledOn>
|
||||
<CompilerRev>1.0.6220.27731</CompilerRev>
|
||||
<CompiledOn>2/13/2017 1:50:03 PM</CompiledOn>
|
||||
<CompilerRev>1.0.6253.24901</CompilerRev>
|
||||
</OptionalInfo>
|
||||
<Plugin>
|
||||
<Version>Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
MainAssembly=PepperDash_Core.dll:2ce705d0617973f5c800064ef6bd32cd
|
||||
MainAssembly=PepperDash_Core.dll:376f0c0b11f57cee97fbee77c6d5579f
|
||||
MainAssemblyMinFirmwareVersion=1.007.0017
|
||||
MainAssemblyResource=SimplSharpData.dat:315526abf906cded47fb0c7510266a7e
|
||||
ü
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user