Ejemplo n.º 1
0
 public String this[string index]
 {
     get
     {
         if (ParamsDict.ContainsKey(index))
         {
             return(ParamsDict[index]);
         }
         else
         {
             return("");
         }
     }
 }
Ejemplo n.º 2
0
 private object[,] ReadRangeValues(string paramKey)
 {
     string[] vs = paramKey.Split('.');
     object[,] paramArray;
     if (ParamsDict.ContainsKey(paramKey))
     {
         paramArray = ParamsDict[paramKey];
     }
     else
     {
         SheetConfigModel sheetConfigModel = SheetConfigModels[vs[0]];
         if (vs.Length == 2)
         {
             var array = SheetName2ExcelSheet[vs[0]].Range[vs[1] + sheetConfigModel.StartingLine + ":" + vs[1] + sheetConfigModel.EndLine].Value[10];
             if (array as object[, ] != null)
             {
                 paramArray = array;
             }
             else
             {
                 int[] arrParam = { 1, 1 };
                 paramArray = Array.CreateInstance(typeof(object),
                                                   arrParam,
                                                   arrParam) as object[, ];
                 paramArray[1, 1] = array;
             }
         }
         else
         {
             int[] arrParam = { 1, 1 };
             paramArray = Array.CreateInstance(typeof(object),
                                               arrParam,
                                               arrParam) as object[, ];
             paramArray[1, 1] = SheetName2ExcelSheet[vs[0]].Range[vs[1] + vs[2]].Value[10];
         }
         ParamsDict[paramKey] = paramArray;
     }
     return(paramArray);
 }
Ejemplo n.º 3
0
 public bool ContainsParam(string name)
 {
     return(ParamsDict.ContainsKey(name));
 }