public RaceEngine(IMessageConsumer messageConsumer) { _messageConsumer = messageConsumer; _communicateService = new CommunicateService(new RobitronicMessageParser()); _communicateService.MessageReceived += _messageConsumer.ConsumeMessage; }
private void OpenPort_OnExecuted(object sender, ExecutedRoutedEventArgs e) { _comService = new CommunicateService(MessageParserFactory.GetParserByProtocal(TransponderType.Robitronic)); var portSetting = new SerialPortSettings(38400, System.IO.Ports.StopBits.One, System.IO.Ports.Parity.None, 8); _comService.StartService(ComSelection.Text, portSetting); }