Beispiel #1
0
        public bool CloseAllDocuments()
        {
            if (ResourcesHandler.Project != null)
            {
                Project dirtyProject = (ResourcesHandler.Project.Dirty) ? ResourcesHandler.Project : null;
                var dirtyDialogues = ResourcesHandler.GetAllDialoguesDirty();

                if (!ShowPopupCloseDocuments(dirtyProject, dirtyDialogues))
                    return false;
            }

            //At this point, what should have been saved is saved, so we can force close every document
            while (documentDialogues.Count > 0)
            {
                CloseDocumentDialogue(documentDialogues[0], true);
            }

            CloseDocumentProject(true);

            return true;
        }