コード例 #1
0
ファイル: PageSlider.cs プロジェクト: huamanhtuyen/VNACCS
        /// <summary>
        /// Initializes a new instance of the PageSlider class.
        /// </summary>
        public PageSlider()
        {
            _StepIndicator = new StepIndicator();
            _StepIndicator.Dock = DockStyle.Top;
            this.Controls.Add(_StepIndicator);
            if (BarFunctions.IsWindows7 && Touch.TouchHandler.IsTouchEnabled)
            {
                _TouchHandler = new DevComponents.DotNetBar.Touch.TouchHandler(this);
                _TouchHandler.PanBegin += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPanBegin);
                _TouchHandler.Pan += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPan);
                _TouchHandler.PanEnd += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPanEnd);
            }
            _HorizontalScrollBar = new HScrollBarAdv();
            _HorizontalScrollBar.Dock = DockStyle.Bottom;
            _HorizontalScrollBar.Height = 12;
            _HorizontalScrollBar.Scroll += new ScrollEventHandler(ScrollBarScroll);
            _HorizontalScrollBar.Visible = false;
            this.Controls.Add(_HorizontalScrollBar);

            _VerticalScrollBar = new VScrollBarAdv();
            _VerticalScrollBar.Dock = DockStyle.Right;
            _VerticalScrollBar.Width = 12;
            _VerticalScrollBar.Scroll += new ScrollEventHandler(ScrollBarScroll);
            _VerticalScrollBar.Visible = false;
            this.Controls.Add(_VerticalScrollBar);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the SuperGridControl class.
        /// </summary>
        public SuperGridControl()
        {
            SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint |
                ControlStyles.Opaque | ControlStyles.ResizeRedraw |
                ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor, true);

            _PrimaryGrid = new GridPanel();

            _PrimaryGrid.SuperGrid = this;
            _PrimaryGrid.ContainerBounds = ClientRectangle;

            SetupScrollBars();

            if (DesignMode == false)
            {
                Application.AddMessageFilter(this);

                base.PreviewKeyDown += SuperGridControlPreviewKeyDown;
            }

            UpdateGridStyle();

            StyleManager.Register(this);

            if (BarFunctions.IsWindows7 && Touch.TouchHandler.IsTouchEnabled)
            {
                _TouchHandler = new Touch.TouchHandler(this, Touch.eTouchHandlerType.Gesture);

                _TouchHandler.PanBegin += TouchHandlerPanBegin;
                _TouchHandler.Pan += TouchHandlerPan;
                _TouchHandler.PanEnd += TouchHandlerPanEnd;
            }
        }