private void button1_Click(object sender, EventArgs e) { string tx = TXWINDOW.Text; serialPort1.Write(tx); TXWINDOW.Clear(); }
SerialPort MyPort = new SerialPort("COM5", 9600);//Adjust the comp port private void Button_Click_1(object sender, RoutedEventArgs e) { String tx = TXWINDOW.Text; MyPort.Write(tx); TXWINDOW.Clear(); }