示例#1
0
        public HeaderPanel(Excel p_excel, SheetArea p_sheetArea)
        {
            Area            = p_sheetArea;
            Excel           = p_excel;
            CachedSpanGraph = new SpanGraph();
            CellCache       = new CellCachePool(GetDataContext());
            _rows           = new Dictionary <int, HeaderItem>();
            _recycledRows   = new List <HeaderItem>();

            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment   = VerticalAlignment.Top;
        }
示例#2
0
        public CellsPanel(Excel p_excel)
        {
            Excel = p_excel;

            _cachedSelectionLayout       = new List <Rect>();
            _cachedActiveSelectionLayout = Rect.Empty;
            _cachedSelectionFrameLayout  = new Rect();
            _cachedFocusCellLayout       = new Rect();
            _editorBounds       = new Rect();
            _cachedDragFillRect = _rcEmpty;
            _cellCachePool      = new CellCachePool(Excel.ActiveSheet);
            _cachedSpanGraph    = new SpanGraph();

            //--------------已移除 公式编辑层、图形层、数据校验层-------------------
            // 1 行数据层
            _rowsLayer = new RowsLayer(this);
            Children.Add(_rowsLayer);

            // 2 网格层,调整为只用在内容区域,行/列头不再使用
            _borderLayer = new BorderLayer(this);
            Children.Add(_borderLayer);

            // 3 选择状态层
            _selectionLayer = new SelectionLayer(this);
            Children.Add(_selectionLayer);

            // 4 拖拽复制层,点击右下角加号复制格内容
            _dragFillLayer = CreateDragFillLayer();
            Children.Add(_dragFillLayer);

            // 5 新增修饰层,打印时页面边线
            if (p_excel.ShowDecoration)
            {
                _decorationLayer = new DecorationLayer(this);
                Children.Add(_decorationLayer);
            }

            // 6 编辑层
            _editorLayer = new EditingLayer(this);
            Children.Add(_editorLayer);

            // 7 浮动对象层
            _floatingLayer = new FloatingObjectLayer(this);
            Children.Add(_floatingLayer);

            // 8 浮动对象拖拽移动层
            _floatingEditLayer = new FloatingObjectMovingLayer(this);
            Children.Add(_floatingEditLayer);

            HorizontalAlignment = HorizontalAlignment.Left;
            VerticalAlignment   = VerticalAlignment.Top;
        }