private void OnDocumentDelete(object sender, EventArgs e)
        {
            Dialogue dialogue = tree.SelectedNode.Tag as Dialogue;

            if (dialogue != null)
            {
                var          dialog  = new DialogConfirmDelete(dialogue);
                DialogResult eResult = dialog.ShowDialog();
                if (eResult == DialogResult.Cancel)
                {
                    return;
                }

                if (EditorCore.MainWindow != null)
                {
                    EditorCore.MainWindow.CloseDocumentDialogue(dialogue, true);
                }

                TreeNode nodeFolder = tree.SelectedNode.Parent;

                tree.Nodes.Remove(tree.SelectedNode);
                tree.SelectedNode = null;

                DeleteIfEmptyFolder(nodeFolder);

                ResourcesHandler.RemoveDialogue(dialogue);

                string filePathName = Path.Combine(EditorHelper.GetProjectDirectory(), dialogue.GetFilePathName());
                if (File.Exists(filePathName))
                {
                    File.Delete(filePathName);
                }
            }
        }
        private void OnDocumentDelete(object sender, EventArgs e)
        {
            Dialogue dialogue = tree.SelectedNode.Tag as Dialogue;

            if (dialogue != null)
            {
                var          dialog  = new DialogConfirmDelete(dialogue);
                DialogResult eResult = dialog.ShowDialog();
                if (eResult == DialogResult.Cancel)
                {
                    return;
                }

                if (EditorCore.MainWindow != null)
                {
                    EditorCore.MainWindow.CloseDocumentDialogue(dialogue, true);
                }

                TreeNode nodeFolder = tree.SelectedNode.Parent;

                tree.Nodes.Remove(tree.SelectedNode);
                tree.SelectedNode = null;

                DeleteIfEmptyFolder(nodeFolder);

                ResourcesHandler.RemoveDialogueFile(dialogue);
            }
        }