public StandartDpofDocument(string miscDirectoryPath, IEnumerable <PrintFileInfo> printFileInfos) : base(miscDirectoryPath) { var headerSection = new DpofHeaderSection(); var jobSections = new List <DpofJobSection>(); var counter = 1; foreach (var file in printFileInfos) { var job = new DpofJobSection(counter++, GetRelativeToWorkingDirectory(file.FilePath), file.CopyCount, GetImageFormat(file.FilePath)); jobSections.Add(job); } _autoPrintFile = new DpofAutoPrintFile(miscDirectoryPath, headerSection, jobSections); var unicodeTexts = headerSection.Parameters.Where(p => p is IUnicodeTextProvider).Cast <IUnicodeTextProvider>().ToList(); foreach (var section in jobSections) { unicodeTexts.AddRange(section.Parameters.Where(p => p is IUnicodeTextProvider).Cast <IUnicodeTextProvider>().ToList()); } _unicodeTextDescriptionFile = new DpofUnicodeTextDescriptionFile(miscDirectoryPath, new DpofStringSection(unicodeTexts)); }
public DpofAutoPrintFile(string miscDirectoryPath, DpofHeaderSection headerSection, IEnumerable <DpofJobSection> jobSections) : base(miscDirectoryPath) { _headerSection = headerSection; _jobSections = jobSections; }