Skip to content

Commit e71c654

Browse files
authored
Merge pull request #1 from lucidcode/bugfix/multi-trigger
Only trigger once per interval
2 parents db3f188 + a48afde commit e71c654

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

Installer/Lucid Scribe Interval.vdproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,15 +411,15 @@
411411
{
412412
"Name" = "8:Microsoft Visual Studio"
413413
"ProductName" = "8:Lucid Scribe Interval"
414-
"ProductCode" = "8:{9DECAE5F-B878-4CE0-80FD-2961A662AEA8}"
415-
"PackageCode" = "8:{8F0FE7F9-9C66-493E-A413-159CAF2524ED}"
414+
"ProductCode" = "8:{F7AB52E0-2565-40B2-A35D-1BAAC9498336}"
415+
"PackageCode" = "8:{7B80C907-11F9-4D69-AD64-22C2F31DBCA5}"
416416
"UpgradeCode" = "8:{D69BA483-0900-4583-859C-3AAE825E4801}"
417417
"AspNetVersion" = "8:4.0.30319.0"
418418
"RestartWWWService" = "11:FALSE"
419419
"RemovePreviousVersions" = "11:FALSE"
420420
"DetectNewerInstalledVersion" = "11:TRUE"
421421
"InstallAllUsers" = "11:TRUE"
422-
"ProductVersion" = "8:1.0.2"
422+
"ProductVersion" = "8:1.0.3"
423423
"Manufacturer" = "8:lucidcode"
424424
"ARPHELPTELEPHONE" = "8:"
425425
"ARPHELPLINK" = "8:https://www.lucidcode.com/Contact"

Interval/PluginHandler.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace lucidcode.LucidScribe.Plugin.Interval
55
public class PluginHandler : Interface.LucidPluginBase
66
{
77
private int interval = 20;
8+
private int lastSecond = -1;
89

910
public override string Name
1011
{
@@ -23,10 +24,13 @@ public override double Value
2324
{
2425
get
2526
{
26-
if ((DateTime.Now.Second - 1) % interval == 0)
27+
if ((DateTime.Now.Second - 1) % interval == 0 &&
28+
lastSecond != DateTime.Now.Second)
2729
{
30+
lastSecond = DateTime.Now.Second;
2831
return 888;
2932
}
33+
3034
return 1;
3135
}
3236
}

Interval/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("1.0.3.0")]
36+
[assembly: AssemblyFileVersion("1.0.3.0")]

0 commit comments

Comments
 (0)