Example #1
0
 private void AddArc(string start, string end, decimal weight)
 {
     ArcList.ForEach(arc =>
     {
         if (arc.Start.Equals(start) && arc.End.Equals(end))
         {
             throw new ArgumentException("添加了重复的边!");
         }
     });
     ArcList.Add(new Arc(start, end, weight));
 }
Example #2
0
        public CEntityComplexShape(
            CTableLayer layer,
            Guid ToolPk)
            : base()
        {
            PK = ToolPk;

            foreach (CEntityLine line in layer.LineList)
            {
                LineList.Add(line);
            }

            foreach (CEntityCircle circle in layer.CircleList)
            {
                CircleList.Add(circle);
            }

            foreach (CEntityArc arc in layer.ArcList)
            {
                ArcList.Add(arc);
            }
        }