Esempio n. 1
0
 private void Keyboard(object sender, Input.KeyEventArgs e)
 {
     if (e.Key == Input.Key.Delete && FileExcep_ListView.SelectedItem != null)
     {
         FileException.RemoveAt(FileException.IndexOf(FileExcep_ListView.SelectedItem.ToString()));
         FileExcep_ListView.ItemsSource = null;
         FileExcep_ListView.ItemsSource = FileException;
     }
 }
Esempio n. 2
0
 private void Minus_Button_Click(object sender, RoutedEventArgs e)
 {
     if (FileExcep_ListView.SelectedItem == null && FileException.Count != 0)
     {
         FileException.RemoveAt(FileException.IndexOf(FileException.Last()));
     }
     else if (FileException.Count > 0)
     {
         FileException.RemoveAt(FileException.IndexOf(FileExcep_ListView.SelectedItem.ToString()));
     }
     FileExcep_ListView.ItemsSource = null;
     FileExcep_ListView.ItemsSource = FileException;
 }