Пример #1
0
        private void DeleteUnit()
        {
            MessageBoxResult result = MessageBox.Show(
                "Are you sure you want to delete the selected unit?", "Confirm Delete",
                MessageBoxButton.YesNoCancel, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                Storage.DeleteUnit(SelectedUnit.ToModel());
                SelectedProject.Units.Remove(SelectedUnit);
            }
        }