コード例 #1
0
 private void Remove_Click(object sender, RoutedEventArgs e)
 {
     if (RightListBox.IsKeyboardFocusWithin)
     {
         TeamOb.Remove((Person)RightListBox.SelectedItem);
     }
     else if (LeftListBox.IsKeyboardFocusWithin)
     {
         TeamOb.RemoveAt(LeftListBox.SelectedIndex);
     }
     else
     {
         MessageBox.Show("Ничего не выбрано", "Сообщение", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #2
0
 private void RemoveCommandHandler(object sender, ExecutedRoutedEventArgs e)
 {
     team.RemoveAt(this.teamObservableListBox.SelectedIndex);
 }