public object Clone() { BranchList obj = new BranchList(_actsHolder); foreach (ActionBranch ab in this) { obj.Add((ActionBranch)ab.Clone()); } obj.SetOwnerMethod(_method); obj.LinkJumpedBranches(); return(obj); }
public void AppendAction(ActionBranch a) { if (_list == null) { _list = new BranchList(this.ActionsHolder); } if (a.IsMergingPoint) { if (_list.Count > 0) { throw new DesignerException("Do not append a branching point to sequential actions"); } } _list.Add(a); }
public void OnExport() { List <UInt32> usedBranches = new List <uint>(); List <ActionBranch> list = new List <ActionBranch>(); foreach (ActionBranch ab in this) { List <ActionBranch> l = ab.OnExport(this, usedBranches); if (l != null && l.Count > 0) { list.AddRange(l); } } BranchList list2 = new BranchList(this._actsHolder); foreach (ActionBranch ab in list) { if (list2.GetBranchById(ab.BranchId) == null) { if (list2.GetBranchById(ab.FirstActionId) == null) { list2.Add(ab); } else { DesignUtil.WriteToOutputWindow("Duplicated first branch {0}", ab.FirstActionId); } } else { DesignUtil.WriteToOutputWindow("Duplicated branch {0}", ab.BranchId); } } foreach (ActionBranch ab in list2) { if (GetBranchById(ab.BranchId) == null) { this.Add(ab); } } }