예제 #1
0
파일: CSVar.cs 프로젝트: ikvm/test
        public override object calculate()
        {
            CellExt current = null;

            if (this.cellExt_0 == null)
            {
                return(null);
            }
            CellExt1 cellSet = this.cellExt_0.CellSet;

            if (!this.bool_0)
            {
                current = cellSet.Current;
            }
            else
            {
                current = cellSet.SavedCurrent;
            }
            CellExt source = this.cellExt_0.getCommonLeftHead(current.Source);

            this.cellExt_1 = current.getLeftHead(source);
            CellExt ext4 = this.cellExt_0.getCommonTopHead(current.Source);

            this.cellExt_2 = current.getTopHead(ext4);
            return(this);
        }
예제 #2
0
        private string method_0(CellExt cellExt_1, Queue queue_0)
        {
            CellExt ext  = null;
            string  str  = "";
            CellExt ext2 = this.cellExt_0.CellSet.getCell(0, 0);

            for (int i = 0; i < queue_0.size(); i++)
            {
                if (queue_0.peek(i) == cellExt_1)
                {
                    return(str);
                }
            }
            queue_0.put(cellExt_1);
            if ((cellExt_1 != null) && ((cellExt_1.Row != 0) || (cellExt_1.Col != 0)))
            {
                if (cellExt_1.ExpMap.Exp != null)
                {
                    str = str.ToString() + this.method_1(cellExt_1.ExpMap.Exp.Home, queue_0);
                }
                ext = cellExt_1.getLeftHead();
                if ((ext != null) && (ext != ext2))
                {
                    str = (str.ToString() + (ext.SourceId.ToString().ToString() + "-").ToString()).ToString() + this.method_0(ext, queue_0).ToString();
                }
                ext = cellExt_1.getTopHead();
                if ((ext != null) && (ext != ext2))
                {
                    str = (str.ToString() + (ext.SourceId.ToString().ToString() + "-").ToString()).ToString() + this.method_0(ext, queue_0).ToString();
                }
            }
            return(str);
        }
예제 #3
0
파일: CellExt1.cs 프로젝트: ikvm/test
        internal virtual void vmethod_5(CellExt cellExt_2)
        {
            Console.Out.Write(cellExt_2.Id.ToString().ToString() + ": ");
            Console.Out.Write(new StringBuilder("Src=").Append(cellExt_2.SourceId).Append(", ").ToString().ToString());
            CellExt ext = cellExt_2.getLeftHead();

            Console.Out.Write(new StringBuilder("LeftHead=").Append((ext == null) ? "" : ext.Id).Append(", ").ToString().ToString());
            ext = cellExt_2.getTopHead();
            Console.Out.Write(new StringBuilder("TopHead=").Append((ext == null) ? "" : ext.Id).Append(", ").ToString().ToString());
            Console.Out.Write(new StringBuilder("Exp=").Append((cellExt_2.ExpMap == null) ? "" : cellExt_2.ExpMap.ExpStr).Append(", ").ToString().ToString());
            CellExt[] extCells = cellExt_2.ExtCells;
            Console.Out.Write("Ext=(");
            if (extCells != null)
            {
                for (int i = 0; i < extCells.Length; i++)
                {
                    Console.Out.Write(extCells[i].Id);
                    if (i != (extCells.Length - 1))
                    {
                        Console.Out.Write(",");
                    }
                }
            }
            Console.Out.WriteLine(")");
        }
예제 #4
0
파일: CellExt1.cs 프로젝트: ikvm/test
        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);
                    }
                }
            }
        }
예제 #5
0
파일: CellExt1.cs 프로젝트: ikvm/test
        private CellExt method_3(CellExt cellExt_2)
        {
            string cellId = (string)cellExt_2.getPropValue(453);

            if (cellId != null)
            {
                cellId = cellId.Trim();
                if (cellId.Length > 0)
                {
                    CellExt ext4 = getSource(cellId);
                    if (ext4 != null)
                    {
                        return(ext4);
                    }
                }
            }
            for (int i = cellExt_2.Row - 1; i >= 1; i--)
            {
                CellExt other = getCell(i, cellExt_2.Col);
                if (other != null)
                {
                    if ((cellExt_2.sameRowTypeAs(other) && other.containCol(cellExt_2)) && PropertyDefine.CEX_HORIZONTAL.Equals(other.Extensible))
                    {
                        if (!cellExt_2.isTopHeadOf(other))
                        {
                            return(other);
                        }
                    }
                    else if (cellExt_2.sameRowTypeAs(other))
                    {
                        CellExt sub = other.getTopHead();
                        if ((sub != null) && !cellExt_2.isTopHeadOf(sub))
                        {
                            return(sub);
                        }
                    }
                }
            }
            return(getCell(0, 0));
        }
