Esempio n. 1
0
        public new bool Load(string Path)
        {
            bool flag2;

            SimpleDB.Reader cGT = new SimpleDB.Reader();
            this.Clear();
            cGT.Open(Path);
            string str = cGT.Header();

            if (str == "GOLD Parser Tables/v1.0")
            {
                flag2 = this.LoadVer1(cGT);
            }
            else if (str == "GOLD Parser Tables/v5.0")
            {
                flag2 = this.LoadVer5(cGT);
            }
            else
            {
                flag2 = false;
            }
            this.ComputeCGTMetadata();
            cGT.Close();
            return(flag2);
        }
Esempio n. 2
0
 private static void LoadMapping()
 {
     SimpleDB.Reader reader = new SimpleDB.Reader();
     try
     {
         reader.Open("mapping.dat");
         if (Operators.CompareString(reader.Header(), "GOLD Character Mapping", true) != 0)
         {
             //BuilderApp.Log.Add(SysLogSection.Internal, SysLogAlert.Critical, "The file 'mapping.dat' is invalid.");
         }
         else
         {
             while (!reader.EndOfFile())
             {
                 reader.GetNextRecord();
                 string str           = reader.RetrieveString();
                 int    uppercaseCode = reader.RetrieveInt16();
                 int    lowercaseCode = reader.RetrieveInt16();
                 string left          = str;
                 if (Operators.CompareString(left, "C", true) == 0)
                 {
                     AddCase(uppercaseCode, lowercaseCode, "");
                 }
                 else if (Operators.CompareString(left, "W", true) == 0)
                 {
                     AddWin1252(uppercaseCode, lowercaseCode);
                 }
             }
             reader.Close();
         }
     }
     catch (Exception exception1)
     {
         //ProjectData.SetProjectError(exception1);
         Exception exception = exception1;
         //BuilderApp.Log.Add(SysLogSection.Internal, SysLogAlert.Critical, exception.Message);
         //ProjectData.ClearProjectError();
     }
 }