lixiaojun
2025-01-20 6e1306ab578ed1ad79fc33b0bb7e496b897bf4a4
WinFrmUI/Yw.WinFrmUI.Hydro.Q3d.Core/MapView/Base/LinkViewModel.cs
@@ -1,17 +1,17 @@
using Yw.WinFrmUI.Q3d;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using static Yw.WinFrmUI.Q3d.MapViewEnum;
using System.Xml.Linq;
using Newtonsoft.Json;
using Yw.WinFrmUI.Q3d;
using static Yw.WinFrmUI.Q3d.MapViewEnum;
using static Yw.WinFrmUI.Q3d.ObjectEnum;
using System.Drawing.Design;
namespace Yw.WinFrmUI.Q3d
{
@@ -20,7 +20,7 @@
    {
        #region 构造函数
        public LinkViewModel()
        {
@@ -41,7 +41,7 @@
        #region 属性
        [Category("基本信息")]
        [DisplayName("编号")]
        [Browsable(true)]
@@ -55,7 +55,7 @@
        [Category("基本信息")]
        [DisplayName("起始节点")]
        [Browsable(true)]
        public string Node1
        public string Node1
        {
            get
            {
@@ -83,7 +83,7 @@
                base.Node2 = value;
            }
        }
        [Browsable(false)]
        [JsonIgnore]
@@ -94,7 +94,7 @@
        public NodeViewModel EndNode { get { return (NodeViewModel)base.EndNode; } set { base.EndNode = value; } }
        private PointF _position { get; set; } = new PointF(0, 0);
        public  PointF Position
        public PointF Position
        {
            get
            {
@@ -108,10 +108,10 @@
                }
                return _position;
            }
            set
            {
            set
            {
            }
        }
@@ -130,7 +130,7 @@
        [Category("基本信息")]
        [DisplayName("标高(m)")]
        [Browsable(false)]
        public  float Z
        public float Z
        {
            get
            {
@@ -182,7 +182,7 @@
            get
            {
                return base.Length;
            }
            set
            {
@@ -204,7 +204,7 @@
        [Description("X坐标")]
        [DisplayName("X坐标")]
        [Browsable(true)]
        public  float X
        public float X
        {
            get
            {
@@ -249,7 +249,7 @@
        //[Editor(typeof(MyEditor), typeof(UITypeEditor))]
        //public TagList Tags { get; set; } = null;
        [Category("基本信息")]
@@ -266,7 +266,7 @@
        #region 方法
        public string IDType => Type.ToString() + "\t" + ID;
        public MapObjectType GetTypeString()
@@ -276,14 +276,14 @@
            if (this is TankViewModel) return MapObjectType.水池;
            if (this is MeterViewModel) return MapObjectType.水表;
            if (this is NozzleViewModel) return MapObjectType.喷头;
            if (this is PipeViewModel) return MapObjectType.管线;
            if (this is ValveViewModel) return MapObjectType.阀门;
            if (this is PumpViewModel) return MapObjectType.水泵;
            return MapObjectType.节点;
        }