예제 #6
0
파일: InputExp.cs 프로젝트: ikvm/test
        private int method_2(CellExt cellExt_0, Class7 class7_0)
        {
            CellExt ext2;
            CellExt ext = this.cellExt1_0.getCell(0, 0);

            string[] strArray = new string[class7_0.keyNums];
            for (ext2 = cellExt_0.getLeftHead(); ext2 != null; ext2 = ext2.getLeftHead())
            {
                if (ext2 == ext)
                {
                    break;
                }
                this.method_4(cellExt_0, class7_0, strArray, ext2);
            }
            for (ext2 = cellExt_0.getTopHead(); ext2 != null; ext2 = ext2.getTopHead())
            {
                if (ext2 == ext)
                {
                    break;
                }
                this.method_4(cellExt_0, class7_0, strArray, ext2);
            }
            string str   = this.method_3(strArray);
            int    index = class7_0.listKeyValues.IndexOf(str);

            if (index >= 0)
            {
                return(index);
            }
            class7_0.listKeyValues.Add(str);
            string[] strArray2 = new string[class7_0.cols];
            for (int i = 0; i < strArray.Length; i++)
            {
                strArray2[Convert.ToInt32(class7_0.keyCol[i])] = strArray[i];
            }
            class7_0.records.Add(strArray2);
            return(class7_0.records.Count - 1);
        }
예제 #7
0
파일: CellExt1.cs 프로젝트: ikvm/test
        public virtual void extendRow(CellExt cell, int count)
        {
            int num  = getBeginRow(cell);
            int num2 = getEndRow(cell);
            int num3 = num2 - num;

            CellExt[] extArray = new CellExt[count];
            extArray[0]   = cell;
            cell.ExtCells = extArray;
            vmethod_0(num2, num3 * (count - 1));
            for (int i = num; i < num2; i++)
            {
                CellExt ext7 = getCell(i, 0);
                if (ext7 != null)
                {
                    for (int m = 1; m < count; m++)
                    {
                        vmethod_3(i + (num3 * m), 0, (CellExt)ext7.Clone());
                    }
                }
            }
            cell.expandLeftHead(num3 * (count - 1));
            for (int j = num; j < num2; j++)
            {
                for (int n = 1; n < ColSize; n++)
                {
                    CellExt sub = getCell(j, n);
                    if ((sub != null) && cell.isLeftHeadOf(sub))
                    {
                        for (int num10 = 1; num10 < count; num10++)
                        {
                            CellExt ext6 = (CellExt)sub.Clone();
                            vmethod_3(j + (num10 * num3), n, ext6);
                            if (sub != cell)
                            {
                                cellList.put(ext6);
                            }
                            else
                            {
                                extArray[num10] = ext6;
                                ext6.ExtCells   = extArray;
                            }
                        }
                    }
                }
            }
            for (int k = num; k < num2; k++)
            {
                for (int num6 = 1; num6 < ColSize; num6++)
                {
                    CellExt ext = getCell(k, num6);
                    if ((ext != null) && cell.isLeftHeadOf(ext))
                    {
                        CellExt ext3 = ext.getLeftHead();
                        for (int num7 = 1; num7 < count; num7++)
                        {
                            CellExt ext2 = getCell(k + (num3 * num7), num6);
                            if (ext != cell)
                            {
                                CellExt head = getCell(ext3.Row + (num3 * num7), ext3.Col);
                                ext2.setLeftHead(head);
                            }
                            if (ext.getTopHead() != getCell(0, 0))
                            {
                                ext2.setTopHead(ext.getTopHead());
                            }
                        }
                    }
                }
            }
        }
예제 #8
0
파일: CellExt1.cs 프로젝트: ikvm/test
        public virtual void extendCol(CellExt cell, int count)
        {
            if (!method_5(cell.Row))
            {
                throw new ReportError("非数据区单元格不能横向扩展");
            }
            int num8 = getBeginCol(cell);
            int num3 = getEndCol(cell);
            int num5 = num3 - num8;

            CellExt[] extArray = new CellExt[count];
            extArray[0]   = cell;
            cell.ExtCells = extArray;
            vmethod_1(num3, num5 * (count - 1));
            for (int i = num8; i < num3; i++)
            {
                CellExt ext7 = getCell(0, i);
                if (ext7 != null)
                {
                    for (int m = 1; m < count; m++)
                    {
                        vmethod_3(0, i + (m * num5), (CellExt)ext7.Clone());
                    }
                }
            }
            cell.expandTopHead(num5 * (count - 1));
            for (int j = num8; j < num3; j++)
            {
                for (int n = 1; n < RowSize; n++)
                {
                    CellExt sub = getCell(n, j);
                    if ((sub != null) && cell.isTopHeadOf(sub))
                    {
                        for (int num9 = 1; num9 < count; num9++)
                        {
                            CellExt ext6 = (CellExt)sub.Clone();
                            vmethod_3(n, j + (num9 * num5), ext6);
                            if (sub == cell)
                            {
                                extArray[num9] = ext6;
                                ext6.ExtCells  = extArray;
                            }
                            else
                            {
                                cellList.put(ext6);
                            }
                        }
                    }
                }
            }
            for (int k = num8; k < num3; k++)
            {
                for (int num = 1; num < RowSize; num++)
                {
                    CellExt ext = getCell(num, k);
                    if ((ext != null) && cell.isTopHeadOf(ext))
                    {
                        CellExt ext3 = ext.getTopHead();
                        for (int num4 = 1; num4 < count; num4++)
                        {
                            CellExt ext2 = getCell(num, k + (num5 * num4));
                            if (ext != cell)
                            {
                                CellExt head = getCell(ext3.Row, ext3.Col + (num5 * num4));
                                ext2.setTopHead(head);
                            }
                            if (ext.getLeftHead() != getCell(0, 0))
                            {
                                ext2.setLeftHead(ext.getLeftHead());
                            }
                        }
                    }
                }
            }
        }
