/// <summary> /// Adds the given event handler. /// </summary> /// <param name="evt"></param> public void Add(TEvtHandle evt) { if (evt == null) { return; } _observerCount++; Event += new DispatcherDelegate(evt).Invoke; }
/// <summary> /// This Method will be run when Async Search Finished /// </summary> /// <param name="dt"></param> private void BindAsync(DataTable dt) { dtFiles = new DataTable("Files"); // this is a callback dtFiles.Merge(dt, false); DispatcherDelegate dd = new DispatcherDelegate(BindAsync2); this.Dispatcher.BeginInvoke(dd, "async"); // Initials FileSystemWatcher InitialsWatcherDelegate dd2 = new InitialsWatcherDelegate(InitialsWatcher); this.Dispatcher.BeginInvoke(dd2, "Nothing"); // }
private void ShowFoundCurrentFile(string file) { DispatcherDelegate dd = new DispatcherDelegate(ShowFoundCurrentFile2); this.Dispatcher.BeginInvoke(dd, file); }