예제 #1
0
파일: TableEx.cs 프로젝트: zanderzhg/Sc
        public PointF TransToGlobalPoint(PointF pt)
        {
            RectangleF rect;
            float      x = pt.X, y = pt.Y;
            CellCoord  inCellCoord = inParentCellCoord;

            x += tbPos.X;
            y += tbPos.Y;

            for (TableEx tb = parentTable; tb != null; tb = tb.parentTable)
            {
                rect        = tb.GetCellContentRect(inCellCoord.rowIdx, inCellCoord.colIdx);
                x          += rect.X + tb.tbPos.X;
                y          += rect.Y + tb.tbPos.Y;
                inCellCoord = tb.inParentCellCoord;
            }

            return(new PointF(x, y));
        }
예제 #2
0
파일: TableEx.cs 프로젝트: zanderzhg/Sc
        public RectangleF TransToGlobalRect(RectangleF rect)
        {
            RectangleF r;
            CellCoord  inCellCoord = inParentCellCoord;
            float      x = rect.X, y = rect.Y;

            x += tbPos.X;
            y += tbPos.Y;

            for (TableEx tb = parentTable; tb != null; tb = tb.parentTable)
            {
                r           = tb.GetCellContentRect(inCellCoord.rowIdx, inCellCoord.colIdx);
                x          += r.X + tb.tbPos.X;
                y          += r.Y + tb.tbPos.Y;
                inCellCoord = tb.inParentCellCoord;
            }

            RectangleF dstRect = new RectangleF(x, y, rect.Width, rect.Height);

            return(dstRect);
        }
예제 #3
0
파일: TableEx.cs 프로젝트: zanderzhg/Sc
        public void AddCellChildTable(int rowIdx, int colIdx, TableEx childTable)
        {
            CellValueInfo cellValueInfo;

            cellValueInfo       = new CellValueInfo();
            cellValueInfo.type  = CellValueType.Table;
            cellValueInfo.value = childTable;

            string key = GetRowColKey(rowIdx, colIdx);

            if (cellValueInfoDict.ContainsKey(key) == false)
            {
                cellValueInfoDict.Add(key, cellValueInfo);
            }
            else
            {
                cellValueInfoDict[key] = cellValueInfo;
            }

            childTable.parentTable       = this;
            childTable.inParentCellCoord = new CellCoord(rowIdx, colIdx);
        }
예제 #4
0
 public void SetTable(TableEx table)
 {
     rootTable = table;
 }