Ejemplo n.º 1
0
        public ObservableCollection <GanttHoliday> GetHolidays()
        {
            GanttHolidayCollection holidays = new GanttHolidayCollection();

            holidays.Add(new GanttHoliday()
            {
                Background = new SolidColorBrush(Colors.CadetBlue), Day = new DateTime(2018, 5, 28)
            });
            holidays.Add(new GanttHoliday()
            {
                Background = new SolidColorBrush(Colors.CadetBlue), Day = new DateTime(2018, 7, 4)
            });
            holidays.Add(new GanttHoliday()
            {
                Background = new SolidColorBrush(Colors.CadetBlue), Day = new DateTime(2018, 9, 3)
            });
            holidays.Add(new GanttHoliday()
            {
                Background = new SolidColorBrush(Colors.CadetBlue), Day = new DateTime(2018, 11, 11)
            });
            holidays.Add(new GanttHoliday()
            {
                Background = new SolidColorBrush(Colors.CadetBlue), Day = new DateTime(2018, 11, 12)
            });
            holidays.Add(new GanttHoliday()
            {
                Background = new SolidColorBrush(Colors.CadetBlue), Day = new DateTime(2018, 12, 25)
            });
            return(holidays);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewModel"/> class.
 /// </summary>
 public CalendarCustomizationViewModel()
 {
     _taskCollection           = GetData();
     ExcludeWeekendsCollection = ShowWeekendsCollection = ExcludeHolidaysCollection = ShowHolidaysCollection = FYNumbering = new string[] { "True", "False" };
     DefaultStart = new string[] { "12:00 AM", "01:00 AM", "02:00 AM", "03:00 AM", "04:00 AM", "05:00 AM", "06:00 AM", "07:00 AM", "08:00 AM", "09:00 AM",
                                   "10:00 AM", "11:00 AM", "12:00 PM", "01:00 PM", "02:00 PM", "03:00 PM", "04:00 PM", "05:00 PM", "06:00 PM", "07:00 PM", "08:00 PM", "09:00 PM",
                                   "10:00 PM", "11:00 PM" };
     DefaultEnd = new string[] { "12:00 AM", "01:00 AM", "02:00 AM", "03:00 AM", "04:00 AM", "05:00 AM", "06:00 AM", "07:00 AM", "08:00 AM", "09:00 AM",
                                 "10:00 AM", "11:00 AM", "12:00 PM", "01:00 PM", "02:00 PM", "03:00 PM", "04:00 PM", "05:00 PM", "06:00 PM", "07:00 PM", "08:00 PM", "09:00 PM",
                                 "10:00 PM", "11:00 PM" };
     this.GanttHolidayCollection = this.GetHolidayCollection();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewModel"/> class.
 /// </summary>
 public ViewModel()
 {
     _taskCollection = GetData();
     WeekDays        = new string[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
     Months          = new string[] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
     FYNumbering     = new string[] { "True", "False" };
     DefaultStart    = new string[] { "12:00 AM", "01:00 AM", "02:00 AM", "03:00 AM", "04:00 AM", "05:00 AM", "06:00 AM", "07:00 AM", "08:00 AM", "09:00 AM",
                                      "10:00 AM", "11:00 AM", "12:00 PM", "01:00 PM", "02:00 PM", "03:00 PM", "04:00 PM", "05:00 PM", "06:00 PM", "07:00 PM", "08:00 PM", "09:00 PM",
                                      "10:00 PM", "11:00 PM" };
     DefaultEnd = new string[] { "12:00 AM", "01:00 AM", "02:00 AM", "03:00 AM", "04:00 AM", "05:00 AM", "06:00 AM", "07:00 AM", "08:00 AM", "09:00 AM",
                                 "10:00 AM", "11:00 AM", "12:00 PM", "01:00 PM", "02:00 PM", "03:00 PM", "04:00 PM", "05:00 PM", "06:00 PM", "07:00 PM", "08:00 PM", "09:00 PM",
                                 "10:00 PM", "11:00 PM" };
     this.GanttHolidayCollection = this.GetHolidayCollection();
 }
        /// <summary>
        /// Gets the Holiday collection.
        /// </summary>
        /// <value>The Holiday collection.</value>
        private GanttHolidayCollection GetHolidayCollection()
        {
            GanttHolidayCollection collection = new GanttHolidayCollection();

            collection.Add(new GanttHoliday {
                Day = new DateTime(2010, 6, 10), Background = Brushes.CadetBlue
            });
            collection.Add(new GanttHoliday {
                Day = new DateTime(2010, 7, 8), Background = Brushes.CadetBlue
            });
            collection.Add(new GanttHoliday {
                Day = new DateTime(2010, 8, 3), Background = Brushes.CadetBlue
            });
            collection.Add(new GanttHoliday {
                Day = new DateTime(2010, 9, 20), Background = Brushes.CadetBlue
            });
            return(collection);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewModel"/> class.
 /// </summary>
 public ViewModel()
 {
     _taskCollection             = GetData();
     this.GanttHolidayCollection = this.GetHolidayCollection();
 }