Add project files.

This commit is contained in:
EugeneTes
2026-01-13 09:06:47 +01:00
parent dd935fe1fa
commit 7390693f50
187 changed files with 83457 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
using Inspectron.Epson.PrintServer.PrintServices;
using System.Reflection;
namespace Inspectron.Epson.PrintServer.Printers;
public class TM_U220II:IPrinter
{
private readonly EpsonPrinter _printer;
public TM_U220II(EpsonPrinter printer)
{
_printer = printer;
}
public async Task InitAsync()
{
await _printer.InitAsync();
await Task.Delay(200);
}
public Task PrintImageAsync(string path)
{
return Task.CompletedTask;
}
public async Task SetFontSizeAsync(int fontSize)
{
await _printer.SetBiggerFontTM220(fontSize == 2);
await Task.Delay(200);
await _printer.SelectFont(EpsonCommands.PrinterFont.A);
await Task.Delay(200);
}
public async Task PrintTextAsync(string text)
{
await _printer.PrintTextAsync(text);
var lines = text.Split('\n').Length;
for (int i = 0; i < lines; i++)
{
await Task.Delay(200);
}
await _printer.FeedLinesAsync(5);
await Task.Delay(200);
}
public async Task Cut()
{
await _printer.CutAsync();
await Task.Delay(200);
}
}