private void button1_Click(object sender, EventArgs e) { callback += new OnTestSteppingCallBack(OnTestSteppingHandler); string command = null; System.Threading.ThreadPool.QueueUserWorkItem((o) => { callback("name", null, ref command); }); }
private void OnTestSteppingHandler(string testName, object step, ref string command) { if (InvokeRequired == true) { OnTestSteppingCallBack d = new OnTestSteppingCallBack(OnTestSteppingHandler); Invoke(d, new object[] { testName, step }); } else { } }