public async Task Handle(object parameterObj) { var parameter = parameterObj as ConvertImageParameter; Console.WriteLine($"Start convert the Files from: {parameter.Source}"); Console.WriteLine($"Target File: {parameter.Target}"); var progress = new Progress <IProgressReport>(report => { TextProgressBar.Draw(report.Current, report.Total); }); await pdfOrganizerService.ConvertImage(parameter.Source, parameter.Target, parameter.Landscape, parameter.Letter, parameter.ViewAfterComplete, progress); }
public async Task Handle(object parameterObj) { var parameter = parameterObj as SplitParameter; Console.WriteLine($"Start Merge the Files from: {parameter.Source}"); Console.WriteLine($"Target File: {parameter.Target}" + (string.IsNullOrWhiteSpace(parameter.Prefix) ? "" : $" with prefix {parameter.Prefix}")); var progress = new Progress <IProgressReport>(report => { TextProgressBar.Draw(report.Current, report.Total); }); await pdfOrganizerService.Split(parameter.Source, parameter.Target, parameter.Prefix, progress); }
public async Task Handle(object parameterObj) { var parameter = parameterObj as MergeParameter; Console.WriteLine($"Start Merge the Files from: {parameter.FilesPath}"); Console.WriteLine($"To File: {parameter.FileName}"); Console.WriteLine($"On Node: {parameter.NodeName}"); var progress = new Progress <IProgressReport>(report => { TextProgressBar.Draw(report.Current, report.Total); }); await service.MergeFiles(parameter.FileName, parameter.NodeName, parameter.FilesPath, progress); }
public async Task Handle(object parameterObj) { var parameter = parameterObj as SplitBlockParameter; Console.WriteLine($"Start Merge the Files from: {parameter.Source}"); Console.WriteLine($"Target File: {parameter.Target}"); Console.WriteLine($"Setting File: {parameter.Setting}"); var progress = new Progress <IProgressReport>(report => { TextProgressBar.Draw(report.Current, report.Total); }); await pdfOrganizerService.SplitBlock(parameter.Source, parameter.Target, parameter.Setting, progress); }
public async Task Handle(object parameterObj) { var parameter = parameterObj as CompareParameter; Console.WriteLine("Start Compare the Files:"); Console.WriteLine($"{parameter.Path1}"); Console.WriteLine("And:"); Console.WriteLine($"{parameter.Path2}"); Console.WriteLine($"Config File: {parameter.ConfigFile}"); Console.WriteLine($"Result will Save to: {parameter.OutputPath}"); var progress = new Progress <IProgressReport>(report => { TextProgressBar.Draw(report.Current, report.Total); }); var compareFiles = await compareService.Compare(parameter.Path1, parameter.Path2, parameter.ConfigFile, progress); Thread.Sleep(200); await reportService.Output(compareFiles, parameter.Path1, parameter.Path2, parameter.OutputPath, false); }
public async Task Handle(object parameterObj) { var parameter = parameterObj as SplitParameter; Console.WriteLine($"Start Split the File: {parameter.FileName}"); Console.WriteLine($"On Node: {parameter.NodeName}"); Console.WriteLine($"To Path: {parameter.OutputPath}"); var progress = new Progress <IProgressReport>(report => { TextProgressBar.Draw(report.Current, report.Total); }); if (string.IsNullOrWhiteSpace(parameter.OutputFileNamePattern)) { await service.SplitFile(parameter.FileName, parameter.OutputPath, parameter.NodeName, progress); } else { Console.WriteLine($"Output File Name Pattern: {parameter.OutputFileNamePattern}"); await service.SplitFile(parameter.FileName, parameter.OutputPath, parameter.NodeName, parameter.OutputFileNamePattern, progress); } }