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
|
|
@ -1,7 +1,10 @@
|
|||
namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
||||
{
|
||||
public interface IDirectoryHelper
|
||||
{
|
||||
string GetOutputDirectory(IExConfig config);
|
||||
[NotNull]
|
||||
string GetOutputDirectory([NotNull] IUserConfig config);
|
||||
}
|
||||
}
|
||||
|
|
@ -20,12 +20,6 @@ namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
|||
[NotNull]
|
||||
Tuple<string, string> ResolvedPostconverter { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The full path of the output directory.
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
string ResolvedOutputDirectory { get; }
|
||||
|
||||
/// <summary>
|
||||
/// An intermediate format which is read by the printer or similar.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -43,5 +43,12 @@ namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
|||
/// <param name="iniPath">The path to the ini file</param>
|
||||
/// <returns><see cref="JobStatus"/></returns>
|
||||
JobStatus ReadJobStatus(string iniPath);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="SessionInfo" from ini file./>
|
||||
/// </summary>
|
||||
/// <param name="iniFile">The path to the ini file</param>
|
||||
/// <returns><see cref="SessionInfo"/></returns>
|
||||
SessionInfo GetSessionInfo(string iniFile);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,11 @@ namespace AmagnoVirtualPrinter.Agent.Core.Interfaces
|
|||
/// <remarks>Intital value is PDF</remarks>
|
||||
[NotNull]
|
||||
string Format { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The full path of the output directory.
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
string ResolvedOutputDirectory { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -13,8 +13,6 @@ namespace AmagnoVirtualPrinter.Agent.Core.Model
|
|||
|
||||
public string Preconverter { get; set; }
|
||||
|
||||
public string OutputDirectory { get; set; }
|
||||
|
||||
public string FileNameMask { get; set; }
|
||||
|
||||
public short PrinterPort { get; set; }
|
||||
|
|
@ -29,11 +27,6 @@ namespace AmagnoVirtualPrinter.Agent.Core.Model
|
|||
get { return GetResolvedArgs(Postconverter); }
|
||||
}
|
||||
|
||||
public string ResolvedOutputDirectory
|
||||
{
|
||||
get { return string.IsNullOrWhiteSpace(OutputDirectory) ? "" : Path.GetFullPath(OutputDirectory); }
|
||||
}
|
||||
|
||||
public IntermediateFormat IntermediateFormat { get; set; }
|
||||
|
||||
[NotNull]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
using System.IO;
|
||||
using AmagnoVirtualPrinter.Agent.Core.Interfaces;
|
||||
|
||||
namespace AmagnoVirtualPrinter.Agent.Core.Model
|
||||
{
|
||||
|
|
@ -11,5 +12,12 @@ namespace AmagnoVirtualPrinter.Agent.Core.Model
|
|||
public double? UserRenderDpi { get; set; }
|
||||
|
||||
public string Format { get; set; }
|
||||
|
||||
public string OutputDirectory { get; set; }
|
||||
|
||||
public string ResolvedOutputDirectory
|
||||
{
|
||||
get { return string.IsNullOrWhiteSpace(OutputDirectory) ? "" : Path.GetFullPath(OutputDirectory); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue