public void Add(Node o) { base.List.Add(o); o.ID = "NODE" + this.mIndex.ToString(); o.Name = "新节点" + this.mIndex.ToString(); this.mIndex++; }
public ArrowLine(Node StartNode, Node EndNode, Color PenColor, int PenWidth) { this.mCaptureDistance = 8; this.mHighLightColor = Color.Blue; base.mGraphType = DrawType.ArrowLine; this.mStartNode = StartNode; this.mEndNode = EndNode; this.mPenColor = PenColor; this.mPenWidth = PenWidth; this.ReCalcCoodinate(); }
public void Remove(Node o) { base.List.Remove(o); }
public List<ArrowLine> GetRelationalLine(Node nod) { List<ArrowLine> list = new List<ArrowLine>(); for (int i = this.mALines.Count - 1; i >= 0; i--) { if ((this.mALines[i].StartNode == nod) || (this.mALines[i].EndNode == nod)) { list.Add(this.mALines[i]); } } return list; }
public void AddNode(int x, int y, ImageList ImgList, int ImgIndex, NodeType nType) { Node o = new Node(x, y, ImgList, ImgIndex, nType); this.mNodes.Add(o); this.SetUnitSelect(o.ID); this.Draw(); this.OnUnitAdd(EventArgs.Empty); }
public void AddArrowLine(Node StartNode, Node EndNode, Color PenColor, int PenWidth) { if ((StartNode == null) || (EndNode == null)) { throw new ApplicationException("连线的起始节点或终止节点不能为空"); } ArrowLine o = new ArrowLine(StartNode, EndNode, PenColor, PenWidth); this.mALines.Add(o); this.SetUnitSelect(o.ID); this.Draw(); this.OnUnitAdd(EventArgs.Empty); }
private void AddNewActdef(Node nod) { string newGuid = this.GetNewGuid(); this.mProDefDoc.AddActdef(newGuid, nod.Name, (ActdefType) nod.ImageIndex, true, nod.XPos, nod.YPos); nod.RelationalID = newGuid; }