qin
2024-05-21 a15bf1762569323ebf47dd094b0f79b33829e76f
Hydraulic/Hydro.MapView/MapViewNetWork.cs
@@ -18,6 +18,7 @@
using System.Runtime.InteropServices;
using Hydro.HydraulicOptimizer;
using Hydro.Core;
using System.Xml.Linq;
namespace Hydro.MapView
{
@@ -35,6 +36,11 @@
        public NodeViewModel StartPoint { get; set; }
        public NodeViewModel EndPoint { get; set; }
        /// <summary>
        /// 当量集合,当量模板ID,<器具ID,数量>
        /// </summary>
        //public Dictionary<long,Dictionary<long,int>> DlList { get; set; }
        /// <summary>
        /// 核心承载字段
@@ -566,7 +572,7 @@
                EndPoint = network.EndPoint;
            }
        }
        public List<IBaseViewModel> Add(MapViewNetWork net0, PointF3D offset = null, bool isCopy = false)
        public List<IBaseViewModel> Add(MapViewNetWork net0, PointF3D offset = null, bool isCopy = false,NodeViewModel ConnectNode=null)
        {
            if (offset == null)
            {
@@ -610,6 +616,12 @@
                Hash_ID.Add(l.ID);
                list.Add(l);
            });
            if (ConnectNode!=null)
            {
                var l = AddPipe(ConnectNode, net.StartPoint);
                list.Add(l);
                Hash_ID.Add(l.ID);
            }
            //BuildRelation();
            return list;
        }