Example #1
0
 public SectionViewModel(Book book, BookViewModel currentBookViewModel)
 {
     this.bookViewModel = currentBookViewModel;
     this.CurrentBook = book;
     sectionContext = new SectionContext();
     defineCommands();
 }
Example #2
0
 public MoveQuestionViewModel(int sectionId)
 {
     _sectionId = sectionId;
     questionContextTo = new QuestionContext();
     sectionContext = new SectionContext();
     questionContextFrom = new QuestionContext();
     quizContext = new QuizContext();
     var sectionLoad = sectionContext.Load(sectionContext.GetSectionsQuery());
     sectionLoad.Completed += new System.EventHandler(sectionLoad_Completed);
     loadFromQuestionSet();
     MoveQuestionsCommand = new DelegateCommand<Question>(OnMoveCommand, CanMoveCommand);
 }