public void Update(WorkTime workTime, bool isChecked) { _timeSpentArc = new Arc(timeSpentPath, timeSpentStartOnCircle, timeSpentArc, _zeroPos, _config.TimeSpentColor); _timeSpentArc.Update(workTime.StartTime, DateTime.Now, RadiusTimeSpent, workTime.TimeSpent > _config.MinTimeSpan); _timeSpentArc.Visibility = isChecked; lbClockTop.Content = "time spent: " + workTime.TimeSpent.ToDisplayString(); lbClockBottom.Content = "remaining: " + workTime.RemainingTillTarget.ToDisplayString(); if (workTime.StartTime != _startTime) { Init(workTime, _config); } }
private Arc InitArc(Path path, LineSegment lineSegment, ArcSegment arcSegment, DateTime startTime, DateTime endTime, double radius, bool isLargeArc, Color color) { var arc = new Arc(path, lineSegment, arcSegment, _zeroPos, color); arc.Update(startTime, endTime, radius, isLargeArc); return arc; }