using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace KGIS.Plugin.LayerProperty.Entity { [Serializable] public class LayerEntity : INotifyPropertyChanged { /// /// 主键 /// public string PrimaryKey { get; set; } /// /// 一级标题 /// public string HeaderField { get; set; } /// /// 二级标题 /// public string SecondField { get; set; } public string LayyerGroup { get; set; } public int LayyerGroupType { get; set; } /// /// 图层名称 /// public string LayerName { get; set; } /// /// 图层数据源 /// public List LayerSource { get; set; } /// /// 图层描述 /// public string LayerCaption { get; set; } /// /// 图层数据来源 1国家监测图斑 2自主变更图斑 3无人机举证图斑 /// public string LayerSJLY { get; set; } /// /// 图层类型 /// public LayerTypeEnum LayerType { get; set; } /// /// 图层图标路径 /// public string LayerIconPath { get; set; } /// /// 图层显示比例尺 /// public int LayerMinScale { get; set; } /// /// 图层显示比例尺 /// public int LayerMaxScale { get; set; } /// /// 填充颜色 /// public Color LayerFillColor { get; set; } /// /// 边框颜色 /// public Color LayerBorderColor { get; set; } /// /// 边框宽度 /// public double LayerBorderWidth { get; set; } public int LayerBorderStyle { get; set; } /// /// 标签大小 /// public string LayerLableSize { get; set; } /// /// 标签名称 /// public string LayerLabelName { get; set; } /// /// 标签颜色 /// public Color LayerLableColor { get; set; } /// /// 标签显示比例尺 /// public int LayerLableMinScale { get; set; } /// /// 标签显示比例尺 /// public int LayerLableMaxScale { get; set; } public System.Windows.Media.ImageSource ImageSource { get; set; } /// /// 图层路径 /// public string LayerPath { get; set; } /// /// 是否举证 /// public string SFJZ { get; set; } public int LayerIndex { get; set; } public bool LayerIsVisble { get; set; } public List Fields { get; set; } private string m_IsWRJ; private string m_IsSelectFile; private string m_IsNeedCreate; private bool layerIsChecked = true; public bool LayerIsChecked { get { return LayerSource == null || LayerSource.Count <= 0 ? false : layerIsChecked; } set { layerIsChecked = value; OnPropertyChanged("LayerIsChecked"); } } public string IsWRJ { get => m_IsWRJ; set => m_IsWRJ = value; } public string IsSelectFile { get => m_IsSelectFile; set => m_IsSelectFile = value; } public string IsNeedCreate { get => m_IsNeedCreate; set => m_IsNeedCreate = value; } public event PropertyChangedEventHandler PropertyChanged; /// /// 属性改变时触发事件 /// /// Property that changed. private void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (null != handler) { handler.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } } /// /// 数据源 /// public class LayerSourceEntity { public string LayerSourceName { get; set; } public string LayerSourcePath { get; set; } } public enum LayerTypeEnum { 矢量 = 0, 影像 = 1 } public enum LayerGroupType { 基础资料 = 0, 调绘图斑 = 1 } [Serializable] public class LayerField { public string Name { get; set; } public string Alias { get; set; } public string FromValue { get; set; } public int Index { get; set; } public string FiledType { get; set; } } }