public IndexModel(UserManager <AppUser> userManager, ISFAppManager appManager, IAppResponseManager respManager, IQuestionManager questionManager, IEvaluationManager eval, IAppUserManager appUser) { _user = userManager; _app = appManager; _response = respManager; _question = questionManager; _eval = eval; _appUser = appUser; }
public MainViewModel(IEvaluationManager evaluationManager, IRegionManager regionManager, IDialogService dialogService) { _assignmentInfo = evaluationManager.AssignmentInfo; _evaluationManager = evaluationManager; _regionManager = regionManager; _dialogService = dialogService; SelectLabFolderCommand = new DelegateCommand(SelectLabFolder); SelectStudentFile = new DelegateCommand(SelectStudentListFile); StartEvaluationCommand = new DelegateCommand(StartEvaluation, CanStartEvaluation); LoadLastAssignmentInfoCommand = new DelegateCommand(LoadLastAssignmentInfo); ConfigureProblemIdsCommand = new DelegateCommand(ConfigureProblemIds); }
public EvaluationViewModel(IEvaluationManager evaluationManager, IRegionManager regionManager, IEventAggregator eventAggregator, IDialogService dialogService) { _evaluationManager = evaluationManager; _regionManager = regionManager; _dialogService = dialogService; InitializeContext(); MoveToNextStudent = new DelegateCommand(MoveNext, CanMoveNext); MoveToPreviousStudent = new DelegateCommand(MoveBack, CanMoveBack); MoveToCommand = new DelegateCommand(() => { MoveToStudent(SearchString); }); RestartCommand = new DelegateCommand(() => { regionManager.RequestNavigate(RegionNames.CONTENT_REGION, "MainView"); }); eventAggregator.GetEvent <StudentEvaluationCompletedEvent>().Subscribe((isCompleted) => { if (isCompleted) { CompletedStudentNum++; } else { CompletedStudentNum--; } RaisePropertyChanged(nameof(CompletedStudentNum)); }); //HACK: 생성자가 완전 종료 되기 전에(아마 View에서 InitializeComponent를 진행하고, View의 생성자 종료직전까지는 네비게이션이 안 되는 듯.) Task.Delay(100) .ConfigureAwait(true) .GetAwaiter().OnCompleted(() => SwitchStudent(Student)); }
public StudentViewModel(IEvaluationManager evaluationManager, IEventAggregator eventAggregator) { SaveAsJsonCommand = new DelegateCommand(async() => { SavingJson = true; await evaluationManager.SaveAsJsonAsync(); SavingJson = false; }, CanSaveJson); ExportCsvCommand = new DelegateCommand(async() => { ExportingCsv = true; await evaluationManager.ExportCsvAsync(); ExportingCsv = false; }, CanExportCsv); ReevaluateCommand = new DelegateCommand(async() => { var student = await evaluationManager.ReevaluateStudent(Student.Name); if (student != null) { Student = student; } //Reset evaluation state to false again. eventAggregator.GetEvent <StudentEvaluationCompletedEvent>().Publish(false); }); CompleteEvaluationCommand = new DelegateCommand(() => { Student.IsEvaluationCompleted = !Student.IsEvaluationCompleted; RaisePropertyChanged(nameof(Student)); eventAggregator.GetEvent <StudentEvaluationCompletedEvent>().Publish(Student.IsEvaluationCompleted); }); _evaluationManager = evaluationManager; }
public PostAppService(IPostManager postManager, IEvaluationManager evaluationManager, IBlogManager blogManager) { _postManager = postManager; _evaluationManager = evaluationManager; _blogManager = blogManager; }
public EvaluationDialogViewModel(IEvaluationManager evaluationManager) { _evaluationManager = evaluationManager; CloseDialogCommand = new DelegateCommand(() => RequestClose?.Invoke(new DialogResult(ButtonResult.OK)), CanCloseDialog); }