void Timer_Tick(object sender, TickEventArgs e) { var time = string.Format("{0:00}:{1:00}", e.Time.Minutes, e.Time.Seconds); var snoozing = StateMachine.State == State.Snoozing; currentTimeToolStripMenuItem.Text = snoozing ? (time + " (Snoozing)") : time; currentTimeToolStripMenuItem.ForeColor = e.Color == ShowTimeColor.Red ? Color.Red : Color.Black; notifyIcon1.Text = "You should stand up in " + TimeTranslator.Translate(e.Time); }
void NotifyEnteredRedMode() { notifyIcon1.ShowBalloonTip(2000, "Prepair to stand up", "Stand-up time is getting close. So prepare to stand up in " + TimeTranslator.Translate(new TimeSpan(0, 0, Business.Settings.RedSeconds)), ToolTipIcon.Info); }
public void ManualReset() { StateMachine.Reset(); notifyIcon1.ShowBalloonTip(2000, "Timer has been reset", "You should stand-up in " + TimeTranslator.Translate(new TimeSpan(0, 0, StandUp.Business.Settings.TotalSeconds)), ToolTipIcon.Info); }