private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { var result = e.Result as object[]; if (result != null) { var children = result[0] as TreeNode[]; if (children != null && children.Length > 0) { foreach (TreeNode child in children) { Node.Nodes.Add(child); } } } if (WorkerFinished != null) { WorkerFinished.Invoke(Node); } }
protected void OnWorkerFinished() { WorkerFinished?.Invoke(this, new WorkStateEventArgs(CurrentWorkState)); }