public void PrintNG(DateTime TestTime) { if (OpenPrinter() == 0) { return; } TSCLIB_DLL.setup("18", "12", "2", "12", "1", "3", "0"); TSCLIB_DLL.clearbuffer(); TSCLIB_DLL.windowsfont(40, 3, 40, 0, 2, 0, "新細明體", "NG"); TSCLIB_DLL.windowsfont(15, 40, 30, 0, 0, 0, "新細明體", TestTime.ToString("yy/MM/dd")); TSCLIB_DLL.printlabel("1", "1"); TSCLIB_DLL.closeport(); }
public void PrintLabel(string Serial, DaoMachine Machine, DaoPartNumber PN, string Result, DateTime TestTime) { if (OpenPrinter() == 0) { return; } string ResultSerial = string.Format("{0}{1}{2}", Machine.機台代碼, PN.簡碼, Serial); TSCLIB_DLL.setup("18", "12", "2", "12", "1", "3", "0"); TSCLIB_DLL.clearbuffer(); TSCLIB_DLL.sendcommand(string.Format("QRCODE 12,8,L,2,A,0,M2,S7,\"UCC,{0},{1}\"", ResultSerial, TestTime.ToString("yyyy/MM/dd"))); TSCLIB_DLL.windowsfont(76, 11, 30, 0, 2, 0, "新細明體", Result); TSCLIB_DLL.windowsfont(66, 40, 20, 0, 0, 0, "新細明體", TestTime.ToString("yy/MM/dd")); TSCLIB_DLL.windowsfont(5, 62, 20, 0, 0, 0, "新細明體", PN.車型); TSCLIB_DLL.printlabel("1", "1"); TSCLIB_DLL.closeport(); }