Permalink
Browse files

Turned off after 60 seconds.

  • Loading branch information...
IAmCoder committed Nov 11, 2014
1 parent 2cd87a9 commit 82a334b7dc7207808485582a0f4ae4c19a0435a2
@@ -58,13 +58,13 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_8A04AA9B98A94963AADF2135268ACC52"
"OwnerKey" = "8:_4210C5B26664BD7B4C21B3A1C66C3BE8"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_4210C5B26664BD7B4C21B3A1C66C3BE8"
"OwnerKey" = "8:_8A04AA9B98A94963AADF2135268ACC52"
"MsmSig" = "8:_UNDEFINED"
}
}
@@ -164,7 +164,7 @@
{
"Name" = "8:.NET Framework"
"Message" = "8:[VSDNETMSG]"
"FrameworkVersion" = "8:3.5.30729 "
"FrameworkVersion" = "8:3.5.30729 "
"AllowLaterVersions" = "11:FALSE"
"InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=76617"
}
@@ -179,11 +179,6 @@
"AssemblyAsmDisplayName" = "8:YocoWrapper, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"
"ScatterAssemblies"
{
"_4210C5B26664BD7B4C21B3A1C66C3BE8"
{
"Name" = "8:YocoWrapper.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:YocoWrapper.dll"
"TargetName" = "8:"
@@ -230,11 +225,6 @@
"AssemblyAsmDisplayName" = "8:lucidcode.LucidScribe.Plugout.Interface, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_963A2D1A0879D2BFCF882C976AB0FF59"
{
"Name" = "8:lucidcode.LucidScribe.Plugout.Interface.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:lucidcode.LucidScribe.Plugout.Interface.dll"
"TargetName" = "8:"
@@ -361,15 +351,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe Yocto PowerRelay"
"ProductCode" = "8:{44413A21-80F9-4DC9-A296-C236AAA4F445}"
"PackageCode" = "8:{4885C070-CAEA-4906-96E9-65E54BA6CF75}"
"ProductCode" = "8:{B7A949B0-8C71-4538-A269-AB2C2E2C3113}"
"PackageCode" = "8:{38388A46-8F8C-4DE1-A506-96A19A307F84}"
"UpgradeCode" = "8:{F7366005-EA41-478D-BED9-08441C13A31E}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.0.0"
"ProductVersion" = "8:1.0.1"
"Manufacturer" = "8:lucidcode"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://www.lucidcode.com/Contact"
@@ -17,6 +17,8 @@ public class PlugoutHandler : lucidcode.LucidScribe.Interface.LucidPlugoutBase
{

private Boolean Failed = false;
private Boolean On = false;
private Thread SwitchOffThread;

public override string Name
{
@@ -39,6 +41,8 @@ public override void Trigger()
{
if (Failed) return;

if (On) return;

YocoWrapper.YRelay relay;
string errorMessage = "";

@@ -65,6 +69,12 @@ public override void Trigger()
{
relay.set_state(YocoWrapper.YRelay.STATE_A);
}

On = true;

// Turn it off in a minute
SwitchOffThread = new Thread(SwitchOff);
SwitchOffThread.Start();
}
else
{
@@ -77,6 +87,16 @@ public override void Trigger()
MessageBox.Show(ex.Message, "Yocto PowerRelay Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

public void SwitchOff()
{
Thread.Sleep(1000 * 60);
On = false;
Trigger();
On = false;
}


}

}
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]

0 comments on commit 82a334b

Please sign in to comment.