Exemple #1
0
        private ArrayList getListValue(object obj, CellExt leftHead, CellExt topHead, bool dispValue)
        {
            ArrayList o = null;

            if (obj is ArrayList)
            {
                o = (ArrayList)obj;
            }
            else if (obj is CSVar)
            {
                CSVar   var    = (CSVar)obj;
                CellExt source = var.Source;
                CellExt ext2   = var.LeftHead;
                CellExt ext3   = var.TopHead;
                CellExt ext4   = ext2.Source;
                CellExt ext5   = ext3.Source;
                if (((leftHead == null) || !ext4.isLeftHeadOf(leftHead.Source)) || !leftHead.Source.isLeftHeadOf(source))
                {
                    leftHead = ext2;
                }
                if (((topHead == null) || !ext5.isTopHeadOf(topHead.Source)) || !topHead.Source.isTopHeadOf(source))
                {
                    topHead = ext3;
                }
                o = var.getCells(leftHead, topHead, null);
            }
            else
            {
                o = new ArrayList(1);
                o.Add(obj);
            }
            return((ArrayList)ConvertTool.getValue(o, dispValue));
        }
Exemple #2
0
        private object method_0(CellExt cellExt_0)
        {
            CellExt current = base.cs.Current;
            CellExt source  = cellExt_0.Source;
            CellExt sub     = current.Source;

            if (!source.isLeftHeadOf(sub))
            {
                if (source.isTopHeadOf(sub))
                {
                    CellExt[] extCells = current.getTopHead(source).ExtCells;
                    if (extCells == null)
                    {
                        return(null);
                    }
                    for (int i = 0; i < extCells.Length; i++)
                    {
                        if (extCells[i].isTopHeadOf(current))
                        {
                            return(ConvertData.getInteger(i + 1));
                        }
                    }
                }
            }
            else
            {
                CellExt[] extArray2 = current.getLeftHead(source).ExtCells;
                if (extArray2 == null)
                {
                    return(null);
                }
                for (int j = 0; j < extArray2.Length; j++)
                {
                    if (extArray2[j].isLeftHeadOf(current))
                    {
                        return(ConvertData.getInteger(j + 1));
                    }
                }
            }
            throw new ReportError(new StringBuilder(source.SourceId.ToString().ToString()).Append("不是").Append(current.SourceId).Append("的主格").ToString().ToString());
        }