public override void CopyObjectDelayed(CopyDictionary env, DiagramShape newobj) { base.CopyObjectDelayed(env, newobj); Balloon balloon1 = (Balloon)newobj; balloon1.myAnchor = env[this.myAnchor] as DiagramShape; balloon1.LayoutChildren(null); }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramControl control1 = (DiagramControl)base.CopyObject(env); control1.myEditedObject = (DiagramShape)env[this.myEditedObject]; control1.myMap = null; return control1; }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); IconicNode node1 = (IconicNode)newgroup; node1.myIcon = (DiagramShape)env[this.myIcon]; node1.myLabel = (DiagramText)env[this.myLabel]; node1.myPort = (DiagramPort)env[this.myPort]; }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); BasicNode node1 = (BasicNode)newgroup; node1.myShape = (DiagramGraph)env[this.myShape]; node1.myPort = (DiagramPort)env[this.myPort]; node1.myLabel = (DiagramText)env[this.myLabel]; }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); CommentShape comment1 = (CommentShape)newgroup; comment1.myPartID = -1; comment1.myBack = (DiagramShape)env[this.myBack]; comment1.myLabel = (DiagramText)env[this.myLabel]; }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); BoxNode node1 = (BoxNode)newgroup; node1.myPort = (DiagramPort)env[this.myPort]; node1.myBody = (DiagramShape)env[this.myBody]; }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramControl control1 = (DiagramControl)base.CopyObject(env); control1.myEditedObject = (DiagramShape)env[this.myEditedObject]; control1.myMap = null; return(control1); }
public override DiagramShape CopyObject(CopyDictionary env) { ParallelogramGraph parallelogram1 = (ParallelogramGraph)base.CopyObject(env); if (parallelogram1 != null) { parallelogram1.myPoints = (PointF[])this.myPoints.Clone(); } return parallelogram1; }
public override DiagramShape CopyObject(CopyDictionary env) { DiamondGraph diamond1 = (DiamondGraph)base.CopyObject(env); if (diamond1 != null) { diamond1.myPoints = (PointF[])this.myPoints.Clone(); } return diamond1; }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); TextLine link1 = (TextLine)newgroup; link1.myRealLink = (Shapes.LineGraph)env[this.myRealLink]; link1.myFromLabel = (DiagramShape)env[this.myFromLabel]; link1.myMidLabel = (DiagramShape)env[this.myMidLabel]; link1.myToLabel = (DiagramShape)env[this.myToLabel]; }
public override DiagramShape CopyObject(CopyDictionary env) { Balloon balloon1 = (Balloon)base.CopyObject(env); if (balloon1 != null) { env.Delayeds.Add(this); } return balloon1; }
public override DiagramShape CopyObject(CopyDictionary env) { Balloon balloon1 = (Balloon)base.CopyObject(env); if (balloon1 != null) { env.Delayeds.Add(this); } return(balloon1); }
public override DiagramShape CopyObject(CopyDictionary env) { ParallelogramGraph parallelogram1 = (ParallelogramGraph)base.CopyObject(env); if (parallelogram1 != null) { parallelogram1.myPoints = (PointF[])this.myPoints.Clone(); } return(parallelogram1); }
public override DiagramShape CopyObject(CopyDictionary env) { BoxPort port1 = (BoxPort)base.CopyObject(env); if (port1 != null) { port1.mySortedLinks = null; port1.myRespreading = false; } return port1; }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramGraph shape1 = (DiagramGraph)base.CopyObject(env); if (shape1 != null) { shape1.myPath = null; } return(shape1); }
public override DiagramShape CopyObject(CopyDictionary env) { PolygonGraph polygon1 = (PolygonGraph)base.CopyObject(env); if (polygon1 != null) { polygon1.myPoints = (PointF[])this.myPoints.Clone(); } return(polygon1); }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { ListGroup group1 = (ListGroup)newgroup; if (group1 != null) { group1.myPath = null; } base.CopyChildren(newgroup, env); }
public override DiagramShape CopyObject(CopyDictionary env) { TrapezoidGraph trapezoid1 = (TrapezoidGraph)base.CopyObject(env); if (trapezoid1 != null) { trapezoid1.myPoints = (PointF[])this.myPoints.Clone(); } return(trapezoid1); }
public override DiagramShape CopyObject(CopyDictionary env) { DiamondGraph diamond1 = (DiamondGraph)base.CopyObject(env); if (diamond1 != null) { diamond1.myPoints = (PointF[])this.myPoints.Clone(); } return(diamond1); }
/// <summary> /// This finishes the copying of a node by updating any reference to a containing group node. /// </summary> /// <param name="oldnodedata">the original <c>Node</c></param> /// <param name="env"></param> /// <param name="newnodedata">the copied <c>Node</c></param> /// <param name="newgroup">the node whose <c>Id</c> is the new value for the <c>PartsModelContainingSubGraph</c> property</param> /// <param name="newmembers">unused</param> protected override void CopyNode2(Node oldnodedata, CopyDictionary env, Node newnodedata, Node newgroup, IEnumerable <Node> newmembers) { if (newnodedata == null) { return; } if (newgroup != null) { newnodedata.PartsModelContainingSubGraph = newgroup.Id; } }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); Button button1 = (Button)newgroup; button1.myBack = (DiagramShape)env[this.myBack]; button1.myIcon = (DiagramShape)env[this.myIcon]; button1.myLabel = (DiagramText)env[this.myLabel]; button1.ActionEvent = null; button1.myActionActivated = false; }
public override DiagramShape CopyObject(CopyDictionary env) { BoxPort port1 = (BoxPort)base.CopyObject(env); if (port1 != null) { port1.mySortedLinks = null; port1.myRespreading = false; } return(port1); }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramNode node1 = (DiagramNode)base.CopyObject(env); if (node1 != null) { node1.myParts = null; node1.myPartID = -1; } return(node1); }
protected virtual void CopyChildren(GroupShape newgroup, CopyDictionary env) { GroupEnumerator enumerator2 = this.GetEnumerator(); GroupEnumerator enumerator1 = enumerator2.GetEnumerator(); while (enumerator1.MoveNext()) { DiagramShape obj1 = enumerator1.Current; DiagramShape obj2 = env.Copy(obj1); newgroup.Add(obj2); } }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); TextNode node1 = (TextNode)newgroup; node1.myBack = (DiagramShape)env[this.myBack]; node1.myLabel = (DiagramText)env[this.myLabel]; node1.myTopPort = (DiagramPort)env[this.myTopPort]; node1.myRightPort = (DiagramPort)env[this.myRightPort]; node1.myBottomPort = (DiagramPort)env[this.myBottomPort]; node1.myLeftPort = (DiagramPort)env[this.myLeftPort]; }
public override DiagramShape CopyObject(CopyDictionary env) { GeneralNodePort port1 = (GeneralNodePort)base.CopyObject(env); if ((port1 != null) && (this.myPortLabel != null)) { port1.myPortLabel = (GeneralNodePortLabelText)env.Copy(this.myPortLabel); if (port1.myPortLabel != null) { port1.myPortLabel.Port = port1; } } return port1; }
public override DiagramShape CopyObject(CopyDictionary env) { GroupShape group1 = (GroupShape)base.CopyObject(env); if (group1 != null) { group1.myObjects = new ArrayList(); bool flag1 = group1.Initializing; group1.Initializing = true; this.CopyChildren(group1, env); group1.Initializing = flag1; } return(group1); }
public override DiagramShape CopyObject(CopyDictionary env) { GeneralNodePort port1 = (GeneralNodePort)base.CopyObject(env); if ((port1 != null) && (this.myPortLabel != null)) { port1.myPortLabel = (GeneralNodePortLabelText)env.Copy(this.myPortLabel); if (port1.myPortLabel != null) { port1.myPortLabel.Port = port1; } } return(port1); }
/// <summary> /// This copies a link by copying its elements. /// </summary> /// <param name="linkdata"></param> /// <param name="env"></param> /// <returns></returns> protected override Link CopyLink1(Link linkdata, CopyDictionary env) { if (linkdata == null) { return(null); } UIElement ve = CopyVisual(linkdata.EnsuredVisualElement); Link link = new Link(); // for PartsModel.CopyLink1 link.Content = ve; // for PartsModel.CopyLink1 link.PartsModelFromNode = linkdata.PartsModelFromNode; link.PartsModelFromPortId = linkdata.PartsModelFromPortId; link.PartsModelToNode = linkdata.PartsModelToNode; link.PartsModelToPortId = linkdata.PartsModelToPortId; link.PartsModelLabelNode = linkdata.PartsModelLabelNode; return(link); }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { base.CopyChildren(newgroup, env); BoxIconNode node = (BoxIconNode)newgroup; if (this._LeftPorts != null) { node._LeftPorts = new DiagramPort[DefaultYPortCount]; for (int count = 0; count < this._LeftPorts.Length; count++) { node._LeftPorts[count] = (DiagramPort)env[this._LeftPorts[count]]; } } if (this._RightPorts != null) { node._RightPorts = new DiagramPort[DefaultYPortCount]; for (int count = 0; count < this._RightPorts.Length; count++) { node._RightPorts[count] = (DiagramPort)env[this._RightPorts[count]]; } } if (this._TopPorts != null) { node._TopPorts = new DiagramPort[DefaultXPortCount]; for (int count = 0; count < this._TopPorts.Length; count++) { node._TopPorts[count] = (DiagramPort)env[this._TopPorts[count]]; } } if (this._BottomPorts != null) { node._BottomPorts = new DiagramPort[DefaultXPortCount]; for (int count = 0; count < this._BottomPorts.Length; count++) { node._BottomPorts[count] = (DiagramPort)env[this._BottomPorts[count]]; } } node.myBack = (DiagramShape)env[this.myBack]; node.myLabel = (DiagramText)env[this.myLabel]; }
/// <summary> /// This finishes the copying of a link by updating any references to the "from" node, /// the "to" node, and any "label" node. /// </summary> /// <param name="oldlinkdata"></param> /// <param name="env"></param> /// <param name="newlinkdata"></param> /// <param name="newfromnodedata"></param> /// <param name="newtonodedata"></param> /// <param name="newlinklabel"></param> protected override void CopyLink2(Link oldlinkdata, CopyDictionary env, Link newlinkdata, Node newfromnodedata, Node newtonodedata, Node newlinklabel) { if (newlinkdata == null) { return; } if (newfromnodedata != null) { newlinkdata.PartsModelFromNode = newfromnodedata.Id; } newlinkdata.PartsModelFromPortId = newlinkdata.PartsModelFromPortId; if (newtonodedata != null) { newlinkdata.PartsModelToNode = newtonodedata.Id; } newlinkdata.PartsModelToPortId = newlinkdata.PartsModelToPortId; if (newlinklabel != null) { newlinkdata.PartsModelLabelNode = newlinklabel.Id; } }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { GeneralNode node1 = (GeneralNode)newgroup; base.CopyChildren(newgroup, env); node1.myLeftPorts = new ArrayList(); node1.myRightPorts = new ArrayList(); node1.myIcon = (DiagramShape)env[this.myIcon]; node1.myTopLabel = (DiagramText)env[this.myTopLabel]; node1.myBottomLabel = (DiagramText)env[this.myBottomLabel]; for (int num1 = 0; num1 < this.myLeftPorts.Count; num1++) { GeneralNodePort port1 = (GeneralNodePort)this.myLeftPorts[num1]; if (port1 != null) { GeneralNodePort port2 = (GeneralNodePort)env[port1]; if (port2 != null) { node1.myLeftPorts.Add(port2); port2.SideIndex = node1.myLeftPorts.Count - 1; port2.LeftSide = true; } } } for (int num2 = 0; num2 < this.myRightPorts.Count; num2++) { GeneralNodePort port3 = (GeneralNodePort)this.myRightPorts[num2]; if (port3 != null) { GeneralNodePort port4 = (GeneralNodePort)env[port3]; if (port4 != null) { node1.myRightPorts.Add(port4); port4.SideIndex = node1.myRightPorts.Count - 1; port4.LeftSide = false; } } } }
/// <summary> /// This copies a node by copying its elements. /// </summary> /// <param name="nodedata"></param> /// <param name="env"></param> /// <returns></returns> protected override Node CopyNode1(Node nodedata, CopyDictionary env) { if (nodedata == null) { return(null); } UIElement ve = CopyVisual(nodedata.EnsuredVisualElement); Node node = (Node)Activator.CreateInstance(nodedata.GetType()); // for PartsModel.CopyNode1 node.IsLinkLabel = nodedata.IsLinkLabel; node.Id = nodedata.Id; node.PartsModelContainingSubGraph = nodedata.PartsModelContainingSubGraph; node.IsExpandedTree = nodedata.IsExpandedTree; Group groupdata = nodedata as Group; Group group = node as Group; if (groupdata != null && group != null) { group.IsExpandedSubGraph = groupdata.IsExpandedSubGraph; } node.Content = ve; // for PartsModel.CopyNode1 return(node); }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { MultiTextNode node1 = (MultiTextNode)newgroup; base.CopyChildren(newgroup, env); node1.myLeftPorts = new ArrayList(); node1.myRightPorts = new ArrayList(); node1.myListGroup = (ListGroup)env[this.myListGroup]; node1.myTopPort = (DiagramShape)env[this.myTopPort]; node1.myBottomPort = (DiagramShape)env[this.myBottomPort]; for (int num1 = 0; num1 < this.myLeftPorts.Count; num1++) { DiagramShape obj1 = (DiagramShape)this.myLeftPorts[num1]; DiagramShape obj2 = (DiagramShape)env[obj1]; node1.myLeftPorts.Add(obj2); } for (int num2 = 0; num2 < this.myRightPorts.Count; num2++) { DiagramShape obj3 = (DiagramShape)this.myRightPorts[num2]; DiagramShape obj4 = (DiagramShape)env[obj3]; node1.myRightPorts.Add(obj4); } }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramNode node1 = (DiagramNode)base.CopyObject(env); if (node1 != null) { node1.myParts = null; node1.myPartID = -1; } return node1; }
public override Dot.Utility.Media.Diagram.Shapes.DiagramShape CopyObject(CopyDictionary env) { return null; }
public virtual CopyDictionary CopyFromCollection(Shapes.IDiagramShapeCollection coll, bool copyableOnly, bool dragging, SizeF offset, CopyDictionary env) { CollectionEnumerator enumerator2; if (env == null) { env = this.CreateCopyDictionary(); } env.SourceCollection = coll; Hashtable hashtable1 = new Hashtable(); Shapes.DiagramShapeCollection collection1 = null; Shapes.DiagramShapeCollection collection2 = new Shapes.DiagramShapeCollection(); Shapes.DiagramShapeCollection collection3 = null; foreach (Shapes.DiagramShape obj1 in coll) { Shapes.DiagramShape obj2 = dragging ? obj1.DraggingObject : obj1; if (((obj2 != null) && (!copyableOnly || obj2.CanCopy())) && !this.alreadyCopied(hashtable1, obj2)) { if ((collection1 != null) && (obj2 is Shapes.GroupShape)) { enumerator2 = collection1.GetEnumerator(); while (enumerator2.MoveNext()) { Shapes.DiagramShape obj3 = enumerator2.Current; if (obj3.IsChildOf(obj2)) { hashtable1.Remove(obj3); if (collection3 == null) { collection3 = new Shapes.DiagramShapeCollection(); } collection3.Add(obj3); collection2.Remove(obj3); } } if ((collection3 != null) && !collection3.IsEmpty) { enumerator2 = collection3.GetEnumerator(); while (enumerator2.MoveNext()) { Shapes.DiagramShape obj4 = enumerator2.Current; collection1.Remove(obj4); } collection3.Clear(); } } hashtable1.Add(obj2, obj2); if (!obj2.IsTopLevel) { if (collection1 == null) { collection1 = new Shapes.DiagramShapeCollection(); } collection1.Add(obj2); } collection2.Add(obj2); } } PointF tf1 = new PointF(); enumerator2 = collection2.GetEnumerator(); while (enumerator2.MoveNext()) { Shapes.DiagramShape obj5 = enumerator2.Current; Shapes.DiagramShape obj6 = env[obj5] as Shapes.DiagramShape; if (obj6 == null) { obj6 = env.Copy(obj5); if (obj6 != null) { tf1 = obj6.Location; obj6.Location = obj6.ComputeMove(tf1, new PointF(tf1.X + offset.Width, tf1.Y + offset.Height)); DiagramLayer layer1 = obj5.Layer; DiagramLayer layer2 = null; if (layer1 != null) { if (layer1.Document == this) { layer2 = layer1; } else { layer2 = this.Layers.Find(layer1.Identifier); } } if (layer2 == null) { layer2 = this.DefaultLayer; } if (!copyableOnly || layer2.CanInsertObjects()) { layer2.Add(obj6); } } } } foreach (Shapes.DiagramShape obj8 in env.Delayeds) { if (obj8 != null) { Shapes.DiagramShape obj9 = env[obj8] as Shapes.DiagramShape; if (obj9 != null) { obj8.CopyObjectDelayed(env, obj9); } } } return env; }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramText text1 = (DiagramText)base.CopyObject(env); if (text1 != null) { text1.myEditor = null; } return text1; }
public virtual void CopyObjectDelayed(CopyDictionary env, DiagramShape newobj) { CollectionEnumerator enumerator1 = this.Observers.GetEnumerator(); while (enumerator1.MoveNext()) { DiagramShape obj1 = enumerator1.Current; DiagramShape obj2 = env[obj1] as DiagramShape; newobj.AddObserver(obj2); } }
public override DiagramShape CopyObject(CopyDictionary env) { LineGraph link1 = (LineGraph)base.CopyObject(env); if (link1 != null) { env.Delayeds.Add(this); link1.myAbstractLink = (IDiagramLine)env.Copy(this.myAbstractLink.DiagramShape); link1.myFromPort = null; link1.myToPort = null; link1.myPartID = -1; } return link1; }
public override DiagramShape CopyObject(CopyDictionary env) { TrapezoidGraph trapezoid1 = (TrapezoidGraph)base.CopyObject(env); if (trapezoid1 != null) { trapezoid1.myPoints = (PointF[])this.myPoints.Clone(); } return trapezoid1; }
protected override void CopyChildren(GroupShape newgroup, CopyDictionary env) { SubGraphNode graph1 = (SubGraphNode)newgroup; graph1.myHandle = null; graph1.myLabel = null; graph1.myPort = null; graph1.myCollapsedObject = null; GroupEnumerator enumerator2 = base.GetEnumerator(); while (enumerator2.MoveNext()) { DiagramShape obj1 = enumerator2.Current; env.Copy(obj1); } enumerator2 = base.GetEnumerator(); while (enumerator2.MoveNext()) { DiagramShape obj2 = enumerator2.Current; DiagramShape obj3 = (DiagramShape)env[obj2]; graph1.Add(obj3); if (obj2 == this.myHandle) { graph1.myHandle = (SubGraphHandle)obj3; continue; } if (obj2 == this.myLabel) { graph1.myLabel = (DiagramText)obj3; continue; } if (obj2 == this.myPort) { graph1.myPort = (DiagramPort)obj3; continue; } if (obj2 == this.myCollapsedObject) { graph1.myCollapsedObject = obj3; } } graph1.myBoundsHashtable = new Hashtable(); IDictionaryEnumerator enumerator1 = this.myBoundsHashtable.GetEnumerator(); while (enumerator1.MoveNext()) { DiagramShape obj4 = (DiagramShape)enumerator1.Key; DiagramShape obj5 = (DiagramShape)env[obj4]; if (obj5 != null) { RectangleF ef1 = (RectangleF)enumerator1.Value; graph1.myBoundsHashtable[obj5] = ef1; } } graph1.myPathsHashtable = new Hashtable(); enumerator1 = this.myPathsHashtable.GetEnumerator(); while (enumerator1.MoveNext()) { StrokeGraph stroke1 = (StrokeGraph)enumerator1.Key; StrokeGraph stroke2 = (StrokeGraph)env[stroke1]; if (stroke2 != null) { PointF[] tfArray1 = (PointF[])enumerator1.Value; graph1.myPathsHashtable[stroke2] = tfArray1.Clone(); } } }
public override Dot.Utility.Media.Diagram.Shapes.DiagramShape CopyObject(CopyDictionary env) { return(null); }
public override DiagramShape CopyObject(CopyDictionary env) { GroupShape group1 = (GroupShape)base.CopyObject(env); if (group1 != null) { group1.myObjects = new ArrayList(); bool flag1 = group1.Initializing; group1.Initializing = true; this.CopyChildren(group1, env); group1.Initializing = flag1; } return group1; }
public virtual DiagramShape CopyObject(CopyDictionary env) { DiagramShape obj1 = (DiagramShape)env[this]; if (obj1 != null) { return null; } obj1 = (DiagramShape)base.MemberwiseClone(); env[this] = obj1; obj1.myLayer = null; obj1.myParent = null; if ((this.myObservers != null) && (this.myObservers.Count > 0)) { env.Delayeds.Add(this); } obj1.myObservers = null; return obj1; }
public override DiagramShape CopyObject(CopyDictionary env) { StrokeGraph stroke1 = (StrokeGraph)base.CopyObject(env); if (stroke1 != null) { stroke1.myPoints = (PointF[])this.myPoints.Clone(); if (this.myToArrowInfo != null) { stroke1.myToArrowInfo = (ArrowInfo)this.myToArrowInfo.Clone(); } if (this.myFromArrowInfo != null) { stroke1.myFromArrowInfo = (ArrowInfo)this.myFromArrowInfo.Clone(); } } return stroke1; }
public virtual CopyDictionary CreateCopyDictionary() { CopyDictionary dictionary1 = new CopyDictionary(); dictionary1.DestinationDocument = this; return dictionary1; }
public override void CopyObjectDelayed(CopyDictionary env, DiagramShape newobj) { base.CopyObjectDelayed(env, newobj); LineGraph link1 = newobj as LineGraph; if (link1 != null) { IDiagramPort port1 = this.FromPort; IDiagramPort port2 = this.ToPort; IDiagramPort port3 = env[port1] as IDiagramPort; IDiagramPort port4 = env[port2] as IDiagramPort; IDiagramLine link2 = link1.AbstractLink; if (link1.Movable || (((port1 == null) || (port3 != null)) && ((port2 == null) || (port4 != null)))) { link1.myFromPort = port3; link1.myToPort = port4; if (port3 != null) { port3.AddDestinationLink(link2); } if (port4 != null) { port4.AddSourceLink(link2); } } else { link2.DiagramShape.Remove(); } } }
public override DiagramShape CopyObject(CopyDictionary env) { DiagramGraph shape1 = (DiagramGraph)base.CopyObject(env); if (shape1 != null) { shape1.myPath = null; } return shape1; }