示例#1
0
        private void DeleteNinja(object sender, RoutedEventArgs e)
        {
            switch (MessageBox.Show("Delete? Really?", "Ninja Entry", MessageBoxButton.YesNo))
            {
            case MessageBoxResult.Yes:
                var ninjaToDelete = _currentNinja;
                ninjaListBox.SelectedIndex = 0;
                _repo.DeleteCurrentNinja(ninjaToDelete);
                break;

            case MessageBoxResult.No:
                break;
            }
        }