private void SetPropertyGridDataSource(object region) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.watchPropertyGrid.InvokeRequired) { SetPropertyGridDatasource d = new SetPropertyGridDatasource(SetPropertyGridDataSource); this.Invoke(d, new object[] { region }); } else { this.watchPropertyGrid.SelectObject(region, false, 500); this.watchPropertyGrid.Refresh(); } }
private void SetPropertyGridDataSource ( object region ) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.watchPropertyGrid.InvokeRequired) { SetPropertyGridDatasource d = new SetPropertyGridDatasource ( SetPropertyGridDataSource ); this.Invoke ( d, new object[] { region } ); } else { this.watchPropertyGrid.SelectObject ( region, false, 500 ); this.watchPropertyGrid.Refresh (); } }