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()
{
}
///
/// 基础数据加载配置
///
public List JcLayerLoadCfg { get; set; }
public List WYZPSetCfg { get; set; }
public List ZLLayerLoadCfg { get; set; }
public List BGLayerLoadCfg { get; set; }
public List BHTBLayerLoadCfg { get; set; }
public List 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(this);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(cfg);
//System.IO.TextWriter tw = new XmlWriter();
xmlDoc.Save(BaseLoadCfg);
}
}
}
}