private void Format(string name, string description) { BeforePrint(); if (!string.IsNullOrEmpty(description)) { name += $"({description})"; } BufferList.Add(PrinterCmdUtils.FontSizeSetBig(3)); BufferList.Add(PrinterCmdUtils.AlignLeft()); BufferList.Add(PrinterCmdUtils.PrintLineLeftRight(name, "*1", Printer.FormatLen, 3)); BufferList.Add(PrinterCmdUtils.NextLine()); AfterPrint(); Send(); }
protected override void Printing() { BufferList.Add(PrinterCmdUtils.FontSizeSetBig(3)); BufferList.Add(PrinterCmdUtils.AlignLeft()); foreach (var product in Products) { var name = product.Name; if (!string.IsNullOrEmpty(product.Description)) { name += $"({product.Description})"; } BufferList.Add(PrinterCmdUtils.PrintLineLeftRight(name, "*" + double.Parse(product.Quantity + "").ToString(), Printer.FormatLen, 3)); BufferList.Add(PrinterCmdUtils.NextLine()); } }