Beispiel #1
0
 public static void Open(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits)
 {
     PortUtil portUtil = new PortUtil(portName, baudRate, parity, dataBits, stopBits);
     portUtil.Open();
     //弹钱箱
     byte[] cashDrawer = new byte[] { 0x1B, 0x70, 0x00, 0x30, 0xC0 };
     portUtil.Write(cashDrawer);
     portUtil.Close();
 }
Beispiel #2
0
 public static void Open(string VID, string PID, string endpointId)
 {
     PortUtil portUtil = new PortUtil(VID, PID, endpointId);
     portUtil.Open();
     //弹钱箱
     byte[] cashDrawer = new byte[] { 0x1B, 0x70, 0x00, 0x30, 0xC0 };
     portUtil.Write(cashDrawer);
     portUtil.Close();
 }
Beispiel #3
0
        public static void Open(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits)
        {
            PortUtil portUtil = new PortUtil(portName, baudRate, parity, dataBits, stopBits);

            portUtil.Open();
            //弹钱箱
            byte[] cashDrawer = new byte[] { 0x1B, 0x70, 0x00, 0x30, 0xC0 };
            portUtil.Write(cashDrawer);
            portUtil.Close();
        }
Beispiel #4
0
        public static void Open(string VID, string PID, string endpointId)
        {
            PortUtil portUtil = new PortUtil(VID, PID, endpointId);

            portUtil.Open();
            //弹钱箱
            byte[] cashDrawer = new byte[] { 0x1B, 0x70, 0x00, 0x30, 0xC0 };
            portUtil.Write(cashDrawer);
            portUtil.Close();
        }
Beispiel #5
0
 public PrintHelper(string ip, int port)
 {
     _portUtil = new PortUtil(ip, port);
 }
Beispiel #6
0
 public PrintHelper(string usbVid, string usbPid, string endpointId)
 {
     _portUtil = new PortUtil(usbVid, usbPid, endpointId);
 }
Beispiel #7
0
 public PrintHelper(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits)
 {
     _portUtil = new PortUtil(portName, baudRate, parity, dataBits, stopBits);
 }