コード例 #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 ScrollbarControl class.
        /// </summary>
        public ScrollbarControl()
        {
            this.SetStyle(ControlStyles.UserPaint | 
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.Opaque | 
                ControlStyles.ResizeRedraw |
                DisplayHelp.DoubleBufferFlag, true);
            
            _HScrollBar = new HScrollBarAdv();
            _HScrollBar.Visible = false;
            _HScrollBar.Appearance = _ScrollBarAppearance;
            _HScrollBar.Scroll += HScrollBarScroll;
            _VScrollBar = new VScrollBarAdv();
            _VScrollBar.Visible = false;
            _VScrollBar.Appearance = _ScrollBarAppearance;
            _VScrollBar.Scroll += VScrollBarScroll;
            this.Controls.Add(_HScrollBar);
            this.Controls.Add(_VScrollBar);

            _Thumb = new Control();
            _Thumb.Visible = false;
            _Thumb.BackColor = SystemColors.Window;
            this.Controls.Add(_Thumb);
        }
コード例 #3
0
ファイル: CalendarPanel.cs プロジェクト: huamanhtuyen/VNACCS
        /// <summary>
        /// Sets up default view horizontal scrollbar
        /// </summary>
        private void SetUpDhScrollBar()
        {
            _HScrollBar = new HScrollBarAdv();
            _HScrollBar.Height = _CalendarView.HsHeight;

            Control c = (Control)this.GetContainerControl(true);

            if (c != null)
                c.Controls.Add(_HScrollBar);

            _HScrollBar.ValueChanged += DhScrollBarValueChanged;
        }
コード例 #4
0
        private void SetupScrollBars()
        {
            _VScrollBar = new VScrollBarAdv();
            _VScrollBar.Width = SystemInformation.VerticalScrollBarWidth;
            _VScrollBar.Scroll += VScrollBarScroll;
            _VScrollBar.MouseEnter += VScrollBarMouseEnter;

            _HScrollBar = new HScrollBarAdv();
            _HScrollBar.Height = SystemInformation.HorizontalScrollBarHeight;
            _HScrollBar.Scroll += HScrollBarScroll;
            _HScrollBar.MouseEnter += HScrollBarMouseEnter;

            _HScrollBar.Visible = false;
            _VScrollBar.Visible = false;

            Controls.Add(_HScrollBar);
            Controls.Add(_VScrollBar);
        }
コード例 #5
0
        private void SetupScrollBar(Control c)
        {
            _ScrollBar = new HScrollBarAdv();

            _ScrollBar.Visible = false;
            _ScrollBar.Height = SystemInformation.HorizontalScrollBarHeight;

            HookScrollEvents(true);

            c.Controls.Add(_ScrollBar);
        }