Beispiel #1
0
 private void MainListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if ((MainListView?.Items?[MainListView.SelectedIndex].ToString() ?? "") != "")
     {
         if (MainListView.SelectedIndex + 1 == 1)
         {
             AddBN.Visibility  = Visibility.Collapsed;
             EditBN.Visibility = Visibility.Collapsed;
             DelBN.Visibility  = Visibility.Collapsed;
             ContentGrid.Children.Clear();
             ContentGrid.Children.Add(new UCReportsTeacher());
         }
         else
         if (MainListView.SelectedIndex + 1 == 2)
         {
             UCAdmin.SelectHelp();
         }
         else
         {
             AddBN.Visibility     = Visibility.Visible;
             EditBN.Visibility    = Visibility.Visible;
             DelBN.Visibility     = Visibility.Visible;
             MainWindow.NameGroup = ((TextBlock)MainListView.Items[MainListView.SelectedIndex]).Text;
             ContentGrid.Children.Clear();
             ContentGrid.Children.Add(new UCLogs());
         }
     }
 }
Beispiel #2
0
 private void MainListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if ((MainListView?.Items?[MainListView.SelectedIndex].ToString() ?? "") != "")
     {
         if (MainListView.SelectedIndex + 1 == 1)
         {
             UCAdmin.SelectHelp();
         }
         else
         {
             MainWindow.SubName = ((TextBlock)MainListView.Items[MainListView.SelectedIndex]).Text;
             ContentGrid.Children.Clear();
             ContentGrid.Children.Add(new UCStudentLogs());
         }
     }
 }