private async void WriteSendMsgAsync(string msg) { await Dispatcher.BeginInvoke(() => { if (SendMsg.LineCount > 100) { SendMsg.Clear(); } SendMsg.AppendText(msg + "\n"); SendMsg.ScrollToEnd(); }); }
private void BTN_SendMsg_Click(object sender, EventArgs e) { HIOKI3540.Write(SendMsg.Text + "\r\n"); SendMsg.Clear(); }