test run works
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user