Dev2.Studio.UserInterfaceLayoutProvider.QueryDeleteExplorerResource C# (CSharp) Method

QueryDeleteExplorerResource() private method

private QueryDeleteExplorerResource ( string resourceName, string resourceType, bool hasDependencies, bool &openDependencyGraph ) : bool
resourceName string
resourceType string
hasDependencies bool
openDependencyGraph bool
return bool
        private bool QueryDeleteExplorerResource(string resourceName, string resourceType, bool hasDependencies,
                                                 out bool openDependencyGraph)
        {
            openDependencyGraph = false;



            bool shouldRemove = MessageBox.Show(Application.Current.MainWindow, "Are you sure you wish to delete the \""
                                                                                + resourceName + "\" " + resourceType +
                                                                                "?",
                                                "Confirm " + resourceType + " Deletion", MessageBoxButton.YesNo) ==
                                MessageBoxResult.Yes;

            if (shouldRemove && hasDependencies)
            {
                var dialog = new DeleteResourceDialog("Confirm " + resourceType + " Deletion", "The \""
                                                                                               + resourceName + "\" " +
                                                                                               resourceType +
                                                                                               " has resources that depend on it to function, are you sure you want to delete this "
                                                                                               + resourceType + "?",
                                                      true) { Owner = Application.Current.MainWindow };
                bool? result = dialog.ShowDialog();
                shouldRemove = result.HasValue && result.Value;

                openDependencyGraph = dialog.OpenDependencyGraph;
                shouldRemove = !dialog.OpenDependencyGraph;
            }

            return shouldRemove;
        }