NotifyContentDeleted() private method

private NotifyContentDeleted ( PackagePart packagePart ) : void
packagePart PackagePart
return void
Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }