protected override void Printing()
 {
     foreach (var product in Products)
     {
         var name = product.Name;
         if (!string.IsNullOrEmpty(product.Description))
         {
             name += $"({product.Description})";
         }
         BufferList.Add(PrinterCmdUtils.PrintLineLeftRight2("*" + product.Quantity, name, Printer.FormatLen, 2));
         BufferList.Add(PrinterCmdUtils.NextLine());
     }
 }
Exemple #2
0
 private void Format(string name, string description, double quantity, string remark)
 {
     BeforePrint();
     if (!string.IsNullOrEmpty(description))
     {
         name += $"({description})";
     }
     BufferList.Add(PrinterCmdUtils.FontSizeSetBig(2));
     BufferList.Add(PrinterCmdUtils.AlignLeft());
     BufferList.Add(PrinterCmdUtils.PrintLineLeftRight2("*" + quantity, name, Printer.FormatLen, 2));
     BufferList.Add(PrinterCmdUtils.NextLine());
     if (remark != null)
     {
         BufferList.Add(TextToByte($"备注:{remark}"));
         BufferList.Add(PrinterCmdUtils.NextLine());
     }
     AfterPrint();
     Send();
 }