예제 #1
0
파일: TableEx.cs 프로젝트: zanderzhg/Sc
        public LinePos[] GetRectLinePos(int startRowIdx, int startColIdx, int endRowIdx, int endColIdx)
        {
            RectangleF rect = GetRect(startRowIdx, startColIdx, endRowIdx, endColIdx);

            LinePos[] linePosList = new LinePos[4];

            //
            LinePos linePos = new LinePos();

            linePos.start  = new PointF(rect.Left, rect.Top);
            linePos.end    = new PointF(rect.Left, rect.Bottom);
            linePosList[0] = linePos;

            //
            linePos        = new LinePos();
            linePos.start  = new PointF(rect.Left, rect.Top);
            linePos.end    = new PointF(rect.Right, rect.Top);
            linePosList[1] = linePos;

            //
            linePos        = new LinePos();
            linePos.start  = new PointF(rect.Right, rect.Top);
            linePos.end    = new PointF(rect.Right, rect.Bottom);
            linePosList[2] = linePos;


            //
            linePos        = new LinePos();
            linePos.start  = new PointF(rect.Left, rect.Bottom);
            linePos.end    = new PointF(rect.Right, rect.Bottom);
            linePosList[3] = linePos;

            return(linePosList);
        }
예제 #2
0
        public LinePos GetColContentLinePos(int colIdx)
        {
            RectangleF rect = GetCellContentRect(0, colIdx);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Right, rect.Top);
            PointF  end     = new PointF(rect.Right, rect.Bottom);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
예제 #3
0
        public LinePos GetColLinePos(int colIdx)
        {
            RectangleF rect = GetCellRect(0, colIdx);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Right, rect.Top);
            PointF  end     = new PointF(rect.Right, rect.Top + tbHeight);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
예제 #4
0
        public LinePos GetRowLinePos(int rowIdx)
        {
            RectangleF rect = GetCellRect(rowIdx, 0);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Left, rect.Bottom);
            PointF  end     = new PointF(rect.Left + tbWidth, rect.Bottom);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
예제 #5
0
        public LinePos GetRowContentLinePos(int rowIdx)
        {
            CellCoord  cellCoord = new CellCoord(rowIdx, 0);
            RectangleF rect      = GetCellContentRect(cellCoord);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Left, rect.Bottom);
            PointF  end     = new PointF(rect.Right, rect.Bottom);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
예제 #6
0
파일: TableEx.cs 프로젝트: zanderzhg/Sc
        public LinePos GetColLinePos(int colIdx, DirectionMode dir = DirectionMode.BOTTOM_OR_RIGHT)
        {
            RectangleF rect = GetOriginalCellRect(0, colIdx);

            LinePos linePos = new LinePos();
            PointF  start, end;

            if (dir == DirectionMode.UP_OR_LEFT)
            {
                start = new PointF(rect.Left, rect.Top);
                end   = new PointF(rect.Left, rect.Top + tbHeight);
            }
            else
            {
                start = new PointF(rect.Right, rect.Top);
                end   = new PointF(rect.Right, rect.Top + tbHeight);
            }

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
예제 #7
0
파일: TableEx.cs 프로젝트: zanderzhg/Sc
        public LinePos GetRowLinePos(int rowIdx, DirectionMode dir = DirectionMode.BOTTOM_OR_RIGHT)
        {
            RectangleF rect = GetOriginalCellRect(rowIdx, 0);

            LinePos linePos = new LinePos();
            PointF  start, end;

            if (dir == DirectionMode.UP_OR_LEFT)
            {
                start = new PointF(rect.Left, rect.Top);
                end   = new PointF(rect.Left + tbWidth, rect.Top);
            }
            else
            {
                start = new PointF(rect.Left, rect.Bottom);
                end   = new PointF(rect.Left + tbWidth, rect.Bottom);
            }

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }