public Form1() { InitializeComponent(); BookCallBack call = new BookCallBack(); call.mainThread += new BookCallBack.delegateDisplayResult(DisplayResult); instanceContext = new InstanceContext(call); }
private void DisplayResult(string name) { if (this.txt_BookMsg.InvokeRequired) { call = new BookCallBack(); call.mainThread += new BookCallBack.delegateDisplayResult(DisplayResult); this.Invoke(call.mainThread, name); } else { txt_BookMsg.Text = name; } }