public void Delete() { bool confirm = PackageViewModel.UIServices.Confirm( String.Format(CultureInfo.CurrentCulture, Resources.ConfirmToDeleteContent, Name), isWarning: true); if (!confirm) { return; } if (Parent != null) { Parent.Children.Remove(this); PackageViewModel.NotifyContentDeleted(this); } }
public void Delete(bool requireConfirmation = true) { if (requireConfirmation) { var confirm = PackageViewModel.UIServices.Confirm( Resources.ConfirmToDeleteContent_Title, string.Format(CultureInfo.CurrentCulture, Resources.ConfirmToDeleteContent, Name), isWarning: true); if (!confirm) { return; } } if (Parent != null) { Parent.RemoveChild(this); PackageViewModel.NotifyContentDeleted(this); } }