示例#1
0
        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);
            }
        }
示例#2
0
文件: Job.cs 项目: dekkerb115/Bam.Net
 protected void OnWorkerFinished()
 {
     WorkerFinished?.Invoke(this, new WorkStateEventArgs(CurrentWorkState));
 }