using ESCPOS_NET; using ESCPOS_NET.Emitters; using ESCPOS_NET.Extensions; using ESCPOS_NET.Utilities; public class PrinterService { private BasePrinter printer; private EPSON e = new EPSON(); public PrinterService(string filePath) { printer = new FilePrinter(filePath); } public string GetName() { return printer.PrinterName; } public PrinterStatusEventArgs GetStatus() { return printer.Status; } public void Print(List instructions) { var commands = new List(); foreach (var instruction in instructions) { commands.AddRange(instruction.GetInstructions()); } printer.Write(ByteSplicer.Combine(commands.ToArray())); } }