private object method_0(CellExt cellExt_0, int int_3, int int_4) { CellExt current = base.cs.Current; if ((current.Col == 10) && (current.Row == 18)) { Console.Out.WriteLine("current row: " + current.Row.ToString().ToString()); } CellExt source = cellExt_0.getCommonLeftHead(current.Source); CellExt ext2 = current.getLeftHead(source); if (ext2 == current) { ext2 = current.getLeftHead(); } CellExt ext4 = cellExt_0.getCommonTopHead(current.Source); CellExt ext3 = current.getTopHead(ext4); if (ext3 == current) { ext3 = current.getTopHead(); } try { if (int_3 != 0) { ext2 = this.method_1(ext2, ext2.Source, int_3); if (ext2 == null) { return(null); } } if (int_4 != 0) { ext3 = this.method_4(ext3, ext3.Source, int_4); if (ext3 == null) { return(null); } } } catch (StackOverflowException exception) { Console.Out.WriteLine(new StringBuilder("current: ").Append(current.Row).Append(", ").Append(current.Col).ToString().ToString()); throw exception; } ext2.testValue(); ext3.testValue(); return(new CSVar(cellExt_0, ext2, ext3)); }
public override object calculate() { if (base.paramList.Count > 0) { throw new ReportError("col函数参数列表应该为空"); } CellExt current = base.cs.Current; ArrayList subCells = current.getTopHead().SubCells; for (int i = 0; i < subCells.Count; i++) { CellExt ext = (CellExt)subCells[i]; if (ext != current) { ext.testValue(); } } return(ConvertData.getInteger(base.cs.Current.Col)); }
public override object calculate() { if (base.unit_0 == null) { throw new ReportError("位移函数[]左操作数为空"); } object obj3 = base.unit_0.calculate(); if (!(obj3 is CSVar)) { throw new ReportError("位移函数[]左操作数应为单元格"); } CSVar var = (CSVar)obj3; CellExt source = var.Source; if (!this.bool_0) { int num6 = this.arrayList_0.Count; int num2 = this.arrayList_1.Count; CellExt current = base.cs.Current; CellExt leftHead = current.getLeftHead(); CellExt topHead = current.getTopHead(); for (int i = 0; i < num6; i++) { GClass1 class3 = (GClass1)this.arrayList_0[i]; int index = 0; if (class3.source == null) { if (source.ExtCells != null) { class3.source = source; } else { class3.source = source.getLeftHead(); } } CellExt ext6 = current.getLeftHead(class3.source); switch (class3.type) { case 0: index = class3.position; break; case 1: if (ext6 == null) { throw new ReportError("位移对象超出范围"); } index = ext6.Position + class3.position; break; case 2: if (ext6 == null) { throw new ReportError("位移对象超出范围"); } index = ext6.Position; break; } if (class3.source.isLeftHeadOf(leftHead.Source)) { leftHead = leftHead.getLeftHead(class3.source); } else { leftHead = leftHead.getSubCell(class3.source); } if (leftHead == null) { return(null); } leftHead.testValue(); leftHead = leftHead.getExtCell(index); if (leftHead == null) { return(null); } } for (int j = 0; j < num2; j++) { GClass1 class2 = (GClass1)this.arrayList_1[j]; int position = 0; if (class2.source == null) { if (source.ExtCells == null) { class2.source = source.getTopHead(); } else { class2.source = source; } } CellExt ext4 = current.getTopHead(class2.source); switch (class2.type) { case 0: position = class2.position; break; case 1: if (ext4 == null) { throw new ReportError("位移对象超出范围"); } position = ext4.Position + class2.position; break; case 2: if (ext4 == null) { throw new ReportError("位移对象超出范围"); } position = ext4.Position; break; } if (class2.source.isTopHeadOf(topHead.Source)) { topHead = topHead.getTopHead(class2.source); } else { topHead = topHead.getSubCell(class2.source); } if (topHead == null) { return(null); } topHead.testValue(); topHead = topHead.getExtCell(position); if (topHead == null) { return(null); } } return(new CSVar(source, leftHead, topHead)); } return(this.method_0(source, this.int_1, this.int_2)); }