示例#1
0
文件: MyCell.cs 项目: scaperow/-V2.0
        void VerticalScrollBar_Scroll(object sender, ScrollEventArgs e)
        {
            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow    = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow = View.GetViewportBottomRow(ActiveSheetIndex, 0);

                Invalidate();
            }
        }
示例#2
0
文件: MyCell.cs 项目: scaperow/-V2.0
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            base.OnMouseWheel(e);

            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow    = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow = View.GetViewportBottomRow(ActiveSheetIndex, 0);

                Invalidate();
            }
        }
示例#3
0
        protected override bool IsInputKey(Keys keyData)
        {
            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow      = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow   = View.GetViewportBottomRow(ActiveSheetIndex, 0);
                LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);

                Invalidate();
            }

            return(base.IsInputKey(keyData));
        }
示例#4
0
文件: MyCell.cs 项目: scaperow/-V2.0
        protected override void OnActiveSheetChanged(EventArgs e)
        {
            base.OnActiveSheetChanged(e);

            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow      = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow   = View.GetViewportBottomRow(ActiveSheetIndex, 0);
                LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);
            }

            UpdateColumnsWidth();
            UpdateRowsHeight();

            Invalidate();
        }
示例#5
0
文件: MyCell.cs 项目: scaperow/-V2.0
        void Sheet_PropertyChanged(object sender, SheetViewPropertyChangeEventArgs e)
        {
            if (e.PropertyName == "PrintInfo")
            {
                Invalidate();
            }
            else if (e.PropertyName == "RowCount" || e.PropertyName == "ColumnCount")
            {
                if (ActiveSheet.ContainingViews.Length > 0)
                {
                    SpreadView View = ActiveSheet.ContainingViews[0];
                    TopRow      = View.GetViewportTopRow(ActiveSheetIndex, 0);
                    BottomRow   = View.GetViewportBottomRow(ActiveSheetIndex, 0);
                    LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                    RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);
                }

                UpdateColumnsWidth();
                UpdateRowsHeight();

                Invalidate();
            }
        }