Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public MasterFile()
            : base(GGCRStaticConfig.MasterFile)
        {
            MasterNames = new GGCRTblFile(GGCRStaticConfig.MasterTxtFile).ListAllText().ToArray();

            SeriesCode = GGCRUtil.ListSeriesCode();
        }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
        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;
            }
        }