test run works

This commit is contained in:
EugeneTes
2026-01-20 10:11:04 +01:00
parent 4720ca2d57
commit 6f5116736c
22 changed files with 351 additions and 441 deletions

View File

@@ -1,10 +1,9 @@
using Inspectron.Epson.PrintServer.PrintServices;
using System.Net.NetworkInformation;
using System.Reflection;
using Inspectron.Epson.PrintServer.Printers.Utils;
using Inspectron.Epson.PrintServer.PrintServices;
namespace Inspectron.Epson.PrintServer.Printers;
public class TM_T30III:IPrinter
public class TM_T30III : IPrinter
{
private readonly EpsonPrinter _printer;
@@ -33,11 +32,25 @@ public class TM_T30III:IPrinter
await _printer.SetFontSizeAsync(fontSize, fontSize);
}
public async Task PrintTextAsync(string text)
public async Task PrintAsync(List<PrintCommand> commands)
{
await _printer.PrintTextAsync(text);
foreach (var command in commands)
{
if (command.IsBig)
{
await _printer.SetFontSizeAsync(2, 2);
}
else
{
await _printer.SetFontSizeAsync(1, 1);
}
await _printer.SetRedColor(command.IsRed);
await _printer.SetEmphasized(command.IsBold);
await _printer.PrintTextAsync(command.Text + "\n");
}
await _printer.FeedLinesAsync(5);
var status = await _printer.GetPrinterStatusAsync();
}
public async Task Cut()