Exemplo n.º 1
0
 private void btn_test_Click(object sender, EventArgs e)//测试按钮
 {
     //TSCLIB_DLL.about();                                                                //Show the DLL version
     TSCLIB_DLL.openport("TSC TDP-245");                                                 //Open specified printer driver
     TSCLIB_DLL.setup("100", "63.5", "4", "8", "0", "0", "0");                           //Setup the media size and sensor type info
     TSCLIB_DLL.clearbuffer();                                                           //Clear image buffer
     TSCLIB_DLL.about();
     TSCLIB_DLL.barcode("100", "100", "128", "100", "1", "0", "2", "2", "Barcode Test"); //Drawing barcode
     TSCLIB_DLL.printerfont("100", "250", "TSS24.BF2", "0", "1", "1", "Print Font 测试");  //Drawing printer font
     // TSCLIB_DLL.windowsfont(100, 300, 24, 0, 0, 0, "GBK", "测试"); //Draw windows font
     // TSCLIB_DLL.downloadpcx("UL.PCX", "UL.PCX");                                         //Download PCX file into printer
     TSCLIB_DLL.sendcommand("PUTPCXL.PC 100,400,\"UL.PCX\"");                           //Drawing PCX graphic
     TSCLIB_DLL.printlabel("1", "1");                                                   //Print labels
     TSCLIB_DLL.closeport();                                                            //Close specified printer driver
 }