public IList <ISourceValuePointer> GetValueSources() { if (_exp != null) { return(_exp.GetValueSources()); } return(null); }
protected override void OnEstablishObjectOwnership(IActionsHolder scope, List <UInt32> usedBranches) { base.OnEstablishObjectOwnership(scope, usedBranches); if (_iconList != null) { foreach (ComponentIcon ci in _iconList) { ci.EstablishObjectOwnership(scope.OwnerMethod); } } if (_logicExpression != null) { IList <ISourceValuePointer> spl = _logicExpression.GetValueSources(); if (spl != null) { foreach (ISourceValuePointer sv in spl) { sv.SetValueOwner(scope.OwnerMethod); } } } }
protected override void OnEstablishObjectOwnership(IActionsHolder scope, List <UInt32> usedBranches) { base.OnEstablishObjectOwnership(scope, usedBranches); if (RepeatCount.MathExpression != null) { MathNodeRoot r = RepeatCount.MathExpression as MathNodeRoot; if (r != null) { IList <ISourceValuePointer> l = r.GetValueSources(); if (l != null) { foreach (ISourceValuePointer sv in l) { sv.SetValueOwner(scope.OwnerMethod); } } } } if (_iconList != null) { foreach (ComponentIcon ci in _iconList) { ci.EstablishObjectOwnership(scope.OwnerMethod); } } List <ComponentIcon> cis = ComponentIconList; foreach (ComponentIcon ci in cis) { ComponentIconActionBranchParameter ab = ci as ComponentIconActionBranchParameter; if (ab != null) { if (ab.ClassPointer == null) { if (ab.MemberId == this.BranchId) { ab.ClassPointer = RepeatIndex; ab.DoNotSaveData = true; } else { ActionBranch ab0 = scope.FindActionBranchById(ab.MemberId); if (ab0 == null) { throw new DesignerException("Action branch [{0}] not found", ab.MemberId); } else { AB_ForLoop abf = ab0 as AB_ForLoop; if (abf != null) { ab.ClassPointer = abf.RepeatIndex; ab.DoNotSaveData = true; } } } } } } }
private IList <ISourceValuePointer> getProperties(UInt32 taskId, bool client) { List <ISourceValuePointer> list = new List <ISourceValuePointer>(); if (Condition != null) { IList <ISourceValuePointer> l1 = Condition.GetValueSources(); if (l1 != null && l1.Count > 0) { foreach (ISourceValuePointer p in l1) { if (taskId != 0) { p.SetTaskId(taskId); } if (p.IsWebClientValue()) { if (client) { list.Add(p); } } else { if (!client) { list.Add(p); } } } } } MathNodeRoot mathExp = MathExp as MathNodeRoot; if (mathExp != null) { List <ISourceValuePointer> l2 = new List <ISourceValuePointer>(); mathExp.GetValueSources(l2); if (l2.Count > 0) { foreach (ISourceValuePointer p in l2) { bool found = false; if (taskId != 0) { p.SetTaskId(taskId); } foreach (ISourceValuePointer p2 in list) { if (p2.IsSameProperty(p)) { found = true; break; } } if (!found) { if (p.IsWebClientValue()) { if (client) { list.Add(p); } } else { if (!client) { list.Add(p); } } } } } } return(list); }