/// <summary> /// Creates this viewmodel with edit mode off so it means that it is creating a new test not editing one /// </summary> public TestEditorBasicInformationEditorViewModel(TestEditor testEditor) { // Inject DI services mTestEditor = testEditor; CreateCommands(); }
/// <summary> /// Default constructor /// </summary> public TestEditorQuestionsEditorViewModel(TestEditor testEditor) { // Inject DI services mTestEditor = testEditor; QuestionListViewModel.Instance.LoadItems(null); Initialize(); CurrentQuestionEditorViewModel = null; }
/// <summary> /// Default constructor /// </summary> public TestEditorInitialPageViewModel(TestEditor testEditor) { // Inject DI services mTestEditor = testEditor; // Create commands CreateNewTestCommand = new RelayCommand(() => { mTestEditor.CreateNewTest(); mTestEditor.Start(); }); EditManageTestCommand = new RelayCommand(() => ChangePage(ApplicationPage.TestEditorTestManagmentPage)); EditCriteriaCommand = new RelayCommand(() => ChangePage(ApplicationPage.TestEditorCriteriaEditor)); }
/// <summary> /// Default constructor /// </summary> public TestEditorTestManagmentViewModel(TestEditor testEditor) { // Inject DI services mTestEditor = testEditor; // Create commands EnterEditingModeCommand = new RelayCommand(EnterEditingMode); DeleteTestCommand = new RelayCommand(DeleteTest); ReturnCommand = new RelayCommand(() => DI.Application.GoToPage(ApplicationPage.TestEditorInitial)); // Hook up to the events TestListViewModel.Instance.SelectionChanged += UpdateView; // Make sure that test list is up to date TestListViewModel.Instance.LoadItems(); }
/// <summary> /// Default constructor /// </summary> public TestEditorAttachCriteriaViewModel(ServerNetwork serverNetwork, TestHost testHost, TestEditor testEditor) { // Inject DI services mServerNetwork = serverNetwork; mTestHost = testHost; mTestEditor = testEditor; // Create commands GoPreviousPageCommand = new RelayCommand(GoPreviousPage); SubmitCriteriaCommand = new RelayCommand(SubmitCriteria); EditCommand = new RelayCommand(BeginEdit); CriteriaListViewModel.Instance.LoadItems(); CriteriaListViewModel.Instance.ShouldSelectIndicatorBeVisible = false; CriteriaListViewModel.Instance.ItemSelected += CriteriaItemSelected; PointsGrading = new GradingPercentage().ToPoints(mTestEditor.CurrentPointScore); MatchPropertiesWithCriteria(); }