Skip to content

Commit

Permalink
Scroll bar for main panel
Browse files Browse the repository at this point in the history
The main panel was missing a scroll bar. Now it has one. Also played
around with the ResearchItem to make multiple triggers less likely. I
hope.
  • Loading branch information
MaeBee committed Oct 8, 2017
1 parent 0b44759 commit 80f683b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
71 changes: 36 additions & 35 deletions ESOResearchNotifier/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions ESOResearchNotifier/ResearchItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public string TraitName
}
public TimeSpan Duration { get; set; }
public DateTime FinishTime { get; set; }
public bool Done = false;


public TimeSpan TimeLeft
{
Expand Down Expand Up @@ -120,19 +122,16 @@ public ResearchItem()

public void Setup()
{
if (!timerTick.Enabled)
{
timerTick.Start();
}
if (TimeLeft.TotalSeconds <= 0)
{
if (this.ResearchDone != null)
{
this.ResearchDone(this, new EventArgs());
}
Done = true;
ResearchDone?.Invoke(this, new EventArgs());
return;
}
//MessageBox.Show(((int)((TimeDone.TotalSeconds / Duration.TotalSeconds) * 100)).ToString());
if (!timerTick.Enabled && !Done)
{
timerTick.Start();
}
prgTime.Value = (int)((TimeDone.TotalSeconds / Duration.TotalSeconds) * 100);
toolTip1.SetToolTip(prgTime, TimeDone.ToString(@"dd\.hh\:mm\:ss") + " of " + Duration.ToString(@"dd\.hh\:mm\:ss") + " done.");
SetLabelText();
Expand Down

0 comments on commit 80f683b

Please sign in to comment.