private int addText(string text) { int count = 0; foreach (string s in GGCRUtil.Languages()) { GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.PATH + @"\language\" + s + @"\AbilitySpecList.tbl"); if (txtFile.Count > count) { count = txtFile.Count; } } count++; foreach (string s in GGCRUtil.Languages()) { GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.PATH + @"\language\" + s + @"\AbilitySpecList.tbl"); List <string> list = txtFile.ListAllText(); int span = count - list.Count; for (int i = 0; i < span; i++) { list.Add(text); } txtFile.Save(list); } return(count); }
public MasterFile() : base(GGCRStaticConfig.MasterFile) { MasterNames = new GGCRTblFile(GGCRStaticConfig.MasterTxtFile).ListAllText().ToArray(); SeriesCode = GGCRUtil.ListSeriesCode(); }
public override void SaveUnitName(string name) { int idx = this.ID; GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.MachineTxtFile); List <string> list = txtFile.ListAllText(); if (list.Count > idx) { list[idx] = name; txtFile.Save(list); PkdFile.AllText[idx] = name; } }
public override void SaveUnitName(string name) { int idx = BitConverter.ToInt16(this.Data, NAME_IDX); GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.MachineTxtFile); List <string> list = txtFile.ListAllText(); if (list.Count > idx) { list[idx] = name; txtFile.Save(list); PkdFile.AllText[idx] = name; } }