using HKCU for printer output path, starting file watcher when receiving first job and restart file watcher, if output path in registry has changed
This commit is contained in:
parent
4a23f4ffb8
commit
2811a2ea29
13 changed files with 94 additions and 46 deletions
|
|
@ -66,8 +66,7 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
try
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
var root = _directoryHelper.GetOutputDirectory(config);
|
||||
|
||||
var jobInfo = GetCurrentPrintJobs(printerName).FirstOrDefault();
|
||||
if (jobInfo == null)
|
||||
{
|
||||
|
|
@ -75,6 +74,9 @@ namespace AmagnoVirtualPrinter.Agent.Lib.Misc
|
|||
}
|
||||
|
||||
var session = GetCurrentSessions(jobInfo).FirstOrDefault();
|
||||
var config = _registryRepository.GetRegistryConfig();
|
||||
var userConfig = _registryRepository.GetUserRegistryConfig(session.Sid);
|
||||
var root = _directoryHelper.GetOutputDirectory(userConfig);
|
||||
var iniName = GenerateFileName(now, jobInfo.JobId, 0, config.FileNameMask, "ini");
|
||||
var iniPath = Path.Combine(root, iniName);
|
||||
var extension = GetRawFileExtension(config.IntermediateFormat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue