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.
51 lines
1.4 KiB
51 lines
1.4 KiB
using KGIS.Framework.Utils; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading.Tasks; |
|
using System.Xml; |
|
using System.Xml.Serialization; |
|
|
|
namespace Kingo.PluginServiceInterface |
|
{ |
|
[XmlRoot("SystemConfig")] |
|
public class SystemConfig2 |
|
{ |
|
//public static SystemConfig2 Instance { get; } = new SystemConfig2(); |
|
public SystemConfig2() |
|
{ |
|
|
|
} |
|
|
|
/// <summary> |
|
/// 基础数据加载配置 |
|
/// </summary> |
|
public List<LayerCfg> JcLayerLoadCfg { get; set; } |
|
|
|
public List<WYZPCfg> WYZPSetCfg { get; set; } |
|
|
|
public List<LayerCfg> ZLLayerLoadCfg { get; set; } |
|
|
|
public List<LayerCfg> BGLayerLoadCfg { get; set; } |
|
|
|
public List<LayerCfg> BHTBLayerLoadCfg { get; set; } |
|
|
|
public List<LayerCfg> SJYXLayerLoadCfg { get; set; } |
|
|
|
public void Save() |
|
{ |
|
string BaseLoadCfg = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configs", "SystemCfg.xml"); |
|
if (System.IO.File.Exists(BaseLoadCfg)) |
|
{ |
|
string cfg = SerializeAPI.SerializeToXML<SystemConfig2>(this); |
|
|
|
XmlDocument xmlDoc = new XmlDocument(); |
|
xmlDoc.LoadXml(cfg); |
|
//System.IO.TextWriter tw = new XmlWriter(); |
|
xmlDoc.Save(BaseLoadCfg); |
|
} |
|
} |
|
|
|
} |
|
}
|
|
|