PrintLab.cs
5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace CsbrHcgClient
{
public class PrintLab
{
[DllImport("CDFPSK.dll")]
public static extern int OpenPort(uint px);
[DllImport("CDFPSK.dll")]
public static extern int PTK_SetPrintSpeed(uint px);
[DllImport("CDFPSK.dll")]
public static extern int PTK_SetDarkness(uint id);
[DllImport("CDFPSK.dll")]
public static extern int ClosePort();
[DllImport("CDFPSK.dll")]
public static extern int PTK_FormDel(string pid);
[DllImport("CDFPSK.dll")]
public static extern int PTK_FormDownload(string pid);
[DllImport("CDFPSK.dll")]
public static extern int PTK_FormEnd();
[DllImport("CDFPSK.dll")]
public static extern int PTK_ExecForm(string pid);
[DllImport("CDFPSK.dll")]
public static extern int PTK_Download();
[DllImport("CDFPSK.dll")]
public static extern int PTK_DownloadInitVar(string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_PrintLabel(uint number, uint cpnumber);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DefineCounter(uint id, uint maxNum, short ptext, string pstr, string pMsg);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawTextTrueTypeW
(int x, int y, int FHeight,
int FWidth, string FType,
int Fspin, int FWeight,
bool FItalic, bool FUnline,
bool FStrikeOut,
string id_name,
string data);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawBarcode(uint px,
uint py,
uint pdirec,
string pCode,
uint pHorizontal,
uint pVertical,
uint pbright,
char ptext,
string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_SetLabelHeight(uint lheight, uint gapH, int gapOffset, bool bFlag);
[DllImport("CDFPSK.dll")]
public static extern int PTK_SetLabelWidth(uint lwidth);
[DllImport("CDFPSK.dll")]
public static extern int PTK_ClearBuffer();
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawRectangle(uint px, uint py, uint thickness, uint pEx, uint pEy);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawLineOr(uint px, uint py, uint pLength, uint pH);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawBar2D_QR(uint x, uint y, uint w, uint v, uint o, uint r, uint m, uint g, uint s, string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawBar2D_QREx(uint x, uint y, uint o, uint r, uint g, uint s, uint v, string id_name, string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawBar2D_Pdf417(uint x, uint y, uint w, uint v, uint s, uint c, uint px, uint py, uint r, uint l, uint t, uint o, string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_PcxGraphicsDel(string pid);
[DllImport("CDFPSK.dll")]
public static extern int PTK_PcxGraphicsDownload(string pcxname, string pcxpath);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawPcxGraphics(uint px, uint py, string gname);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawText(uint px, uint py, uint pdirec, uint pFont, uint pHorizontal, uint pVertical, char ptext, string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawTextEx(uint px, uint py, uint pdirec, uint pFont, uint pHorizontal, uint pVertical, char ptext, string pstr, bool varible);
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawBar2D_DATAMATRIX(uint x, uint y, uint w, uint h, uint o, uint m, string pstr);//DataMatrix二维条码
//[DllImport("CDFPSK.dll")]
//public static extern int PTK_DrawBar2D_Pdf417(uint x, uint y, uint w, uint v, uint s, uint c, uint px, uint py, uint r, uint l, uint t, uint o, string pstr); //PDF417二维条码
[DllImport("CDFPSK.dll")]
public static extern int PTK_DrawBar2D_HANXIN(uint x, uint y, uint w, uint v, uint o, uint r, uint m, uint g, uint s, string pstr);//汉信码二维条码
[DllImport("CDFPSK.dll")]
public static extern int PTK_ReadRFTagDataUSB(uint usbPort, uint nDataBlock, uint nRFPower, uint bFeed, StringBuilder strRFData);
[DllImport("CDFPSK.dll")]
public static extern int PTK_RWRFIDLabel(uint nRWMode, uint nWForm, uint nStartBlock, uint nWDataNum, uint nWArea, string pstr);
[DllImport("CDFPSK.dll")]
public static extern int PTK_SetRFID(uint nReservationParameters, uint nReadWriteLocation, uint ReadWriteArea, uint nMaxErrNum, uint nErrProcessingMethod);
[DllImport("CDFPSK.dll")]
public static extern int PTK_ErrorReportUSB(uint USBport); //160628 add by xr
}
}