Initial commit

Initial commit til Git.
V2 er deployed
This commit is contained in:
2026-06-13 17:31:50 +02:00
parent 9fcd2b145e
commit 41e23b6184
375 changed files with 15956 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EpsonPrinter.Model;
using ESCPOS_NET;
using ESCPOS_NET.Emitters;
using ESCPOS_NET.Utilities;
namespace EpsonPrinter.Services
{
public class PrintHeader
{
private ICommandEmitter _e;
public PrintHeader(ICommandEmitter e)
{
_e = e;
}
public List<Byte[][]> Print(List<HeaderModel> model)
{
List<byte[][]> data = new List<byte[][]>();
PrintStyleCombination printStyleCombination = new PrintStyleCombination();
PrintAlignment printAlignment = new PrintAlignment();
foreach (HeaderModel headerModel in model)
{
PrintStyle printStyle = printStyleCombination.Combine(headerModel.PrintStyles);
byte[][] bytes = {
_e.SetStyles(PrintStyle.None),
printAlignment.GetTextAlignment(_e,headerModel.TextAlignment),
_e.SetStyles(printStyle),
_e.PrintLine(headerModel.Value),
_e.FeedLines(headerModel.FeedingLines)
};
data.Add(bytes);
}
byte[][] feedLines =
{
_e.FeedLines(1)
};
data.Add(feedLines);
return data;
}
}
}