示例#1
0
        /// <summary>
        /// 打开USB打印机
        /// </summary>
        /// <param name="port"></param>
        /// <returns></returns>
        public bool OpenPort(PrinterPortInfo port)
        {
            bool rst = false;

            switch (port.PortType)
            {
            case PrinterPortType.pptUSB:
                rst = OpenUSB(port.PortID) != 0;
                break;

            default:
                break;
            }

            return(rst);
        }
示例#2
0
 /// <summary>
 /// 关闭打印机端口。
 /// </summary>
 public void ClosePort(PrinterPortInfo port)
 {
     closeport();
 }