test run works
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Inspectron.Epson.PrintServer.Printers.Utils.OrderItems;
|
||||
|
||||
namespace Inspectron.Epson.PrintServer.Printers.Utils;
|
||||
|
||||
public class ReceiptConverterFactory : IReceiptConverterFactory
|
||||
{
|
||||
public IReceiptConverter Create(int receiptType, int lineWidth, int bigFontLineWidth)
|
||||
{
|
||||
return (EReceiptType)receiptType switch
|
||||
{
|
||||
EReceiptType.Receipt => new FinalReceipt.FinalReceiptConverter(lineWidth, bigFontLineWidth),
|
||||
EReceiptType.WorkareaTicket => new KitchenReceipt.KitchenReceiptConverterAdapter(33, 20),
|
||||
EReceiptType.NextCourse => new KitchenReceipt.KitchenReceiptConverterAdapter(33, 20),
|
||||
EReceiptType.OrdersOverview => new OrderItemsReceiptConverter(lineWidth, bigFontLineWidth),
|
||||
_ => throw new ArgumentException($"Unknown receipt type: {receiptType}")
|
||||
};
|
||||
}
|
||||
public enum EReceiptType
|
||||
{
|
||||
Receipt,
|
||||
WorkareaTicket,
|
||||
NextCourse,
|
||||
OrdersOverview
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user