using FestoDebugger.Service; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FestoDebugger.Beckoff { public class BeckhoffManager : Singleton { #region 内部常量 #endregion #region 内部变量 BeckhoffCfg _cfg = null; #endregion #region 属性 public BeckhoffCfg BeckhoffCfg { get { return _cfg; } set { _cfg = value; } } #endregion /// /// 初始化 /// public void Initialize() { string xmlPath = ""; xmlPath = Directory.GetParent(Directory.GetCurrentDirectory()).FullName + "\\net8.0-windows\\Config\\Beckhoffcfg.xml"; BeckhoffModuleIOManager.Instance.Initialize(Directory.GetParent(Directory.GetCurrentDirectory()).FullName + "\\net8.0-windows\\Config\\ModuleIoCfg.xml"); _cfg = CustomXmlSerializer.Deserialize(new FileInfo(xmlPath)); if (_cfg != null) { BeckhoffIOManager.Instance.Initialize(_cfg); } } } }