47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
namespace PrintServiceTray.Models;
|
|
|
|
/// <summary>
|
|
/// Configuration for all document types
|
|
/// </summary>
|
|
public class PrinterConfiguration
|
|
{
|
|
public Dictionary<string, DocumentTypeConfig> DocumentTypes { get; set; } = new();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Configuration for a single document type
|
|
/// </summary>
|
|
public class DocumentTypeConfig
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
public List<PageConfig> Pages { get; set; } = new();
|
|
|
|
// Rust transformation properties (optional - can be edited in JSON directly)
|
|
public int LinePadding { get; set; } = 0;
|
|
public bool RemoveOrderNumber { get; set; } = false;
|
|
public bool RemoveOrderNumberLabel { get; set; } = false;
|
|
public string IndentOrderNumber { get; set; } = string.Empty;
|
|
public Dictionary<int, int> RowShift { get; set; } = new();
|
|
public Dictionary<int, RowTrimConfig> RowTrim { get; set; } = new();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Configuration for a single page
|
|
/// </summary>
|
|
public class PageConfig
|
|
{
|
|
public int PageNumber { get; set; }
|
|
public string PrinterName { get; set; } = string.Empty;
|
|
public int TrayNumber { get; set; }
|
|
public string? TrayLabel { get; set; } // Optional: "Pink Paper", "Green Paper", etc.
|
|
}
|
|
|
|
/// <summary>
|
|
/// Configuration for row trimming (horizontal character removal)
|
|
/// </summary>
|
|
public class RowTrimConfig
|
|
{
|
|
public int Start { get; set; }
|
|
public int End { get; set; }
|
|
}
|