public void SetRunCodeListBox(string str) { if (this.codetext.InvokeRequired) { apprun.SetListBoxCallback method = new apprun.SetListBoxCallback(this.SetRunCodeListBox); this.codetext.Invoke(method, new object[] { str }); } else { this.codetext.AppendText(str + "\r\n"); } }
public void SetListBox(string str) { if (this.listBox1.InvokeRequired) { apprun.SetListBoxCallback method = new apprun.SetListBoxCallback(this.SetListBox); this.listBox1.Invoke(method, new object[] { str }); } else { if (this.listBox1.Items.Count >= 800) { this.listBox1.Items.Clear(); } this.listBox1.Items.Add(str); this.xuanzhonglist(this.listBox1, this.label13); } }