public void StopPomodoroInternal(bool completed) { this.previousPomodoro = this.pomodoroData; this.pomodoroData = null; var args = new TimeTriggerCommandArgs("Finish Pomodoro"); this.removeExistingTimeTriggerCommand.Do(args); // should be removed in case the user voided the pomodoro // remove the trigger as of no need this.removeExistingTriggerCommand.Do(new TimeTriggerCommandArgs("Pomodoro Minute Elapsed")); this.previousPomodoro.Successful = completed; this.previousPomodoro.Duration = this.Now - this.previousPomodoro.Start; this.pomodoroFinishingEvent.Fire(new PomodoroEventArgs(this.previousPomodoro)); this.pomodoroFinishedEvent.Fire(new PomodoroEventArgs(this.previousPomodoro)); }
protected bool RemoveExistingTimeTrigger(TimeTriggerCommandArgs ttca) { return((bool)this.removeExistingTimeTriggerCommand.Do(ttca)); }