Пример #1
0
        public override void SaveUnitName(string name)
        {
            short idx = BitConverter.ToInt16(this.Data, 2);

            if (PkdFile.AbilityText.Count > idx)
            {
                GGCRTblFile   txtFile = new GGCRTblFile(GGCRStaticConfig.AbilityTxtFile);
                List <string> list    = txtFile.ListAllText();
                if (list.Count > idx)
                {
                    list[idx] = name;
                    txtFile.Save(list);

                    PkdFile.ReloadAbilityText();
                }
            }
        }
Пример #2
0
        public static Dictionary <short, string> ListSeriesCode()
        {
            Dictionary <short, string> dic = new Dictionary <short, string>();

            List <string> names = new GGCRTblFile(GGCRStaticConfig.PATH + @"\language\" + GGCRStaticConfig.Language + @"\MiscData.tbl").ListAllText();

            GGCRPkdFile misc = new GGCRPkdFile(GGCRStaticConfig.PATH + @"\resident\MiscData.pkd");

            int idx   = misc.GetInnerFile("SeriesList.cdb").StartIndex;
            int count = BitConverter.ToInt32(misc.Data, idx + 8);

            for (int i = 0; i < count; i++)
            {
                short groupId = BitConverter.ToInt16(misc.Data, idx + 12 + i * GGCRStaticConfig.SeriesLength);
                dic.Add(groupId, names[i]);
            }
            return(dic);
        }
Пример #3
0
        public override void Save()
        {
            string tmp = tempRemark;

            this.tempRemark = null;
            if (tmp != null && tmp != RemarkDetail)
            {
                GGCRTblFile   txtFile = new GGCRTblFile(GGCRStaticConfig.AbilityTxtFile);
                List <string> list    = txtFile.ListAllText();
                if (list.Count > this.RemarkId)
                {
                    list[this.RemarkId] = tmp;
                    txtFile.Save(list);

                    PkdFile.ReloadAbilityText();
                }
            }
            base.Save();
        }
Пример #4
0
 public FrmEditText(string file)
 {
     InitializeComponent();
     this.tblFile  = new GGCRTblFile(file);
     tsmiFile.Text = tblFile.FileName;
 }