public void StartAnalysis(List <GenerationError> generationErrors) { if (backgroundWorker1.IsBusy) { return; } GenerationErrors = generationErrors; SetupFolders(); m_numResolvable = 0; m_numExactCopy = 0; m_numConflicts = 0; if (!Directory.Exists(Controller.Instance.ProjectSettings.ProjectPath)) { throw new Exception("The project folder is missing. Please fix this on the 'Project Details' screen."); } if (!Directory.Exists(Controller.Instance.GetTempFilePathForComponent(ComponentKey.WorkbenchFileGenerator))) { throw new FileNotFoundException("Invalid Generation folder: " + Controller.Instance.GetTempFilePathForComponent(ComponentKey.WorkbenchFileGenerator)); } m_workerStatus = WorkerStatusTypes.Busy; backgroundWorker1.WorkerReportsProgress = false; backgroundWorker1.WorkerSupportsCancellation = false; // Start the asynchronous analysis backgroundWorker1.RunWorkerAsync(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { Controller.ReportError(e.Error); } // Reset FoldersHaveBeenCreated back to false, because the user might re-generate after this run is now finished. FoldersHaveBeenCreated = false; m_workerStatus = WorkerStatusTypes.Idle; RaiseFinishedEvent(); }
public void StartAnalysis(List<GenerationError> generationErrors) { if (backgroundWorker1.IsBusy) { return; } GenerationErrors = generationErrors; SetupFolders(); m_numResolvable = 0; m_numExactCopy = 0; m_numConflicts = 0; if (!Directory.Exists(Controller.Instance.ProjectSettings.ProjectPath)) { throw new Exception("The project folder is missing. Please fix this on the 'Project Details' screen."); } if (!Directory.Exists(Controller.Instance.GetTempFilePathForComponent(ComponentKey.WorkbenchFileGenerator))) { throw new FileNotFoundException("Invalid Generation folder: " + Controller.Instance.GetTempFilePathForComponent(ComponentKey.WorkbenchFileGenerator)); } m_workerStatus = WorkerStatusTypes.Busy; backgroundWorker1.WorkerReportsProgress = false; backgroundWorker1.WorkerSupportsCancellation = false; // Start the asynchronous analysis backgroundWorker1.RunWorkerAsync(); }