예제 #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 AddToQueue(string path)
        {
            if (!CanCompile() || !File.Exists(path))
            {
                return;
            }

            FileInfo fileInfo = new FileInfo(path);

            if (fileInfo.Extension != ".qc")
            {
                return;
            }

            int count = _compileList.Count();

            _compileList.Add(path);

            if (count <= 0)
            {
                _compileArgs            = Globals.compileArguments.Text;
                Globals.compileLog.Text = null;
                _currentItemInList      = 0;
                _m_bIsCompiling         = true;
                WindowHandler.SaveOpenedFiles();
                SharedEvents.StartCompile();
                ProcessQCFile();
            }
        }
예제 #3
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;
        }