private void InitDayBodyCells(List <SchedulerBaseElementViewModel> bodyList, List <SchedulerBaseElementViewModel> borderList) { int col = 1; foreach (SchedulerDayModel day in week.Days) { SchedulerDayBodyViewModel body = new SchedulerDayBodyViewModel(day); body.Column = col; bodyList.Add(body); SchedulerDayBodyBorderViewModel border = new SchedulerDayBodyBorderViewModel(day); border.Column = col; borderList.Add(border); col += 1; } //viewerBody.ScrollToVerticalOffset(48 * week.DisplayInfo.WorkingHoursFrom.TotalHours); topDisplayedHour = week.DisplayInfo.WorkingHoursFrom.TotalHours; }
public void IsActiveTest() { DateTime date = new DateTime(2010, 1, 1); SchedulerDayModel day = new SchedulerDayModel(new SchedulerDisplayInfo(new CultureInfo("cs-CZ")), date); day.SetDate(date); SchedulerDayBodyBorderViewModel target = new SchedulerDayBodyBorderViewModel(day); try { target.PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged); PreparePropertyChangedTest(); day.SetDate(date.AddDays(-1), date, date); Assert.IsTrue(NotifiedProperties.Contains("IsActive"), "PropertyChanged event wasn't raised on property 'IsActive' changing to false."); } finally { target.PropertyChanged -= new PropertyChangedEventHandler(OnPropertyChanged); } }
private void InitDayBodyCells(List<SchedulerBaseElementViewModel> bodyList, List<SchedulerBaseElementViewModel> borderList) { int col = 1; foreach (SchedulerDayModel day in week.Days) { SchedulerDayBodyViewModel body = new SchedulerDayBodyViewModel(day); body.Column = col; bodyList.Add(body); SchedulerDayBodyBorderViewModel border = new SchedulerDayBodyBorderViewModel(day); border.Column = col; borderList.Add(border); col += 1; } //viewerBody.ScrollToVerticalOffset(48 * week.DisplayInfo.WorkingHoursFrom.TotalHours); topDisplayedHour = week.DisplayInfo.WorkingHoursFrom.TotalHours; }