예제 #1
0
 private static void LoadData()
 {
     AutoTranslator.Data_ = new MessageGroupCollection();
     try {
         string       DataFilePath = Path.Combine(POL.GetApplicationPath(AppID.FFXI), "ROM/76/23.DAT");
         FileStream   FS           = new FileStream(DataFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
         Encoding     E            = new FFXIEncoding();
         BinaryReader BR           = new BinaryReader(FS, E);
         while (FS.Position < FS.Length)
         {
             AutoTranslator.Data_.Add(AutoTranslator.ReadMessageGroup(BR, E));
         }
         BR.Close();
     } catch (Exception E) { Console.WriteLine(E.ToString()); }
 }
예제 #2
0
        private static MessageGroup ReadMessageGroup(BinaryReader BR, Encoding E)
        {
            MessageGroup MG = new MessageGroup();

            MG.Category    = BR.ReadByte();
            MG.Language    = BR.ReadByte();
            MG.ID          = BR.ReadByte();
            MG.ParentGroup = BR.ReadByte();
            MG.Title       = E.GetString(BR.ReadBytes(32)).TrimEnd('\0');
            MG.Description = E.GetString(BR.ReadBytes(32)).TrimEnd('\0');
            uint MessageCount = BR.ReadUInt32();

            /* MessageBytes */ BR.ReadUInt32();
            for (int i = 0; i < MessageCount; ++i)
            {
                MG.Messages.Add(AutoTranslator.ReadMessage(BR, E));
            }
            return(MG);
        }
예제 #3
0
 public void Remove(AutoTranslator.MessageGroup MG)
 {
     this.InnerList.Remove  (MG);
 }
예제 #4
0
 public int IndexOf(AutoTranslator.MessageGroup MG)
 {
     return this.InnerList.IndexOf (MG);
 }
예제 #5
0
 public bool Contains(AutoTranslator.MessageGroup MG)
 {
     return this.InnerList.Contains(MG);
 }
예제 #6
0
 public void Add(AutoTranslator.MessageGroup MG)
 {
     this.InnerList.Add     (MG);
 }
예제 #7
0
 public void Remove(AutoTranslator.Message M)
 {
     this.InnerList.Remove  (M);
 }
예제 #8
0
 public int IndexOf(AutoTranslator.Message M)
 {
     return this.InnerList.IndexOf (M);
 }
예제 #9
0
 public void Add(AutoTranslator.Message M)
 {
     this.InnerList.Add     (M);
 }