Skip to content

Commit

Permalink
V1.2.0 - Fixed Timer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ktheod committed Mar 8, 2019
1 parent 2235610 commit da5df83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions OneDriveBully/MyFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ public class MyFunctions

//Timer Variables
private System.Timers.Timer MyTimer;
private Int32 interval;
private Int32 timeRemaining;

public void initApp()
{
initTimer();
checkUserSettings();
if (UserDefinedSettingsExist)
{
{
setTimerInterval(Properties.Settings.Default.TimerInterval);
}
}
Expand Down Expand Up @@ -101,8 +100,8 @@ public void setTimerInterval(Int32 newInterval)
}
else
{
interval = newInterval * 60 * 1000;
MyTimer.Interval = interval;
timeRemaining = newInterval * 60 * 1000;
MyTimer.Interval = 1 * 60 * 1000; //Check timer every 1 minute

stopTimer();
startTimer();
Expand All @@ -114,7 +113,6 @@ public void startTimer()
MyTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
MyTimer.Enabled = true;

timeRemaining = interval;
UpdateIconText(0);
}

Expand All @@ -130,7 +128,6 @@ private void OnTimedEvent(object source, ElapsedEventArgs e)
if (timeRemaining <= 0)
{
bullyNow();
timeRemaining = interval;
}
UpdateIconText(0);
}
Expand Down
4 changes: 2 additions & 2 deletions OneDriveBully/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]

0 comments on commit da5df83

Please sign in to comment.