Esempio n. 1
0
 static void fillconfig(string path)
 {
     try
     {
         config.Clear();
         FileStream   aFile   = new FileStream(path, FileMode.Open);
         StreamReader sr      = new StreamReader(aFile);
         string       strLine = sr.ReadLine();
         while (strLine != null)
         {
             ChineseString chinese = fastJSON.JSON.Instance.ToObject <ChineseString>(strLine);
             if (chinese != null)
             {
                 //string v = null;
                 if (!config.ContainsKey(chinese.ID))
                 {
                     config.Add(chinese.ID, chinese.txt);
                     //Debug.LogError("config["+chinese.ID.ToString()+"]="+config[chinese.ID]);
                 }
             }
             strLine = sr.ReadLine();
         }
         sr.Close();
     }
     catch (IOException ex)
     {
         Debug.LogError(ex.ToString());
     }
 }
Esempio n. 2
0
 public void TestChineseStringConstructor01()
 {
     ChineseString chineseString = new ChineseString();
 }