예제 #1
0
        public static void RemoveProject(bool bDelete = false)
        {
            string projectPath = GetProjectDirectory();

            WindowHandler.CloseAllWindows();
            Globals.compileLog.Text = null;
            _projectFilters.Dispose();
            _projectFilters = null;

            if (bDelete)
            {
                try
                {
                    if (Directory.Exists(projectPath))
                    {
                        Directory.Delete(projectPath, true);
                    }
                }
                catch
                {
                    LoggingUtils.LogEvent("Unable to delete entire folder.");
                }

                _pszActiveProjectPath = null;
                return;
            }

            _projectFilters = new Filter(_projectName);
        }
예제 #2
0
        public static void CloseProject()
        {
            if (!IsProjectLoaded())
            {
                return;
            }

            // We want to close our project, what do we do?:
            // Close all windows associated to the project,
            // Auto Save the current stuff,
            // Cancel any in-action process such as compiling.
            if (CompilerUtils.IsCompiling())
            {
                CompilerUtils.StopCompile();
            }

            SaveProject();
            WindowHandler.CloseAllWindows();

            _projectFilters.Dispose();
            _projectFilters = null;
            SharedEvents.ClosedProject();
            _pszActiveProjectPath   = null;
            Globals.compileLog.Text = null;
        }