private bool LoadTableData() { var path = Application.dataPath + "/Help.csv"; _helpTable = new HelpTable(); if (!File.Exists(path)) { File.WriteAllText(path, "title,information"); SceneMain.Current.InvokeEvents(AppConfig.EventKey.TIP, "请先配制程序目录下的Help.csv"); return(false); } else { try { var txt = File.ReadAllText(path /*, System.Text.Encoding.GetEncoding("gb2312")*/); _helpTable.Load(txt); } catch (Exception e) { SceneMain.Current.InvokeEvents(AppConfig.EventKey.TIP, "数据加载错误:" + e); return(false); } return(true); } }
public void enableTable(int id) { if (lastTable != null) { lastTable.tableBtn.enabled = true; lastTable.table.SetActive(false); } tables[id].tableBtn.enabled = false; tables[id].table.SetActive(true); lastTable = tables [id]; }