/// <summary> /// Delegated method of accessing UI elements in the threads /// </summary> /// <param name="sender">Sender</param> /// <param name="e">The DirectorySearchingEventArgs instance</param> private void Delegated_DirectorySearching(object sender, DirectorySearchingEventArgs e) { if (this.InvokeRequired) { DirectorySearchingDelegate d = new DirectorySearchingDelegate(Delegated_DirectorySearching); this.Invoke(d, new object[] { sender, e }); } else { OnDirectorySearching(sender, e); } }
/// <summary> /// Delegated method of accessing UI elements in the threads /// </summary> /// <param name="sender">Sender</param> /// <param name="e">The DirectorySearchingEventArgs instance</param> private void Delegated_DirectorySearching(object sender, DirectorySearchingEventArgs e) { if (this.InvokeRequired) { DirectorySearchingDelegate d = new DirectorySearchingDelegate(Delegated_DirectorySearching); this.Invoke(d, new object[] { sender, e }); } else { OnDirectorySearching(sender, e); } }