예제 #1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter != null && e.Parameter.GetType() == typeof(Class)) {
         editObject = (Class)e.Parameter;
         textBoxName.Text = editObject.name;
         textBoxShortName.Text = editObject.shortName;
         buttonDelete.Visibility = Visibility.Visible;
     }
 }
예제 #2
0
        public Task(string title, string description, DateTime deadline, int notifyInDays = 0, Class classTarget = null, string uid = "")
        {
            this.title = title;
            this.description = description;
            this.deadline = deadline;
            this.notifyInDays = notifyInDays;
            this.classTarget = classTarget;

            if (string.IsNullOrWhiteSpace(uid))
                //Hopefuly there will be no collision :P
                this.uid = Guid.NewGuid().ToString();
            else
                this.uid = uid;
        }
예제 #3
0
        public ClassInstance(Class classData, ClassType classType, TimeSpan from, TimeSpan to, string room, WeekDay day, WeekType weekType, Teacher teacher, string uid = "")
        {
            this.classData = classData;
            this.classType = classType;
            this.from = from;
            this.to = to;
            this.room = room;
            this.weekDay = day;
            this.weekType = weekType;
            this.teacher = teacher;

            if (string.IsNullOrWhiteSpace(uid))
                this.uid = Guid.NewGuid().ToString();
            else
                this.uid = uid;
        }
예제 #4
0
 public static void AddClass(Class Class) {
     classes.Add(Class);
     dataStore.Save();
 }
예제 #5
0
 public static void DeleteClass(Class Class) {
     dataStore.classes.Remove(Class);
     dataStore.Save();
 }