Beispiel #1
0
 public void LabelPrintTaskPan(PanBarCode[] PanTaskID)
 {
     try
     {
         openport("TSC TTP-243E Plus");
         sendcommand("SIZE 100 mm,35 mm");
         sendcommand("GAP 2 mm,0");
         sendcommand("SPEED 4");
         sendcommand("DENSITY 7");
         sendcommand("DIRECTION 0");
         sendcommand("OFFSET 0.00");
         sendcommand("REFERENCE 0,0");
         sendcommand("SET PEEL OFF");
         sendcommand("SET CUTTER OFF");
         sendcommand("HOME");
         clearbuffer();
         downloadpcx("Name.pcx", "NAME.PCX");
         for (int i = PanTaskID.GetLowerBound(0); i <= PanTaskID.GetUpperBound(0); i += 2)
         {
             clearbuffer();
             sendcommand("BOX 15,20,380,250,2");
             windowsfont(0x2d, 0x19, 0x19, 0, 0, 0, "黑体", PanTaskID[i].strPanType);
             barcode("75", "60", "128", "100", "0", "0", "2", "4", PanTaskID[i].strTaskID);
             printerfont("45", "160", "4", "0", "1", "1", PanTaskID[i].strTaskID);
             sendcommand("PUTPCX 25,200,\"NAME.PCX\"");
             if ((i + 1) <= PanTaskID.GetUpperBound(0))
             {
                 sendcommand("BOX 425,20,790,250,2");
                 windowsfont(0x1c7, 0x19, 0x19, 0, 0, 0, "黑体", PanTaskID[i + 1].strPanType);
                 barcode("485", "50", "128", "110", "0", "0", "2", "4", PanTaskID[i + 1].strTaskID);
                 printerfont("455", "160", "4", "0", "1", "1", PanTaskID[i + 1].strTaskID);
                 sendcommand("PUTPCX 435,200,\"NAME.PCX\"");
             }
             printlabel("1", "1");
         }
         closeport();
     }
     catch
     {
     }
 }