Example #1
0
 /// <summary>
 /// Initializes a new instance of the ReaderService class
 /// </summary>
 public ReaderService()
 {
     this.commander     = new AsciiCommander();
     this.PortNameAfter = "COM3";
     //全部失败后刷新com口
     this.portNames = System.IO.Ports.SerialPort.GetPortNames();
     this.list      = new ArrayList(this.portNames);
     this.IE        = list.GetEnumerator();
     this.commander = new AsciiCommander();
 }
        static IAsciiCommander AddResponders(SimpleIoc container, AsciiCommander asciiCommander)
        {
            RegisterResponders(container);

            asciiCommander.AddSynchronousResponder();
            asciiCommander.AddResponder(container.GetInstance <IAsciiCommandResponder>(_tagResponderKey));
            asciiCommander.AddResponder(container.GetInstance <IAsciiCommandResponder>(_barcodeResponderKey));
            asciiCommander.AddResponder(container.GetInstance <SwitchAsynchronousResponder>());
            return(asciiCommander);
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the ReaderService class
 /// </summary>
 public ReaderService()
 {
     this.commander = new AsciiCommander();
     this.PortName  = "COM32";
 }