Example #1
0
File: CSVar.cs Project: ikvm/test
        public virtual ArrayList getCells(CellExt leftHead, CellExt topHead, ArrayList list)
        {
            int num3;
            int num4;

            if (list == null)
            {
                list = new ArrayList();
            }
            if (leftHead.Source == this.cellExt_0)
            {
                list.Add(leftHead);
                return(list);
            }
            if (topHead.Source == this.cellExt_0)
            {
                list.Add(topHead);
                return(list);
            }
            if (leftHead.Source.isDirectLeftHeadOf(this.cellExt_0))
            {
                int subSize = leftHead.SubSize;
                for (int i = 0; i < subSize; i++)
                {
                    CellExt ext7 = leftHead.getSubCell(i);
                    if (ext7.Source == this.cellExt_0)
                    {
                        int num16 = ext7.extCellSize();
                        for (int j = 0; j < num16; j++)
                        {
                            CellExt sub = ext7.getExtCell(j);
                            if (topHead.isTopHeadOf(sub))
                            {
                                list.Add(sub);
                            }
                        }
                    }
                }
                return(list);
            }
            if (topHead.Source.isDirectTopHeadOf(this.cellExt_0))
            {
                int num10 = topHead.SubSize;
                for (int k = 0; k < num10; k++)
                {
                    CellExt ext6 = topHead.getSubCell(k);
                    if (ext6.Source == this.cellExt_0)
                    {
                        int num12 = ext6.extCellSize();
                        for (int m = 0; m < num12; m++)
                        {
                            CellExt ext5 = ext6.getExtCell(m);
                            if (leftHead.isLeftHeadOf(ext5))
                            {
                                list.Add(ext5);
                            }
                        }
                    }
                }
                return(list);
            }
            if (!leftHead.Source.isLeftHeadOf(this.cellExt_0) || (leftHead.Source == this.cellExt_0.getLeftHead()))
            {
                if (!topHead.Source.isTopHeadOf(this.cellExt_0))
                {
                    return(list);
                }
                if (topHead.Source == this.cellExt_0.getTopHead())
                {
                    return(list);
                }
                num4 = topHead.SubSize;
                num3 = 0;
            }
            else
            {
                int num8 = leftHead.SubSize;
                for (int n = 0; n < num8; n++)
                {
                    CellExt ext3 = leftHead.getSubCell(n);
                    if (ext3.Source.isLeftHeadOf(this.cellExt_0))
                    {
                        int num6 = ext3.extCellSize();
                        for (int num5 = 0; num5 < num6; num5++)
                        {
                            CellExt ext4 = ext3.getExtCell(num5);
                            this.getCells(ext4, topHead, list);
                        }
                        return(list);
                    }
                }
                return(list);
            }
            while (num3 < num4)
            {
                CellExt ext = topHead.getSubCell(num3);
                if (ext.Source.isTopHeadOf(this.cellExt_0))
                {
                    int num2 = ext.extCellSize();
                    for (int num = 0; num < num2; num++)
                    {
                        CellExt ext2 = ext.getExtCell(num);
                        this.getCells(leftHead, ext2, list);
                    }
                    return(list);
                }
                num3++;
            }
            return(list);
        }
Example #2
0
File: CSVar.cs Project: ikvm/test
 private CellExt method_0(CellExt cellExt_3, CellExt cellExt_4)
 {
     if (cellExt_3.Source == this.cellExt_0)
     {
         return(cellExt_3);
     }
     if (cellExt_4.Source == this.cellExt_0)
     {
         return(cellExt_4);
     }
     if (!cellExt_3.Source.isDirectLeftHeadOf(this.cellExt_0))
     {
         if (cellExt_4.Source.isDirectTopHeadOf(this.cellExt_0))
         {
             int subSize = cellExt_4.SubSize;
             for (int i = 0; i < subSize; i++)
             {
                 CellExt ext6 = cellExt_4.getSubCell(i);
                 if (ext6.Source == this.cellExt_0)
                 {
                     int num12 = ext6.extCellSize();
                     for (int j = 0; j < num12; j++)
                     {
                         CellExt sub = ext6.getExtCell(j);
                         if (cellExt_3.isLeftHeadOf(sub))
                         {
                             return(sub);
                         }
                     }
                 }
             }
         }
         else if (cellExt_3.Source.isLeftHeadOf(this.cellExt_0) && (cellExt_3.Source != this.cellExt_0.getLeftHead()))
         {
             int num6 = cellExt_3.SubSize;
             for (int k = 0; k < num6; k++)
             {
                 CellExt ext5 = cellExt_3.getSubCell(k);
                 if (ext5.Source.isLeftHeadOf(this.cellExt_0))
                 {
                     int num8 = ext5.extCellSize();
                     for (int m = 0; m < num8; m++)
                     {
                         CellExt ext4 = ext5.getExtCell(m);
                         ext4 = this.method_0(ext4, cellExt_4);
                         if (ext4 != null)
                         {
                             return(ext4);
                         }
                     }
                 }
             }
         }
         else if (cellExt_4.Source.isTopHeadOf(this.cellExt_0) && (cellExt_4.Source != this.cellExt_0.getTopHead()))
         {
             int num2 = cellExt_4.SubSize;
             for (int n = 0; n < num2; n++)
             {
                 CellExt ext3 = cellExt_4.getSubCell(n);
                 if (ext3.Source.isTopHeadOf(this.cellExt_0))
                 {
                     int num4 = ext3.extCellSize();
                     for (int num3 = 0; num3 < num4; num3++)
                     {
                         CellExt ext2 = ext3.getExtCell(num3);
                         ext2 = this.method_0(cellExt_3, ext2);
                         if (ext2 != null)
                         {
                             return(ext2);
                         }
                     }
                 }
             }
         }
     }
     else
     {
         int num14 = cellExt_3.SubSize;
         for (int num13 = 0; num13 < num14; num13++)
         {
             CellExt ext8 = cellExt_3.getSubCell(num13);
             if (ext8.Source == this.cellExt_0)
             {
                 int num16 = ext8.extCellSize();
                 for (int num15 = 0; num15 < num16; num15++)
                 {
                     CellExt ext9 = ext8.getExtCell(num15);
                     if (cellExt_4.isTopHeadOf(ext9))
                     {
                         return(ext9);
                     }
                 }
             }
         }
     }
     return(null);
 }