using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using static Hydro.MapView.MapViewEnum; namespace Hydro.MapView { public interface IBaseViewModel { [Category("1、基本信息")] [Description("对象的ID唯一标识")] [DisplayName(" 编号 ")] string ID { get; set; } //string Name { get; set; } [Category("4、其他参数")] [Description("选中")] [DisplayName("选中")] [Browsable(false)] bool Selected { get; set; } [Category("4、其他参数")] [Description("选中")] [DisplayName("位置信息")] [Browsable(false)] PointF Position { get; set; }//= new PointF(0, 0); [Browsable(false)] [JsonIgnore] String regionName { get; set; }//= null; [Category("1、基本信息")] [Description("X坐标")] [DisplayName("X坐标")] [Browsable(true)] float X { get; set; } //{ // get // { // return Position.X; // } // set // { // Position = new PointF(value, Position.Y); // } //} [Category("1、基本信息")] [Description("Y坐标")] [DisplayName("Y坐标")] [Browsable(true)] float Y { get; set; } //{ // get // { // return Position.Y; // } // set // { // Position = new PointF(Position.X, value); // } //} [Category("1、基本信息")] [Description("标高")] [DisplayName("标高")] [Browsable(true)] float Elev { get; set; } [Category("4、其他参数")] [Description("对象的等级")] [DisplayName("级别")] //[Editor(typeof(MyPropertyEditor), typeof(UITypeEditor))] int Level { get; set; } //= 0; [Category("4、其他参数")] [Description("对象的等级")] [DisplayName("是否显示")] bool Visible { get; set; } //= true; //[Category("4、其他参数")] //[Description("标签集合")] //[DisplayName("标签")] //public string Tags { get; set; } = null; [Category("1、基本信息")] [Description("类型")] [DisplayName("类型")] MapObjectType Type { get; }// { get { return this.GetTypeString(); } } //[Browsable(false)] [Category("4、其他参数")] [Description("ID类型")] [DisplayName("ID类型")] [Browsable(false)] string IDType { get; }// => Type.ToString()+"\t"+ ID; MapObjectType GetTypeString(); bool isNode(); } }