public TestSetEditViewModel() { try { this.selectedTest = new TestSet(); this.testSetsModel = BootStrapper.Resolve <ITestSetsModel>(); this.categoriesModel = BootStrapper.Resolve <ICategoriesModel>(); this.items = new ObservableCollection <TestItem>(); if (this.selectedTest.Items != null) { foreach (TestItem item in this.selectedTest.Items) { this.items.Add(item); } } this.categories = this.categoriesModel.GetAll(); this.languages = this.testSetsModel.GetAllLanguages(); this.SelectedLanguage = TestLanguage.English; } catch (Exception ex) { ApplicationErrorHandler.HandleException(ex); } }
public RunnerTestSetViewModel() { try { this.wrongAnswers = new List <TestItem>(); this.testSetsModel = BootStrapper.Resolve <ITestSetsModel>(); this.scoreModel = BootStrapper.Resolve <IScoreModel>(); } catch (Exception ex) { ApplicationErrorHandler.HandleException(ex); } }
public TestSetsViewModel() { try { this.testSetsModel = BootStrapper.Resolve <ITestSetsModel>(); this.categoriesModel = BootStrapper.Resolve <ICategoriesModel>(); this.tests = this.testSetsModel.GetAll(); this.categories = this.categoriesModel.GetAll(); } catch (Exception ex) { ApplicationErrorHandler.HandleException(ex); } }