コード例 #1
0
 public void Connect(PrinterConfigurationModel printer)
 {
     if (SerialPortAdapterRef == null)
     {
         SerialPortAdapterRef = _serialPortAdapter.Connect(
             printer,
             new Action <SerialPortAdapterRef, string>(DataReceivedCallback));
         Printer = printer;
     }
 }
コード例 #2
0
 private void InitailizeSerialPort(SerialPortViewModel serialPort)
 {
     _serialPortAdapter.Connect(serialPort);
     LogMessage(string.Format("Connected to {0}", serialPort.DisplayValue));
 }