static public object Load(string pFile, object pValue) { LitEngine.IO.AESReader tloader = null; object ret = pValue; try { string tfullname = GameCore.AppPersistentAssetsPath + pFile; if (!File.Exists(tfullname)) { return(ret); } tloader = new LitEngine.IO.AESReader(tfullname); ret = ReadField(tloader, pValue, null); tloader.Close(); tloader = null; } catch (System.Exception pErro) { DLog.LogError(pErro.ToString()); } if (tloader != null) { tloader.Close(); } return(ret); }
public void Load() { LitEngine.IO.AESReader tloader = null; try { string tfullname = GameCore.AppPersistentAssetsPath + cDatafile; if (!File.Exists(tfullname)) { return; } Clear(); tloader = new LitEngine.IO.AESReader(tfullname); int ttableCount = tloader.ReadInt32(); for (int i = 0; i < ttableCount; i++) { DataTable ttable = new DataTable(); ttable.Load(tloader); AddFromTable(ttable); } tloader.Close(); tloader = null; Error = null; } catch (System.Exception _e) { Error = _e.ToString(); Clear(); DLog.LogError(_e.ToString()); } if (tloader != null) { tloader.Close(); } }