public PIMAssociationEndViewHelper(Diagram diagram, PIMAssociationViewHelper associationViewHelper) : base(diagram) { AssociationViewHelper = associationViewHelper; CardinalityLabelViewHelper = new LabelViewHelper(diagram); RoleLabelViewHelper = new LabelViewHelper(diagram); points = new ObservablePointCollection(); }
public override void FillCopy(Versioning.IExolutioCloneable copyComponent, ProjectVersion projectVersion, Versioning.ElementCopiesMap createdCopies) { base.FillCopy(copyComponent, projectVersion, createdCopies); PIMAssociationViewHelper copyAssociationViewHelper = (PIMAssociationViewHelper)copyComponent; copyAssociationViewHelper.UseDiamond = UseDiamond; MainLabelViewHelper.FillCopy(copyAssociationViewHelper.MainLabelViewHelper, projectVersion, createdCopies); for (int i = 0; i < AssociationEndsViewHelpers.Count; i++) { PIMAssociationEndViewHelper associationEndViewHelper = AssociationEndsViewHelpers[i]; PIMAssociationEnd copyEnd = projectVersion.Project.TranslateComponent <PIM.PIMAssociation>(createdCopies.GetGuidForCopyOf(associationEndViewHelper.AssociationEnd.PIMAssociation)).PIMAssociationEnds[i]; System.Diagnostics.Debug.Assert(copyEnd.PIMClass == projectVersion.Project.TranslateComponent <PIM.PIMClass>(createdCopies.GetGuidForCopyOf(associationEndViewHelper.AssociationEnd.PIMClass))); PIMAssociationEndViewHelper endViewHelperCopy = new PIMAssociationEndViewHelper(copyAssociationViewHelper.Diagram, copyAssociationViewHelper); endViewHelperCopy.AssociationEnd = copyEnd; associationEndViewHelper.FillCopy(endViewHelperCopy, projectVersion, createdCopies); copyAssociationViewHelper.AssociationEndsViewHelpers.Add(endViewHelperCopy); } }
public static PIMAssociationEndViewHelper CreateInstance(Diagram diagram, PIMAssociationViewHelper associationViewHelper) { return(new PIMAssociationEndViewHelper(diagram, associationViewHelper)); }