Пример #1
0
        private void prepareCalculate()
        {
            cellList.clear();
            cellIdMap.Clear();
            for (int i = 0; i < RowSize; i++)
            {
                for (int k = 0; k < ColSize; k++)
                {
                    CellExt o = getCell(i, k);
                    if (!isMerged(i, k))
                    {
                        object obj2 = o;
                        cellIdMap[getId(i, k)] = obj2;
                        if (o != null)
                        {
                            cellList.put(o);
                        }
                    }
                }
            }
            for (int j = 0; j < RowSize; j++)
            {
                for (int m = 0; m < ColSize; m++)
                {
                    if ((j != 0) || (m != 0))
                    {
                        CellExt ext3 = getCell(j, m);
                        if ((ext3 != null) && !isMerged(j, m))
                        {
                            ext3.setLeftHead(method_2(ext3));
                            ext3.setTopHead(method_3(ext3));
                            ext3.prepareCalculate();
                        }
                    }
                }
            }
            CellExt   ext2     = getCell(0, 0);
            ArrayList subCells = ext2.SubCells;

            if (subCells != null)
            {
                subCells.Clear();
                IEnumerator enumerator = cellIdMap.Values.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    CellExt ext = (CellExt)enumerator.Current;
                    if (((ext != null) && (ext.getLeftHead() == ext2)) && (ext.getTopHead() == ext2))
                    {
                        subCells.Add(ext);
                    }
                }
            }
        }