private void AddEvent_Click(object sender, RoutedEventArgs e)
        {
            AddSubjectWindow w = new AddSubjectWindow(CurrentWindow.AddSubject);

            w.ShowDialog();
            UpdateSubjects();
        }
 private void EditEvent_Click(object sender, RoutedEventArgs e)
 {
     if (SubjectGrid.SelectedIndex >= 0)
     {
         AddSubjectWindow w = new AddSubjectWindow(CurrentWindow.EditSubject, _subjectsCollection.ElementAt(SubjectGrid.SelectedIndex).Value,
                                                   _subjectsCollection.ElementAt(SubjectGrid.SelectedIndex).Key);
         w.ShowDialog();
         UpdateSubjects();
     }
     else
     {
         MessageBox.Show("Оберіть предмет");
     }
 }
 private void EditEvent_Click(object sender, RoutedEventArgs e)
 {
     if (SubjectGrid.SelectedIndex >= 0)
     {
     AddSubjectWindow w = new AddSubjectWindow(CurrentWindow.EditSubject, _subjectsCollection.ElementAt(SubjectGrid.SelectedIndex).Value,
         _subjectsCollection.ElementAt(SubjectGrid.SelectedIndex).Key);
     w.ShowDialog();
     UpdateSubjects();
 }
     else
     {
         MessageBox.Show("Оберіть предмет");
     }
 }
 private void AddEvent_Click(object sender, RoutedEventArgs e)
 {
     AddSubjectWindow w = new AddSubjectWindow(CurrentWindow.AddSubject);
     w.ShowDialog();
     UpdateSubjects();
 }