private void WriteBlockInformations() { this.catalogStatus = "Blocs"; this.progessBarMax = reference.BlockLinesNb - 1; this.Status_BGW.ReportProgress(0); int lineIndex = 0; for (int sectionRank = 0; sectionRank <= reference.SectionLinesNb - 1; sectionRank++)// { reference = new Reference(appli, sectionRank, 0, 0); int blockNb = reference.Section_BlockNb; for (int blockRank = 0; blockRank <= blockNb - 1; blockRank++)// { reference = new Reference(appli, sectionRank, blockRank, 0); sceneInfo = new SceneInfo(reference); blockCSVManage = new CsvManage(blockCSVFile, reference, sceneInfo); if (blockCSVManage.IsSectionValid(reference.Section_Code, reference.Section_Name)) { blockCSVManage.SetBlockRow(); blockCSVFile.Flush(); } this.Status_BGW.ReportProgress(lineIndex); lineIndex++; } } this.DisposeCSVFile(blockCSVFile); }
private void WriteArticleInformations() { this.catalogStatus = "Articles"; if (GenerateTranslate_CHB.Checked) { this.catalogStatus += " et Traductions"; } this.progessBarMax = reference.ReferenceLinesNb - 1; this.Status_BGW.ReportProgress(0); int lineIndex = 0; for (int sectionRank = 0; sectionRank <= reference.SectionLinesNb - 1; sectionRank++)// { reference = new Reference(appli, sectionRank, 0, 0); int blockNb = reference.Section_BlockNb; for (int blockRank = 0; blockRank <= blockNb - 1; blockRank++) { reference = new Reference(appli, sectionRank, blockRank, 0); int articleNb = reference.Block_ArticleNb; for (int articleRank = 0; articleRank <= articleNb - 1; articleRank++) { int blockLineIndex = appli.Catalog.TableGetFirstLineRankFromClusterRank(CatalogEnum.TableId.BLOCKS, sectionRank); reference = new Reference(appli, sectionRank, blockRank + blockLineIndex, articleRank); sceneInfo = new SceneInfo(reference); articleCSVManage = new CsvManage(articleCSVFile, reference, sceneInfo); translateCSVManage = new CsvManage(translateCSVFile, reference, sceneInfo); //errorCSVManage = new CsvManage(errorCSVFile); if (articleCSVManage.IsSectionValid(reference.Section_Code, reference.Section_Name)) { articleCSVManage.SetArticlePlacedRow(errorCSVFile); articleCSVFile.Flush(); if (GenerateTranslate_CHB.Checked) { translateCSVManage.SetTranslatePlacedRow(errorCSVFile); translateCSVFile.Flush(); } } this.Status_BGW.ReportProgress(lineIndex); lineIndex++; } } } this.DisposeCSVFile(articleCSVFile); this.DisposeCSVFile(translateCSVFile); this.DisposeCSVFile(errorCSVFile); }
private void WriteSectionInformations() { this.catalogStatus = "Chapitres"; this.progessBarMax = reference.SectionLinesNb - 1; this.Status_BGW.ReportProgress(0); for (int sectionRank = 0; sectionRank <= reference.SectionLinesNb - 1; sectionRank++)// { reference = new Reference(appli, sectionRank, 0, 0); sceneInfo = new SceneInfo(reference); sectionCSVManage = new CsvManage(sectionCSVFile, reference, sceneInfo); if (sectionCSVManage.IsSectionValid(reference.Section_Code, reference.Section_Name)) { sectionCSVManage.SetSectionRow(); sectionCSVFile.Flush(); } this.Status_BGW.ReportProgress(sectionRank); } this.DisposeCSVFile(sectionCSVFile); }