예제 #1
0
 public void Finish()
 {
     if (_serialMonitor != null)
     {
         _serialMonitor.Stop();
         _serialMonitor.Dispose();
         _serialMonitor = null;
     }
 }
예제 #2
0
        public GameBoyPrinterReader(string portName, Func <byte[], ControllerStateEventArgs> packetParser)
        {
            _packetParser = packetParser;

            _serialMonitor = new SerialMonitor(portName, true);
            _serialMonitor.PacketReceived += SerialMonitor_PacketReceived;
            _serialMonitor.Disconnected   += SerialMonitor_Disconnected;
            _serialMonitor.Start();
        }