public void Dispose()
        {
            Close();

            projectContentView.OpenEntity   -= new ProjectContentView.OpenEntityHandler(OnOpenProjectEntity);
            dockPanel.ActiveDocumentChanged -= new EventHandler(OnActiveDocumentChanged);
            Env.Current.ScriptManager.ScriptApplication.OpenEntity -= new FreeSCADA.Common.Scripting.Application.OpenEntityHandler(OnOpenProjectEntity);

            projectContentView.Dispose();
            logConsoleView.Dispose();
            dockPanel.Dispose();
            mruManager.Dispose();
        }
        public void Dispose()
        {
            ForceWindowsClose();
            projectContentView.OpenEntity   -= new ProjectContentView.OpenEntityHandler(ActivateDocument);
            projectContentView.SelectNode   -= new ProjectContentView.SelectNodeHandler(OnSelectProjectNode);
            dockPanel.ActiveDocumentChanged -= new EventHandler(OnActiveDocumentChanged);
            //Env.Current.ScriptManager.NewScriptCreated -= new ScriptManager.NewScriptCreatedHandler(OnOpenScript);

            //Create toolwindows
            projectContentView.Dispose();
            toolBoxView.Dispose();
            propertyBrowserView.Dispose();

            mruManager.Dispose();
        }