Ejemplo n.º 1
0
        /// <summary>
        /// RptItem 增加行或列时判断是否与其他对象相交
        /// </summary>
        /// <param name="p_rowIncrease"></param>
        /// <param name="p_colIncrease"></param>
        /// <returns></returns>
        public bool TestIncIntersect(int p_rowIncrease, int p_colIncrease = 0)
        {
            var range = new Dt.Cells.Data.CellRange(Row, Col, RowSpan, ColSpan);

            range = new Dt.Cells.Data.CellRange(range.Row, range.Column, range.RowCount + p_rowIncrease, range.Column + p_colIncrease);
            return(ValidEmptyRange(Part, range, this));
        }
Ejemplo n.º 2
0
 internal ClipboardPastedEventArgs(Dt.Cells.Data.Worksheet sourceSheet, Dt.Cells.Data.CellRange sourceRange, Dt.Cells.Data.Worksheet worksheet, Dt.Cells.Data.CellRange cellRange, ClipboardPasteOptions pasteOption)
 {
     SourceSheet = sourceSheet;
     SourceRange = sourceRange;
     Worksheet   = worksheet;
     CellRange   = cellRange;
     PasteOption = pasteOption;
 }
Ejemplo n.º 3
0
 internal ClipboardPastingEventArgs(Dt.Cells.Data.Worksheet sourceSheet, Dt.Cells.Data.CellRange sourceRange, Dt.Cells.Data.Worksheet worksheet, Dt.Cells.Data.CellRange cellRange, ClipboardPasteOptions pasteOption, bool isCutting)
 {
     Worksheet   = worksheet;
     CellRange   = cellRange;
     SourceSheet = sourceSheet;
     SourceRange = sourceRange;
     PasteOption = pasteOption;
     IsCutting   = isCutting;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 判定某区域是否有控件 或 是否有指定对象之外的控件
        /// </summary>
        /// <param name="p_part"></param>
        /// <param name="p_range"></param>
        /// <param name="p_item"></param>
        /// <returns></returns>
        public static bool ValidEmptyRange(RptPart p_part, Dt.Cells.Data.CellRange p_range, RptItem p_item = null)
        {
            if (p_part == null || p_range == null)
            {
                return(false);
            }

            if (p_item == null)
            {
                return((from item in (IEnumerable <RptItem>)p_part.Items
                        where p_range.Intersects(item.Row, item.Col, item.RowSpan, item.ColSpan)
                        select item).Any());
            }
            else
            {
                return((from item in (IEnumerable <RptItem>)p_part.Items
                        where p_item != item && p_range.Intersects(item.Row, item.Col, item.RowSpan, item.ColSpan)
                        select item).Any());
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        ///  RptItem 移动时判断是否与其他对象相交
        /// </summary>
        /// <param name="p_moveRow"></param>
        /// <param name="p_moveCol"></param>
        /// <returns></returns>
        public bool TestMovIntersect(int p_moveRow, int p_moveCol)
        {
            var range = new Dt.Cells.Data.CellRange(p_moveRow, p_moveCol, RowSpan, ColSpan);

            return(ValidEmptyRange(Part, range, this));
        }
Ejemplo n.º 6
0
 internal ClipboardPastingEventArgs(Dt.Cells.Data.Worksheet sourceSheet, Dt.Cells.Data.CellRange sourceRange, Dt.Cells.Data.Worksheet worksheet, Dt.Cells.Data.CellRange cellRange, ClipboardPasteOptions pasteOption, bool isCutting, bool cancel) : this(sourceSheet, sourceRange, worksheet, cellRange, pasteOption, isCutting)
 {
     base.Cancel = cancel;
 }