/// <summary>
 /// Initializes a new instance of the <see cref="GradingViewModel"/> class.
 /// </summary>
 public GradingViewModel()
 {
     this.Gradings          = new ObservableCollection <GradingModel>();
     this.fileDialogService = new FileDialogService();
     this.messageBoxService = new MessageBoxService();
     this.examRating        = new ExamRatingDTO();
     this.students          = new List <StudentDTO>();
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatisticViewModel"/> class.
 /// </summary>
 public StatisticViewModel()
 {
     this.fileDialogService = new FileDialogService();
     this.messageBoxService = new MessageBoxService();
     this.gradings          = new List <GradingModel>();
     this.gradeRatings      = new List <GradeRatingDTO>();
     this.examRating        = new ExamRatingDTO();
     this.statistics        = new List <StatisticModel>();
 }
        private void SaveRating()
        {
            ExamRatingDTO examRatingModel = new ExamRatingDTO
            {
                ExamName          = this.ExamName,
                NumberOfProblems  = this.numberOfProblems,
                PointsPerGrade    = this.gradeRatings.ToList(),
                PointsPerProblems = this.problems.ToList(),
                TotalPoints       = this.totalPoints
            };

            this.fileDialogService.OpenSaveFileDialog(examRatingModel);
        }
 private void LoadExamRating()
 {
     this.messageBoxService.ShowInfoMessage(
         "Please Select a XML-File containing the Exam Ratings.",
         "Select a Exam Rating File.");
     try
     {
         this.examRating = this.fileDialogService.OpenLoadFileDialog <ExamRatingDTO>();
     }
     catch (InvalidOperationException ex)
     {
         this.messageBoxService.ShowErrorMessage("Please select a correct Exam Rating File.", ex);
     }
 }