private void ByUniqueAccessCount_Click(object sender, RoutedEventArgs e) { if (Sort_Ascending.IsChecked == true) { Analyse.sortModulesByUniqueAccessCount(); } else { Analyse.sortModulesByUniqueAccessCount("descending"); } drawBarChart(); }
private void ByMoodleSequence_Click(object sender, RoutedEventArgs e) { if (Sort_Ascending.IsChecked == true) { Analyse.sortModulesByMoodleSequence(); } else { Analyse.sortModulesByMoodleSequence("descending"); } drawBarChart(); }
private void ChartCommand_Executed(object sender, RoutedEventArgs e) { commitEdits(); if (Analyse.selectedStudentCount > 0) { Analyse.findExcludedStudents(); Analyse.findModules(); Analyse.findSections(); Analyse.sortModulesByMoodleSequence(); ChartWindow c = new ChartWindow(); c.ShowDialog(); } }
private void SaveCommand_Executed(object sender, RoutedEventArgs e) { SaveFileDialog dlg = new SaveFileDialog(); dlg.FileName = "Log"; // Default file name dlg.DefaultExt = ".ods"; // Default file extension dlg.Filter = "Open Document Spreadsheets (.ods)|*.ods"; // Filter files by extension if (dlg.ShowDialog() == true) { commitEdits(); Analyse.storeStudentData(dlg.FileName); } }
private void OpenCommand_Executed(object sender, RoutedEventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.FileName = "Log"; // Default file name dlg.DefaultExt = ".ods"; // Default file extension dlg.Filter = "Open Document Spreadsheets (.ods)|*.ods"; // Filter files by extension if (dlg.ShowDialog() == true) { commitEdits(); Analyse.getStudentData(dlg.FileName); studentDataGrid.Items.Refresh(); } }
private void ImportLogCommand_Executed(object sender, RoutedEventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.FileName = "Log"; // Default file name dlg.DefaultExt = ".ods"; // Default file extension dlg.Filter = "Open Document Spreadsheets (.ods)|*.ods"; // Filter files by extension if (dlg.ShowDialog() == true) { commitEdits(); Analyse.getData(dlg.FileName); Analyse.findStudents(); // This binds the student list to the data grid on the form itemCollectionViewSource = (CollectionViewSource)(FindResource("ItemCollectionViewSource")); itemCollectionViewSource.Source = Analyse.studentList; itemCollectionViewSource.View.Refresh(); } }
private void SelectInvertCommand_Executed(object sender, RoutedEventArgs e) { commitEdits(); Analyse.invertAllStudents(); studentDataGrid.Items.Refresh(); }