public RunningPomodoro GetCurrentStatusData() { var pomo = new RunningPomodoro(); pomo.ScheduledPomodoroDuration = this.PomodoroTimeSpan; if (this.CurrentlyInPomodoro) { pomo.Started = this.pomodoroData.Start; pomo.Elapsed = this.Now - this.pomodoroData.Start; pomo.OutOfPomodoro = this.Now - (previousPomodoro == null ? this.pluginStarted : this.previousPomodoro.End); pomo.IsInPomodoro = true; } else { if (this.previousPomodoro != null) { pomo.Started = this.previousPomodoro.Start; pomo.Elapsed = this.Now - this.previousPomodoro.Start; pomo.OutOfPomodoro = this.Now - this.previousPomodoro.End; } else { pomo = null; } } return(pomo); }
public PomodoroEventArgs(RunningPomodoro runningPomodoroData) { this.RunnigPomodoroData = runningPomodoroData; }
public RunningPomodoro GetCurrentStatusData() { var pomo = new RunningPomodoro(); pomo.ScheduledPomodoroDuration = this.PomodoroTimeSpan; if (this.CurrentlyInPomodoro) { pomo.Started = this.pomodoroData.Start; pomo.Elapsed = this.Now - this.pomodoroData.Start; pomo.OutOfPomodoro = this.Now - (previousPomodoro == null ? this.pluginStarted : this.previousPomodoro.End); pomo.IsInPomodoro = true; } else { if (this.previousPomodoro != null) { pomo.Started = this.previousPomodoro.Start; pomo.Elapsed = this.Now - this.previousPomodoro.Start; pomo.OutOfPomodoro = this.Now - this.previousPomodoro.End; } else { pomo = null; } } return pomo; }