赋值给UI的疑问
程序代码:
this.Invoke((EventHandler)(delegate { builder.Append( Encoding.ASCII.GetString(buf)); //this.rTxcommon.AppendText(builder.ToString()); getStr += builder.ToString(); switch (getStr) { case "00\r\n": if (boolDial == true) { this.lblsig3.Visible = true; } if (boolSetno == true) { this.rTxcommon.AppendText("Set No. OK\r\n"); } break; case "FF\r\n": this.lblsig3.Visible = false; break; default: this.rTxcommon.AppendText(":" + getStr); break; } }));为啥丢失数据呢?而屏蔽的部分就不会丢失数据。