private void DisableTargets(Target target) { if (target is TargetGroup) { foreach (Target child in ((TargetGroup)target).Targets) { child.Enabled = false; DisableTargets(child); } } }
public override void BeginTarget(Target target) { if (_treeView.InvokeRequired) { _treeView.Invoke(new OneParamDelegate<Target>(BeginTarget), target); return; } _treeView.Nodes.Add("Target: " + target.Name); }
private void DisableTargets(Target target, List<string> disable) { if (disable.Contains(target.Name.ToLower())) { target.Enabled = false; DisableTargets(target); } else { target.Enabled = true; if (target is TargetGroup) { foreach (Target child in ((TargetGroup)target).Targets) { DisableTargets(child, disable); } } } }