public BackWorker(MainFormOption mainFormOption) { this.pageSettingService = new PageSettingService(); this.headerFooterService = new HeaderFooterService(); this.docInfoService = new DocInfoService(); this.textReplaceService = new TextReplaceService(); this.paragraphService = new ParagraphService(); this.imageService = new ImageService(); this.hyperLinkService = new HyperLinkService(); this.tableService = new TableService(); this.pdfService = new PdfService(); this.mainFormOption = mainFormOption; this.logger = LogManager.GetCurrentClassLogger(); }
public static void DocInfoSet(DocX document, DocInfoService docInfoService, FormValOption formValOption) { string title = formValOption.DocTitle; string subject = formValOption.DocSubject; string category = formValOption.DocCategory; string description = formValOption.DocDescription; string creator = formValOption.DocCreator; string version = formValOption.DocVersion; Boolean editProtect = formValOption.DocEditPrctCheckBox; Boolean removeEditPrct = formValOption.DocEditPrctRemove; string editPassword = formValOption.DocEditPassword; DocInfoOption option = new DocInfoOption(subject, title, creator, "", description, "", "", category, version, "", ""); docInfoService.addCoreProperties(document, option); if (removeEditPrct) { docInfoService.DocRemoveProtect(document, removeEditPrct); } else if (editProtect) { docInfoService.DocProtect(document, editProtect, editPassword); } }
public static void UpdateFileTime(DocInfoService docInfoService, string targetFile, FormValOption formValOption) { docInfoService.UpdateFileTime(targetFile, formValOption.CreateTimeCheckBox, formValOption.DocCreateTime, formValOption.UpdateTimeCheckBox, formValOption.DocUpdateTime); }