Пример #1
0
        private void LoadClosedDays(ObservableCollection<BusinessClosedDay> closedDays)
        {
            SessionInfo.Instance.SchedulerSpecialSlots.Clear();

            foreach (var day in closedDays) {
                ClosedSlot cs = new ClosedSlot(this.ResourceCalendars) {
                    Subject = day.Subject,
                    Start = day.Start,
                    End = day.End,
                    IsReadOnly = false,
                };
                if (!String.IsNullOrWhiteSpace(day.RecurrencePattern)) {
                    RecurrencePattern pattern;
                    RecurrencePatternHelper.TryParseRecurrencePattern(day.RecurrencePattern, out pattern);
                    cs.RecurrencePattern = pattern;
                }
                SessionInfo.Instance.SchedulerSpecialSlots.Add(cs);
            }
        }
Пример #2
0
 public override Slot Copy()
 {
     Slot slot = new ClosedSlot(this.Start, this.End);
     slot.CopyFrom(this);
     return slot;
 }