| | |
| | | using Hydro.Core.Model; |
| | | using Yw.WinFrmUI.Q3d; |
| | | using Hydro.Model; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | |
| | | using System.Text; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using static Hydro.MapView.MapViewEnum; |
| | | using static Yw.WinFrmUI.Q3d.MapViewEnum; |
| | | |
| | | namespace Hydro.MapView |
| | | namespace Yw.WinFrmUI.Q3d |
| | | { |
| | | [Serializable] |
| | | public class NodeViewModel : NodeCalcModel, IBaseViewModel |
| | | public class NodeViewModel : Q3DNodeCalcModel, IBaseViewModel |
| | | { |
| | | #region 构造函数 |
| | | public NodeViewModel() |
| | |
| | | { |
| | | get |
| | | { |
| | | return new PointF3D(X, Y, Elev); |
| | | return new PointF3D(X, Y, Z); |
| | | } |
| | | set |
| | | { |
| | | Position = new PointF(value.X, value.Y); |
| | | Elev = value.Z; |
| | | Z = value.Z; |
| | | } |
| | | |
| | | } |
| | |
| | | [Description("标高(m)")] |
| | | [DisplayName("标高(m)")] |
| | | [Browsable(true)] |
| | | public new float Elev { get { return base.Elev; } set { base.Elev = value; } } |
| | | public new float Z { get { return base.Z; } set { base.Z = value; } } |
| | | [Category("基本信息")] |
| | | [Description("类型")] |
| | | [DisplayName("类型")] |
| | |
| | | [DisplayName("链表清单")] |
| | | [Browsable(true)] |
| | | [JsonIgnore] |
| | | public List<LinkCalcModel> Links |
| | | public List<Q3DLinkCalcModel> Links |
| | | { |
| | | get |
| | | { |
| | |
| | | set { if (value != null) X = value.X; Y = value.Y; } |
| | | } |
| | | |
| | | [Category("其他参数")] |
| | | [Description("标签")] |
| | | [DisplayName("标签")] |
| | | [Editor(typeof(MyEditor), typeof(UITypeEditor))] |
| | | public TagList Tags { get; set; } = null; |
| | | //[Category("其他参数")] |
| | | //[Description("标签")] |
| | | //[DisplayName("标签")] |
| | | //[Editor(typeof(MyEditor), typeof(UITypeEditor))] |
| | | //public TagList Tags { get; set; } = null; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | X += vector.X; |
| | | Y += vector.Y; |
| | | Elev += vector.Z; |
| | | Z += vector.Z; |
| | | } |
| | | |
| | | |
| | |
| | | if (this is TankViewModel) return MapObjectType.水池; |
| | | if (this is MeterViewModel) return MapObjectType.水表; |
| | | if (this is NozzleViewModel) return MapObjectType.喷头; |
| | | if (this is ValveNodeViewModel) return MapObjectType.阀门点; |
| | | |
| | | |
| | | |
| | | if (this is PipeViewModel) return MapObjectType.管线; |
| | | if (this is ValveViewModel) return MapObjectType.阀门; |
| | | if (this is RepeaterViewModel) return MapObjectType.重复器; |
| | | |
| | | if (this is PumpViewModel) return MapObjectType.水泵; |
| | | if (this is PumpNodeViewModel) return MapObjectType.水泵点; |
| | | |
| | | |
| | | return MapObjectType.节点; |
| | | } |
| | |
| | | |
| | | private PointF3D ToPointF3D() |
| | | { |
| | | return new PointF3D(X, Y, Elev); |
| | | return new PointF3D(X, Y, Z); |
| | | } |
| | | |
| | | #endregion |