Exemplo n.º 1
0
        /// <summary>
        /// Creates a new printer port.
        /// </summary>
        public void CreatePort()
        {
            switch (_protocol)
            {
            case PortProtocolType.Raw:
                PrintPortManager.AddRawPort(PortName, PortNumber, Address, SnmpEnabled, "public", 1);
                break;

            case PortProtocolType.LPR:
                PrintPortManager.AddLprPort(PortName, PortNumber, Address, Queue, SnmpEnabled, "public", 1);
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new printer port.
        /// </summary>
        public void CreatePort()
        {
            switch (Protocol)
            {
            case 1:     // RAW
                PrintPortManager.AddRawPort(PortName, PortNumber, Address, SnmpEnabled, SnmpCommunity, SnmpDevIndex);
                break;

            case 2:     // LPR
                PrintPortManager.AddLprPort(PortName, PortNumber, Address, Queue, SnmpEnabled, SnmpCommunity, SnmpDevIndex);
                break;
            }
        }
Exemplo n.º 3
0
        private void CreatePort()
        {
            LprPrinterPortInfo lprPortInfo = _printQueueInfo.PrinterPort as LprPrinterPortInfo;

            if (lprPortInfo != null)
            {
                TraceFactory.Logger.Debug("Creating LPR port. Queue Name = {0}".FormatWith(lprPortInfo.QueueName));
                PrintPortManager.AddLprPort(_portName, _printQueueInfo.PortNumber, _printQueueInfo.Address, lprPortInfo.QueueName, _printQueueInfo.SnmpEnabled, "public", 1);
            }
            else
            {
                TraceFactory.Logger.Debug("Creating RAW port.");
                PrintPortManager.AddRawPort(_portName, _printQueueInfo.PortNumber, _printQueueInfo.Address, _printQueueInfo.SnmpEnabled, "public", 1);
            }
        }