示例#1
0
        private void mnuClassView_Click(object sender, RoutedEventArgs e)
        {
            // Open the edit class window
            EditClassWindow editClass = new EditClassWindow();

            editClass.ShowDialog();
        }
        private void btnClassEdit_Click(object sender, RoutedEventArgs e)
        {
            // Open edit class window & show & then fix list of classes
            EditClassWindow ecw = new EditClassWindow();

            ecw.ShowDialog();

            populateClassesList();
        }
示例#3
0
 private void btnEditClass_Click(object sender, RoutedEventArgs e)
 {
     // Show the edit class dialog. Most dialogs like this are only visible by sysadmins, but this one
     //  is shared, since it makes more sense for a teacher to be able to edit classes.
     // First, naturally, we make sure they've selected a class and then we pass it as an argument
     if (lstClasses.SelectedIndex != -1)
     {
         EditClassWindow ecw = new EditClassWindow((Class)lstClasses.SelectedItem);
         ecw.ShowDialog();
     }
     else
     {
         App.Message("Validation Error", "Please select a class to edit.");
     }
 }