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; } }
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; }
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; }
public static void AddClass(Class Class) { classes.Add(Class); dataStore.Save(); }
public static void DeleteClass(Class Class) { dataStore.classes.Remove(Class); dataStore.Save(); }