예제 #9
0
파일: InputExp.cs 프로젝트: ikvm/test
        public virtual void calculate()
        {
            this.method_1();
            StringBuilder builder  = new StringBuilder("<root>");
            StringBuilder builder2 = new StringBuilder("<hide>");
            CellExt       ext      = this.cellExt1_0.getCell(0, 0);

            for (int i = 0; i < this.cellExt1_0.RowSize; i++)
            {
                for (int j = 0; j < this.cellExt1_0.ColSize; j++)
                {
                    CellExt ext2 = this.cellExt1_0.getCell(i, j);
                    if ((ext2 != null) && !this.cellExt1_0.isMerged(i, j))
                    {
                        string str = this.method_6(ext2, 611);
                        if (str != null)
                        {
                            int    num7   = -1;
                            Class7 class3 = null;
                            string str3   = this.method_6(ext2, 615);
                            if (str3 != null)
                            {
                                num7   = Convert.ToInt32(str3);
                                class3 = this.method_0(this.method_6(ext2, 613));
                                if ((num7 != PropertyDefine.IN_EXT_TYPE_ATTACHED) && (num7 != PropertyDefine.IN_EXT_TYPE_FIXED))
                                {
                                    if (PropertyDefine.CEX_VERTICAL.Equals(ext2.Extensible) && (class3.startRow == -1))
                                    {
                                        class3.startRow = i;
                                    }
                                }
                                else
                                {
                                    string[] strArray2;
                                    if (num7 != PropertyDefine.IN_EXT_TYPE_FIXED)
                                    {
                                        int num9 = this.method_2(ext2, class3);
                                        strArray2 = (string[])class3.records[num9];
                                        if ((ext2.getLeftHead() != ext) && (ext2.getTopHead() != ext))
                                        {
                                            ext2.setPropResult(616, num9);
                                            class3.isCross = true;
                                        }
                                    }
                                    else
                                    {
                                        if (class3.records.Count == 0)
                                        {
                                            string[] strArray3 = new string[class3.cols];
                                            class3.records.Add(strArray3);
                                        }
                                        strArray2 = (string[])class3.records[0];
                                    }
                                    strArray2[Convert.ToInt32(this.method_6(ext2, 614))] = Convert.ToString(ext2.GetValue(false));
                                }
                            }
                            if ((num7 != PropertyDefine.IN_EXT_TYPE_ATTACHED) && (num7 != PropertyDefine.IN_EXT_TYPE_EXTEND))
                            {
                                builder2.Append("<" + str + ">");
                                string str2 = "1";
                                if (this.method_6(ext2, 612) != null)
                                {
                                    str2 = "0";
                                }
                                builder2.Append(str2);
                                builder2.Append("</" + str + ">");
                            }
                            else if ((this.method_6(ext2, 612) == null) && !class3.moveConts.Contains(str))
                            {
                                class3.moveConts.Add(str);
                            }
                        }
                    }
                }
            }
            builder2.Append("</hide>");
            builder.Append(builder2);
            StringBuilder builder3 = new StringBuilder("<conts>");

            if (this.arrayList_0 != null)
            {
                builder.Append("<dss>");
                for (int k = 0; k < this.arrayList_0.Count; k++)
                {
                    Class7 class2 = (Class7)this.arrayList_0[k];
                    builder.Append("<" + class2.id + ">");
                    for (int m = 0; m < class2.records.Count; m++)
                    {
                        builder.Append("<tr>");
                        string[] strArray = (string[])class2.records[m];
                        for (int num5 = 0; num5 < strArray.Length; num5++)
                        {
                            builder.Append("<td>");
                            builder.Append(StringUtils.repXml(strArray[num5]));
                            builder.Append("</td>");
                        }
                        builder.Append("</tr>");
                    }
                    builder.Append("</" + class2.id + ">");
                    builder3.Append("<" + class2.id + ">");
                    builder3.Append("<startRow>");
                    if (!class2.isCross && (class2.startRow != -1))
                    {
                        builder3.Append(Convert.ToString(class2.startRow - 1));
                    }
                    builder3.Append("</startRow>");
                    builder3.Append("<contsId>");
                    for (int n = 0; n < class2.moveConts.Count; n++)
                    {
                        builder3.Append((string)class2.moveConts[n]);
                        if (n < (class2.moveConts.Count - 1))
                        {
                            builder3.Append(",");
                        }
                    }
                    builder3.Append("</contsId>");
                    builder3.Append("</" + class2.id + ">");
                }
                builder.Append("</dss>");
            }
            builder3.Append("</conts>");
            builder.Append(builder3);
            builder.Append("</root>");
            ext.setPropValue(601, builder.ToString());
        }