Esempio n. 1
0
 protected virtual Result OnPrintReceiptWithQRCode(ArrayList content, string mimgcontent)
 {
     ReceiptPrinter.SetPrintPosition(0);
     ReceiptPrinter.Status retstr = ReceiptPrinter.PrintString(content);
     //ReceiptPrinter.Status retstr = ReceiptPrinter.Status.SUCC;
     ReceiptPrinter.Status retimg = ReceiptPrinter.PrintImage(mimgcontent);
     ReceiptPrinter.Status ret    = (retimg == ReceiptPrinter.Status.SUCC) ? retstr : retimg;
     if (ret == ReceiptPrinter.Status.SUCC || ret == ReceiptPrinter.Status.PAPER_FEW)
     {
         ReceiptPrinter.FeedLine(8);
         ReceiptPrinter.CutPage();
         if (ret == ReceiptPrinter.Status.SUCC)
         {
             return(Result.Success);
         }
         else
         {
             return(Result.PaperFew);
         }
     }
     else if (ret == ReceiptPrinter.Status.OUT_OF_PAPER)
     {
         return(Result.OutOfPaper);
     }
     else
     {
         return(Result.Fail);
     }
 }