You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
4.5 KiB
135 lines
4.5 KiB
using System; |
|
using System.Collections.Generic; |
|
using System.Drawing; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading.Tasks; |
|
using System.Xml.Serialization; |
|
|
|
namespace Kingo.PluginServiceInterface |
|
{ |
|
//[XmlRoot("Maps")] |
|
//public class MapsCfg |
|
//{ |
|
// public string Name { get; set; } |
|
// public List<LayerInfo> Layers { get; set; } |
|
//} |
|
|
|
//[XmlRoot("LayerInfo")] |
|
//public class LayerCfg |
|
//{ |
|
// [System.Xml.Serialization.XmlIgnore] |
|
// public int ID { get; private set; } |
|
// [System.Xml.Serialization.XmlIgnore] |
|
// public int PID { get; private set; } |
|
// [XmlAttribute("LayerName")] |
|
// public string LayerName { get; set; } |
|
// [XmlAttribute("FcName")] |
|
// public string FcName { get; set; } |
|
// [XmlAttribute("Expanded")] |
|
// public bool Expanded { get; set; } |
|
// [XmlAttribute("Visible")] |
|
// public bool Visible { get; set; } |
|
// [XmlAttribute("Selectable")] |
|
// public bool Selectable { get; set; } |
|
// [XmlAttribute("AllowEdit")] |
|
// public bool AllowEdit { get; set; } |
|
// [XmlAttribute("Transparency")] |
|
// public int Transparency { get; set; } |
|
// [XmlAttribute("Required")] |
|
// public bool Required { get; set; } |
|
// public string FcPath { get; set; } |
|
// public string Symbol { get; set; } |
|
// [System.Xml.Serialization.XmlIgnore] |
|
// public Bitmap SymbolImg { get; set; } |
|
// [System.Xml.Serialization.XmlIgnore] |
|
// public object Data { get; set; } |
|
// /// <summary> |
|
// /// 绝对路径Data |
|
// /// </summary> |
|
// public string AbsolutePath { get; set; } |
|
// /// <summary> |
|
// /// 区分内外部数据 |
|
// /// </summary> |
|
// public string AbsolutePathType { get; set; } |
|
// public string FieldEditCfg { get; set; } |
|
// [System.Xml.Serialization.XmlIgnore] |
|
// public bool IsEdit { get; set; } |
|
// [System.Xml.Serialization.XmlIgnore] |
|
// public int ImgIndex { get; set; } |
|
// [XmlAttribute("LayerType")] |
|
// public EnumLayerType LayerType { get; set; } |
|
// public List<LayerCfg> Layers { get; set; } |
|
// public int MinScale { get; set; } |
|
// public int MaxScale { get; set; } |
|
// public LayerCfg() |
|
// { |
|
// PID = 0; |
|
// ID = 1; |
|
// Layers = new List<LayerCfg>(); |
|
// } |
|
// public LayerCfg(LayerCfg pParentLayer) |
|
// { |
|
// PID = pParentLayer.ID; |
|
// ID = pParentLayer.ID * 100 + pParentLayer.Layers.Count + 1; |
|
// Layers = new List<LayerCfg>(); |
|
// } |
|
// public void SetParentLayer(LayerCfg pParent) |
|
// { |
|
// PID = pParent.ID; |
|
// ID = pParent.ID * 100 + pParent.Layers.IndexOf(this) + 1; |
|
// } |
|
|
|
// /// <summary> |
|
// /// 将父子级数据结构转换为普通list |
|
// /// </summary> |
|
// /// <param name="list"></param> |
|
// /// <returns></returns> |
|
// public List<LayerCfg> GetAllItem() |
|
// { |
|
// List<LayerCfg> Resultlist = new List<LayerCfg>(); |
|
// //foreach (var item in list) |
|
// //{ |
|
// OperationChildData(Resultlist, this); |
|
// Resultlist.Add(this); |
|
// //} |
|
// return Resultlist; |
|
// } |
|
// /// <summary> |
|
// /// 递归子级数据 |
|
// /// </summary> |
|
// /// <param name="treeDataList">树形列表数据</param> |
|
// /// <param name="parentItem">父级model</param> |
|
// private void OperationChildData(List<LayerCfg> AllList, LayerCfg item) |
|
// { |
|
// if (item.Layers != null) |
|
// { |
|
// if (item.Layers.Count > 0) |
|
// { |
|
// //foreach (var subItem in item.Layers) |
|
// //{ |
|
// // subItem.SetParentLayer(item); |
|
// // AllList.Add(subItem); |
|
// //} |
|
// //AllList.AddRange(item.Layers); |
|
// foreach (var subItem in item.Layers) |
|
// { |
|
// subItem.SetParentLayer(item); |
|
// AllList.Add(subItem); |
|
// OperationChildData(AllList, subItem); |
|
// } |
|
// } |
|
// } |
|
// } |
|
//} |
|
public enum EnumLayerType |
|
{ |
|
GroupLayer, |
|
FeatureLayer, |
|
RasterLayer, |
|
KOTilesLayer, |
|
WMTSLayer, |
|
Map, |
|
Null |
|
} |
|
}
|
|
|