public StorageWorkerViewModel(IStorageFactory storageFactory, ISortStudentsForm sortStudentsForm, IStudentForm studentForm)
        {
            _storageFactory   = storageFactory;
            _sortStudentsForm = sortStudentsForm;
            _studentForm      = studentForm;

            CreateStorageCommand = new DelegateCommand(CreateStorage);
            OpenStorageCommand   = new DelegateCommand(OpenStorage);
            _saveStudentsCommand = new DelegateCommand(SaveStudents, () => _storage != null);

            _students = new ObservableCollection <StudentModel>();

            _sortStudentsForm.SearchSubmitted += SortStudentsFormOnSearchSubmitted;
            _studentForm.StudentSubmitted     += (sender, e) => _storage.Add(e.Student);
        }
Exemple #2
0
 public BookPresenter(IStudentForm studentFormView)
 {
     this.studentFormView = studentFormView;
 }