void m_worker_DoWork(object sender, DoWorkEventArgs e)
{
lock (this.m_bw)
{
switch (((BackgroundWorkerType)e.Argument))
{
//Load inventory without solutions
case BackgroundWorkerType.LoadInventory:
m_worker.ReportProgress(0, "Load Default Build Targets...");
this.m_bw.LoadDefaultBuildTargets(this.m_spoClientPath);
m_worker.ReportProgress(10, "Load Default Processors...");
this.m_bw.LoadDefaultProcessors(this.m_spoClientPath);
m_worker.ReportProgress(20, "Load Default Library Categories...");
this.m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
m_worker.ReportProgress(30, "Load Default Libraries...");
this.m_bw.LoadDefaultLibraries(this.m_spoClientPath);
this.m_bw.LoadLibraries(Path.Combine(this.m_spoClientPath, "Test\\Native\\Src"));
m_worker.ReportProgress(60, "Load Default Assemblies...");
this.m_bw.LoadDefaultAssemblies(this.m_spoClientPath);
m_worker.ReportProgress(70, "Load Default Features...");
this.m_bw.LoadDefaultFeatures(this.m_spoClientPath);
//m_worker.ReportProgress(80, "Load Solutions...");
//this.m_bw.LoadSolutions(Path.Combine(this.m_spoClientPath, "Solutions"));
break;
case BackgroundWorkerType.LoadDefaultLibraryCategories:
this.m_helper.DefaultInventory.LibraryCategories.Clear();
m_worker.ReportProgress(0, "Load Default Library Categories...");
m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
break;
case BackgroundWorkerType.LoadDefaultFeatures:
this.m_helper.DefaultInventory.Features.Clear();
m_worker.ReportProgress(0, "Load Default Features...");
m_bw.LoadDefaultFeatures(this.m_spoClientPath);
break;
case BackgroundWorkerType.LoadDefaultLibraries:
this.m_helper.DefaultInventory.Libraries.Clear();
m_worker.ReportProgress(40, "Load Default Libraries...");
this.m_bw.LoadDefaultLibraries(this.m_spoClientPath);
if (this.m_solution != null)
{
m_worker.ReportProgress(30, "Load Solution Libraries...");
this.m_bw.LoadLibraries(this.m_solution.ProjectPath);
}
this.m_bw.LoadLibraries(Path.Combine(this.m_spoClientPath, "Test\\Native\\Src"));
break;
case BackgroundWorkerType.LoadSolution:
m_worker.ReportProgress(0, "Load Solution Proj...");
this.m_solution = BaseWrapper.Wrap<SolutionWrapper>(this.m_bw.LoadSolutionProj(this.m_selectedSolution.Component.ProjectPath, ""));
m_worker.ReportProgress(30, "Load Libraries...");
this.m_bw.LoadLibraries(this.m_solution.ProjectPath);
m_worker.ReportProgress(60, "Load Default Library Categories...");
this.m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
this.SetSolutionTransportType(this.m_solution);
break;
//case BackgroundWorkerType.LoadFeatures:
// m_worker.ReportProgress(0, "Load Features...");
// if ((this.m_solution == null) && (this.m_selectedSolution != null))
// {
// m_worker.ReportProgress(10, "Load Solution Proj...");
// this.m_solution = this.m_bw.LoadSolutionProj(this.m_selectedSolution.Component.ProjectPath, "");
// }
// if (Helper.IsWindowsSolution(this.m_solution))
// {
// m_worker.ReportProgress(30, "Load Default Libraries...");
// this.m_bw.LoadDefaultLibraries(this.m_spoClientPath);
// m_worker.ReportProgress(40, "Load Default Library Categories...");
// this.m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
// m_worker.ReportProgress(50, "Load Default Manifest Files...");
// this.m_bw.LoadDefaultManifestFiles(this.m_spoClientPath);
// }
// m_worker.ReportProgress(80, "Load Default Features...");
// this.m_bw.LoadDefaultFeatures(this.m_spoClientPath);
// break;
//case BackgroundWorkerType.LoadSolution:
// m_worker.ReportProgress(0, "Load Solution Proj...");
// this.m_solution = this.m_bw.LoadSolutionProj(this.m_selectedSolution.Component.ProjectPath, "");
// m_worker.ReportProgress(30, "Load Libraries...");
// this.m_bw.LoadLibraries(this.m_solution.ProjectPath);
// m_worker.ReportProgress(60, "Load Default Library Categories...");
// this.m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
// break;
//case BackgroundWorkerType.LoadProjects:
// if (this.m_inv.ProjectTemplates.Count == 0)
// {
// m_worker.ReportProgress(0, "Load Template Projects...");
// this.m_bw.LoadTemplateProjects(this.m_spoClientPath + @"\ProjectTemplates");
// }
// break;
//case BackgroundWorkerType.LoadLibraries:
// m_worker.ReportProgress(0, "Load Default Libraries...");
// this.m_bw.LoadDefaultLibraries(this.m_spoClientPath);
// m_worker.ReportProgress(20, "Load Default Manifest Files...");
// this.m_bw.LoadDefaultManifestFiles(this.m_spoClientPath);
// m_worker.ReportProgress(40, "Load Default Library Categories...");
// this.m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
// m_worker.ReportProgress(80, "Load Default Features...");
// this.m_bw.LoadDefaultFeatures(this.m_spoClientPath);
// break;
//case BackgroundWorkerType.LoadProcessors:
// m_worker.ReportProgress(0, "Load Processors...");
// this.m_bw.LoadProcessors(this.m_spoClientPath + @"\DeviceCode\Targets\Native");
// this.m_bw.LoadProcessors(this.m_spoClientPath + @"\DeviceCode\Targets\OS");
// break;
//case BackgroundWorkerType.LoadAll:
// m_worker.ReportProgress(0, "Load Default Build Targets...");
// this.m_bw.LoadDefaultBuildTargets(this.m_spoClientPath);
// m_worker.ReportProgress(20, "Load Default Processors...");
// this.m_bw.LoadDefaultProcessors(this.m_spoClientPath);
// m_worker.ReportProgress(30, "Load Default Library Categories...");
// this.m_bw.LoadDefaultLibraryCategories(this.m_spoClientPath);
// m_worker.ReportProgress(40, "Load Default Libraries...");
// this.m_bw.LoadDefaultLibraries(this.m_spoClientPath);
// m_worker.ReportProgress(50, "Load Default Assemblies...");
// this.m_bw.LoadDefaultAssemblies(this.m_spoClientPath);
// m_worker.ReportProgress(60, "Load Default Features...");
// this.m_bw.LoadDefaultFeatures(this.m_spoClientPath);
// //m_worker.ReportProgress(80, "Load Solutions...");
// //this.m_bw.LoadSolutions(this.m_spoClientPath + @"\Solutions");
// break;
}
}
e.Result = e.Argument;
m_worker.ReportProgress(100, "Ready");
}