public override void Select()
 {
     if (LoggingService.IsDebugEnabled)
     {
         LoggingService.DebugFormatted("Will run select command : {0}", new object[] { this.taskNode.SelectCommand });
     }
     if (!(((this.selectCommand != null) || (this.assembly == null)) || string.IsNullOrEmpty(this.taskNode.SelectCommand)))
     {
         this.selectCommand = (AbstractCommand) this.assembly.CreateInstance(this.taskNode.SelectCommand);
         this.selectCommand.Owner = this;
     }
     if (this.selectCommand != null)
     {
         this.selectCommand.Run();
     }
 }
 protected override void Initialize()
 {
     if (LoggingService.IsDebugEnabled)
     {
         LoggingService.DebugFormatted("节点‘{0}’ Initialize...", new object[] { base.Text });
     }
     base.Initialize();
     if ((this.taskNode.Children != null) && (this.taskNode.Children.Count > 0))
     {
         if (LoggingService.IsDebugEnabled)
         {
             LoggingService.Debug("自动加载预定义的子节点...");
         }
         foreach (TaskNode node in this.taskNode.Children)
         {
             if (IfAuthNode(node))
             {
                 new TaskTreeNode(node).AddTo(this);
             }
         }
     }
     if (LoggingService.IsDebugEnabled)
     {
         LoggingService.DebugFormatted("准备调用命令'{0}'来加载子节点...", new object[] { this.taskNode.LoadChildrenCommand });
     }
     if (!string.IsNullOrEmpty(this.taskNode.LoadChildrenCommand))
     {
         if (this.assembly != null)
         {
             if (this.loadChildrenCommand == null)
             {
                 this.loadChildrenCommand = (AbstractCommand) this.assembly.CreateInstance(this.taskNode.LoadChildrenCommand, true);
             }
             if (this.loadChildrenCommand != null)
             {
                 this.loadChildrenCommand.Owner = this;
                 this.loadChildrenCommand.Run();
             }
             else
             {
                 MessageHelper.ShowInfo("不能创建命令:{0}", this.taskNode.LoadChildrenCommand);
             }
         }
         else
         {
             MessageHelper.ShowInfo("找不到命名所在程序:{0}", this.taskNode.Assembly);
         }
     }
 }
 public override ObjectNode AddChild()
 {
     if (LoggingService.IsDebugEnabled)
     {
         LoggingService.DebugFormatted("尝试添加子节点命令:{0}", new object[] { this.taskNode.AddCommand });
     }
     if (((this.assembly != null) && (this.addCommand == null)) && !string.IsNullOrEmpty(this.taskNode.AddCommand))
     {
         if (LoggingService.IsDebugEnabled)
         {
             LoggingService.DebugFormatted("创建添加子节点命令:{0}", new object[] { this.taskNode.AddCommand });
         }
         this.addCommand = (AbstractCommand) this.assembly.CreateInstance(this.taskNode.AddCommand, true);
     }
     if (this.addCommand != null)
     {
         this.addCommand.Owner = this;
         this.addCommand.Run();
     }
     return null;
 }