Esempio n. 1
0
 public MConfig GetMessage(string configPath)
 {
     MConfig mConfig = new MConfig();
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.Load(configPath);
     mConfig.Port = Convert.ToInt32(xmlDocument.SelectSingleNode("Data/Port").InnerText);
     mConfig.AssetFolder = xmlDocument.SelectSingleNode("Data/AssetFolder").InnerText;
     mConfig.Width = Convert.ToInt32(xmlDocument.SelectSingleNode("Data/Width").InnerText);
     mConfig.Height = Convert.ToInt32(xmlDocument.SelectSingleNode("Data/Height").InnerText);
     mConfig.Serialport = xmlDocument.SelectSingleNode("Data/Serialport").InnerText;
     return mConfig;
 }
Esempio n. 2
0
 private void InitConfigs()
 {
     m_config = new ConfigDeal().GetMessage(this.configPath);
 }