Exemplo n.º 1
0
 private void ParseData(CSVLoader csvLoader)
 {
     _dicString = new Dictionary <string, string> [12];
     for (int i = 0; i < _dicString.Length; i++)
     {
         _dicString[i] = new Dictionary <string, string>();
     }
     for (int j = 0; j < csvLoader.Rows; j++)
     {
         csvLoader.ReadValue(0, j, string.Empty, out string Value);
         Value.Trim();
         for (int k = 0; k < 12; k++)
         {
             csvLoader.ReadValue(k + 1, j, string.Empty, out string Value2);
             Value2 = Value2.Trim();
             if (Value.Length <= 0)
             {
                 Debug.LogError("ERROR, Empty key at row:" + j + " Col: " + k + " Key: " + Value + " Value: " + Value2);
             }
             if (_dicString[k].ContainsKey(Value))
             {
                 Debug.LogError("ERROR, Duplicate string key: " + Value + " at row: " + j + " Col: " + k + " Key: " + Value + " Value: " + Value2);
             }
             else
             {
                 Value2 = Value2.Replace("\\0", "\n");
                 _dicString[k].Add(Value, Value2);
                 if (displayReadString)
                 {
                     Debug.Log(" Key: " + Value + " Val: " + Value2);
                 }
             }
         }
     }
 }