void SendData(string data) { if (this.ckCrLF.IsChecked == true) { data += "\r\n"; } serial.SendData(data); sw.Restart(); }