コード例 #1
0
 private void ByUniqueAccessCount_Click(object sender, RoutedEventArgs e)
 {
     if (Sort_Ascending.IsChecked == true)
     {
         Analyse.sortModulesByUniqueAccessCount();
     }
     else
     {
         Analyse.sortModulesByUniqueAccessCount("descending");
     }
     drawBarChart();
 }
コード例 #2
0
 private void ByMoodleSequence_Click(object sender, RoutedEventArgs e)
 {
     if (Sort_Ascending.IsChecked == true)
     {
         Analyse.sortModulesByMoodleSequence();
     }
     else
     {
         Analyse.sortModulesByMoodleSequence("descending");
     }
     drawBarChart();
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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();
            }
        }
コード例 #6
0
        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();
            }
        }
コード例 #7
0
 private void SelectInvertCommand_Executed(object sender, RoutedEventArgs e)
 {
     commitEdits();
     Analyse.invertAllStudents();
     studentDataGrid.Items.Refresh();
 }