コード例 #1
0
 private void InitializeProperties()
 {
     this._selectedResourceNames    = new List <string>();
     this.ActiveViewDefinitionIndex = 2;
     this.Appointments = SampleContentService.GetCalendarAppointments();
     this.UpdateGroupFilter();
 }
コード例 #2
0
        public static ObservableCollection <Appointment> GetCalendarAppointments()
        {
            var result = new ObservableCollection <Appointment>();
            var today  = DateTime.Today;

            SampleContentService.AddAppointmentsForTheWeek(result, today, "Morning Meeting", "Team", "CalendarType", new TimeSpan(8, 0, 0), new TimeSpan(9, 0, 0));
            SampleContentService.AddAppointmentsForTheWeek(result, today, "Coffee Break", "Personal", "CalendarType", new TimeSpan(14, 0, 0), new TimeSpan(14, 30, 0));
            SampleContentService.AddAppointmentsForTheWeek(result, today, "Client Meeting", "Company", "CalendarType", new TimeSpan(16, 0, 0), new TimeSpan(17, 0, 0));
            var friday       = today.AddDays(-(int)today.DayOfWeek).AddDays(5);
            var releaseParty = new Appointment()
            {
                Start   = new DateTime(friday.Year, friday.Month, friday.Day, 18, 0, 0),
                End     = new DateTime(friday.Year, friday.Month, friday.Day, 23, 0, 0),
                Subject = "Release Party"
            };

            result.Add(releaseParty);

            return(result);
        }