/// <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); }
/// <summary> /// 关闭打印机端口。 /// </summary> public void ClosePort(PrinterPortInfo port) { closeport(); }