String c, stx, etx;
stx = ((char)2).ToString();
etx = ((char)3).ToString();
c = ((char)27).ToString();
StringBuilder SEND = new StringBuilder();
SEND.Append(stx + c + "A");
SEND.Append(c + "H0090" + c + "V0025" + c + "RG4,6,2,50,50," + line1);
SEND.Append(c + "H0090" + c + "V0080" + c + "RG4,6,2,50,50," + line2);
SEND.Append(c + "H0090" + c + "V0135" + c + "RG4,6,2,50,50," + line3);
SEND.Append(c + "H0090" + c + "V0185" + c + "RG4,6,2,50,50," + line4);
SEND.Append(c + "H0950" + c + "V0020" + c + "2D30,M,8,0,0");
SEND.Append(c + "DN0024," + rfid);
SEND.Append(c + "IP0e:h,epc:" + rfid + ",fsw:0;");
SEND.Append(c + "Q1");
SEND.Append(c + "Z" + etx);
string md = SEND.ToString();
try
{
SATOPrinter.Interface = Printer.InterfaceType.TCPIP;
SATOPrinter.TCPIPAddress = ip;//192.168.3.107
SATOPrinter.TCPIPPort = port;//9100
byte[] cmddata = Utils.StringToByteArray(SEND.ToString());
SATOPrinter.Send(cmddata);
}
catch (Exception ex)
{
error = ex.Message;
}
再有不明白的的加我vxqq 312417962