예제 #1
0
        public void Execute(object parameter)
        {
            if (parameter is not CategoryPresentation category)
            {
                return;
            }

            var result = MessageBox.Show($"Delete category {category.Name}?", "Delete", MessageBoxButton.YesNo);

            if (result == MessageBoxResult.Yes)
            {
                _mainPresentation.DeleteCategory(category);
            }
        }