public bool Register(ref TableInspector tableInspector, NrTableBase tbl) { try { int num = 24; for (int i = 1; i < num; i++) { string strFilePath = string.Format("textmanager/text_{0}", this.m_strGroupText[i]); NrTableBase tbl2 = new NrTextTable_ForTsTxtMgr(this.m_strGroupText[i], (NrTextMgr.eTEXTMGR)i, strFilePath); tableInspector.RegistWait(tbl, tbl2); } } catch (Exception message) { Debug.LogError(message); } return(true); }
public void RegistSerial(params object[] objs) { WaitSerialTasks waitSerialTasks = new WaitSerialTasks(); for (int i = 0; i < objs.Length; i++) { NrTableBase nrTableBase = objs[i] as NrTableBase; if (nrTableBase != null) { waitSerialTasks.Add(new WaitTask(this._LoadTable(nrTableBase))); } else { TsLog.LogError("Non NrTableBase class. {0}", new object[] { objs[i].GetType().FullName }); } } this._listCoTsk.Add(waitSerialTasks); }
public static bool LoadTableData(NrTableBase dataTable) { if (dataTable == null) { UnityEngine.Debug.LogError("ERROR, TableDataLoad.cs, LoadTableData(), dataTable is Null "); return(false); } using (TsDataReader tsDataReader = new TsDataReader()) { tsDataReader.UseMD5 = true; string text = Option.GetProtocolRootPath(Protocol.FILE); text = text.Substring("file:///".Length, text.Length - "file:///".Length); dataTable.m_strFilePath = string.Format("{0}{1}", text, dataTable.m_strFilePath); dataTable.m_strFilePath = dataTable.m_strFilePath.ToLower(); if (dataTable.m_bReadImmediate) { bool flag = tsDataReader.LoadImmediate(dataTable.m_strFilePath, "[Table]", new TsDataReader.RowDataCallback(dataTable.ParseDataFromNDTImmediate)); bool result = flag; return(result); } if (tsDataReader.Load(dataTable.m_strFilePath)) { if (tsDataReader.BeginSection("[Table]")) { dataTable.ParseDataFromNDT(tsDataReader); bool result = true; return(result); } } else { UnityEngine.Debug.LogError("failed : " + dataTable.m_strFilePath); } } return(false); }
public void RegistWait(NrTableBase preTbl, NrTableBase tbl) { this._listCoTsk.Add(new WaitTask(this._LoadTable(preTbl, tbl))); }
public void Regist(NrTableBase tbl) { this._listCoTsk.Add(new WaitTask(this._LoadTable(tbl))); }