private void ManageSharingWithDeadlineActivities(DeadlineActivity activity, List <Activity> activities) { var itemStart = new FixedActivity(activity.Name, activity.Description, Color.Red, CreationType.ManuallyCreated, null, null, activity.UserId, 0, activity.Start, activity.Start.AddHours(1), false); var itemEnd = new FixedActivity(activity.Name, activity.Description, Color.Red, CreationType.ManuallyCreated, null, null, activity.UserId, 0, activity.End, activity.End.AddHours(1), false); activities.Add(itemStart); activities.Add(itemEnd); foreach (var milestone in activity.Milestones) { activities.Add(new FixedActivity(milestone.Name, "", Color.Red, CreationType.ManuallyCreated, null, null, activity.UserId, 0, milestone.Time, milestone.Time.AddHours(1), false)); } }
private bool IsDeadLineInRange(DeadlineActivity deadlineActivity) { return(deadlineActivity.End < _rangeStart || deadlineActivity.Start > _rangeEnd); }