public List <ExcelData.Param> Get( ExcelData.Specify start, ExcelData.Specify end, string find) { List <ExcelData.Param> objList1 = new List <ExcelData.Param>(); List <ExcelData.Param> objList2 = this.Get(start, end); foreach (ExcelData.Param obj1 in objList2) { foreach (string str1 in obj1.list) { if (find == str1) { ExcelData.Param obj2 = new ExcelData.Param(); obj2.list = new List <string>(); foreach (string str2 in obj1.list) { obj2.list.Add(str2); } objList2.Add(obj2); break; } } } return(objList2); }
public List <ExcelData.Param> FindArea(string find, ExcelData.Specify spe) { List <ExcelData.Param> objList = new List <ExcelData.Param>(); int num1 = 0; int num2 = 0; for (int index1 = 0; index1 < this.list.Count; ++index1) { for (int index2 = 0; index2 < this.list[index1].list.Count; ++index2) { if (find == this.list[index1].list[index2]) { num1 = index1 + 1; num2 = index2; break; } } } for (int index1 = num1; index1 < this.list.Count && index1 < num1 + spe.cell; ++index1) { ExcelData.Param obj = new ExcelData.Param(); for (int index2 = num2; index2 < this.list[index1].list.Count && index2 < num2 + spe.row; ++index2) { obj.list = new List <string>(); obj.list.Add(this.list[index1].list[index2]); objList.Add(obj); } } return(objList); }
public List <ExcelData.Param> Get(ExcelData.Specify start, ExcelData.Specify end) { List <ExcelData.Param> objList = new List <ExcelData.Param>(); if ((long)(uint)start.cell > (long)end.cell || (long)(uint)start.row > (long)end.row || start.cell >= this.list.Count) { return(objList); } for (int cell = start.cell; cell < this.list.Count && cell <= end.cell; ++cell) { ExcelData.Param obj = new ExcelData.Param(); if (start.row < this.list[cell].list.Count) { obj.list = new List <string>(); for (int row = start.row; row < this.list[cell].list.Count && row <= end.row; ++row) { obj.list.Add(this.list[cell].list[row]); } } objList.Add(obj); } return(objList); }
public static List <ExcelData.Param> LoadExcelData( string _strAssetPath, string _strFileName, int sCell, int sRow, int eCell, int eRow, bool _isWarning = true) { if (!GlobalMethod.AssetFileExist(_strAssetPath, _strFileName, string.Empty)) { if (_isWarning) { GlobalMethod.DebugLog("excel : [" + _strAssetPath + "][" + _strFileName + "]は見つかりません", 1); } return((List <ExcelData.Param>)null); } AssetBundleLoadAssetOperation loadAssetOperation = AssetBundleManager.LoadAsset(_strAssetPath, _strFileName, typeof(ExcelData), (string)null); AssetBundleManager.UnloadAssetBundle(_strAssetPath, true, (string)null, false); if (loadAssetOperation.IsEmpty()) { if (_isWarning) { GlobalMethod.DebugLog("excel : [" + _strFileName + "]は[" + _strAssetPath + "]の中に入っていません", 1); } return((List <ExcelData.Param>)null); } GlobalMethod.excelData = loadAssetOperation.GetAsset <ExcelData>(); GlobalMethod.cell.Clear(); foreach (ExcelData.Param obj in GlobalMethod.excelData.list) { GlobalMethod.cell.Add(obj.list[sCell]); } GlobalMethod.row.Clear(); foreach (string str in GlobalMethod.excelData.list[sRow].list) { GlobalMethod.row.Add(str); } List <string> cell1 = GlobalMethod.cell; List <string> row1 = GlobalMethod.row; ExcelData.Specify specify1 = new ExcelData.Specify(eCell, eRow); ExcelData.Specify specify2 = new ExcelData.Specify(cell1.Count, row1.Count); GlobalMethod.excelParams.Clear(); if ((long)(uint)specify1.cell > (long)specify2.cell || (long)(uint)specify1.row > (long)specify2.row) { return((List <ExcelData.Param>)null); } if (specify1.cell < GlobalMethod.excelData.list.Count) { for (int cell2 = specify1.cell; cell2 < GlobalMethod.excelData.list.Count && cell2 <= specify2.cell; ++cell2) { ExcelData.Param obj = new ExcelData.Param(); if (specify1.row < GlobalMethod.excelData.list[cell2].list.Count) { obj.list = new List <string>(); for (int row2 = specify1.row; row2 < GlobalMethod.excelData.list[cell2].list.Count && row2 <= specify2.row; ++row2) { obj.list.Add(GlobalMethod.excelData.list[cell2].list[row2]); } } GlobalMethod.excelParams.Add(obj); } } return(GlobalMethod.excelParams); }
public string Get(ExcelData.Specify specify) { return(this.Get(specify.cell, specify.row)); }