Example #1
0
 private void ParsingData(DataIdx target, string origin)
 {
     if (DataIdx.WLev != target)
     {
         int tempI = -1;
         if (int.TryParse(origin, out tempI))
         {
             dict_var[target] = tempI;
         }
         else
         {
             throw new System.ArgumentException("Impossible parsing Data");
         }
     }
     else if (DataIdx.WLev == target)
     {
         float tempD = -1;
         if (float.TryParse(origin, out tempD))
         {
             dict_var[target] = tempD;
         }
         else
         {
             throw new System.ArgumentException("Impossible parsing Data");
         }
     }
 }
Example #2
0
 private void ParsingData(DataIdx target, string origin)
 {
     if (DataIdx.WLev != target)
     {
         int tempI = -1;
         int.TryParse(origin, out tempI);
         dict_var[target] = tempI;
     }
     else if (DataIdx.WLev == target)
     {
         float tempD = -1;
         float.TryParse(origin, out tempD);
         dict_var[target] = tempD;
     }
 }