onlymark
級(jí)別: 論壇先鋒
![]() |
ui線程訪問時(shí)候 用invoke激發(fā),字符串是拼接的末端加了\r\n 為什么不會(huì)換行? MethodInvoker 和action好像都可以實(shí)現(xiàn),區(qū)別在哪,或者更好一點(diǎn) strQR = string.Format("{0}:{1}", "二維碼", HandleCodeString(QRCodeArr)); public void Show(string msg) { richTextBox1.Invoke(new MethodInvoker(delegate() { richTextBox1.AppendText(msg + "\r\n"); if (richTextBox1.Lines.Length > 2000) { richTextBox1.Clear(); } richTextBox1.ScrollToCaret(); })); } |
---|---|
|