Пример #1
0
 private void ButtonDoneClick(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(textBoxIncoming.Text) || string.IsNullOrWhiteSpace(textBoxOutgoing.Text))
     {
         return;
     }
     Mobile = new BluetoothPhone
     {
         OutgoingPort = new SerialPort(textBoxOutgoing.Text, 115200),
         IncomingPort = new SerialPort(textBoxIncoming.Text, 115200)
     };
     Close();
 }
Пример #2
0
 public PhoneControl(BluetoothPhone phone)
 {
     _phone = phone;
     _phone.IncomingPort.DataReceived += IncomingPort_DataReceived;
     _phone.IncomingPort.Open();
 }