Esempio n. 1
0
 public void Add(Node o)
 {
     base.List.Add(o);
     o.ID = "NODE" + this.mIndex.ToString();
     o.Name = "新节点" + this.mIndex.ToString();
     this.mIndex++;
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public void Remove(Node o)
 {
     base.List.Remove(o);
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
 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;
 }