Beispiel #1
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public TimeOfClassItemViewModel()
 {
     Items = FunctionHelpersForList.GenerateTimeToChoose();
 }
        /// <summary>
        /// Default constructor
        /// </summary>
        public CreateSubjectPageViewModel()
        {
            Items = FunctionHelpersForList.GenerateTimeToChoose();

            Major = new TextEntryViewModel {
                Label = "Major"
            };
            ID = new TextEntryViewModel {
                Label = "ID"
            };
            Subject = new TextEntryViewModel {
                Label = "Subject"
            };
            Credit = new TextEntryViewModel {
                Label = "Credit"
            };
            Teacher = new TextEntryViewModel {
                Label = "Teacher"
            };

            ListTerm = new ObservableCollection <string>()
            {
                "I", "II", "III"
            };
            ListCourse = FunctionHelpersForList.GenerateCourse(2018, 2050);

            SpecificTimeItems = new ListTimeOfClassViewModel
            {
                Items = new ObservableCollection <TimeOfClassItemViewModel>
                {
                    new TimeOfClassItemViewModel
                    {
                        DayInTheWeek = "Monday",
                    },

                    new TimeOfClassItemViewModel()
                    {
                        DayInTheWeek = "Tuesday",
                    },

                    new TimeOfClassItemViewModel()
                    {
                        DayInTheWeek = "Wednesday",
                    },

                    new TimeOfClassItemViewModel()
                    {
                        DayInTheWeek = "Thursday",
                    },

                    new TimeOfClassItemViewModel()
                    {
                        DayInTheWeek = "Friday",
                    },

                    new TimeOfClassItemViewModel()
                    {
                        DayInTheWeek = "Saturday",
                    },

                    new TimeOfClassItemViewModel()
                    {
                        DayInTheWeek = "Sunday",
                    },
                },
            };

            // Set commands
            CreateCommand = new RelayCommand(async() => await Create());
        }