/// <summary> /// 初始化. /// </summary> /// <param name="iPath">路径.</param> /// <param name="iGameName">游戏名.</param> public bool Init(string iPath, string iGameName) { try { this.Load(iPath); // 创建strings.xml对象 this._stringsXml = this.CreateStringsXml(); // if(null == this._stringsXml) { // return false; // } // 初始化Appliction this.InitApplicationInfo(); // 初始化SDK版本信息. if (null == this.InitSDKVersions()) { return(false); } // 应用用户自定义数据 this.ApplyUserData(iGameName); } catch (Exception e) { UtilsLog.Exception("Init", "Failed!!! Exeption:{0}", e.Message); return(false); } return(true); }
/// <summary> /// 创建 strings xml. /// </summary> /// <returns>string的XML文件对象.</returns> protected virtual StringsXMLBase CreateStringsXml() { string _filePath = this.GetStringsXMLPath(); if (false == File.Exists(_filePath)) { return(null); } StringsXMLBase _stringsXmlTmp = StringsXMLBase.LoadXML(_filePath); if (null == _stringsXmlTmp) { return(null); } return(_stringsXmlTmp); }