Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
		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 ();
			}
		}