コード例 #1
0
ファイル: CustomScrollBarAdapter.cs プロジェクト: Kuzq/gitter
 public CustomScrollBarAdapter(Orientation orientation, CustomScrollBarRenderer renderer)
 {
     switch(orientation)
     {
         case Orientation.Vertical:
             _scrollBar = new CustomVScrollbar() { Renderer = renderer };
             break;
         case Orientation.Horizontal:
             _scrollBar = new CustomHScrollbar() { Renderer = renderer };
             break;
         default:
             throw new ArgumentException("orientation");
     }
     _scrollBar.Scroll += OnScrollBarScroll;
     _scrollBar.ValueChanged += OnScrollBarValueChanged;
 }
コード例 #2
0
ファイル: CustomScrollBar.cs プロジェクト: kiple/gitter
 public CustomScrollBar()
 {
     SetStyle(
         ControlStyles.AllPaintingInWmPaint |
         ControlStyles.OptimizedDoubleBuffer |
         ControlStyles.Opaque |
         ControlStyles.ResizeRedraw |
         ControlStyles.Selectable |
         ControlStyles.UserPaint, true);
     SetStyle(
         ControlStyles.ContainerControl |
         ControlStyles.UseTextForAccessibility |
         ControlStyles.SupportsTransparentBackColor, false);
     TabStop      = false;
     _renderer    = CustomScrollBarRenderer.Default;
     _maximum     = 100;
     _smallChange = 1;
     _largeChange = 10;
     _timer       = new Timer();
     _timer.Tick += OnTimerTick;
 }
コード例 #3
0
ファイル: CustomScrollBar.cs プロジェクト: Kuzq/gitter
 public CustomScrollBar()
 {
     SetStyle(
         ControlStyles.AllPaintingInWmPaint |
         ControlStyles.OptimizedDoubleBuffer |
         ControlStyles.Opaque |
         ControlStyles.ResizeRedraw |
         ControlStyles.Selectable |
         ControlStyles.UserPaint, true);
     SetStyle(
         ControlStyles.ContainerControl |
         ControlStyles.UseTextForAccessibility |
         ControlStyles.SupportsTransparentBackColor, false);
     TabStop = false;
     _renderer = CustomScrollBarRenderer.Default;
     _maximum = 100;
     _smallChange = 1;
     _largeChange = 10;
     _timer = new Timer();
     _timer.Tick += OnTimerTick;
 }
コード例 #4
0
        public CustomScrollBarAdapter(Orientation orientation, CustomScrollBarRenderer renderer)
        {
            switch (orientation)
            {
            case Orientation.Vertical:
                _scrollBar = new CustomVScrollbar()
                {
                    Renderer = renderer
                };
                break;

            case Orientation.Horizontal:
                _scrollBar = new CustomHScrollbar()
                {
                    Renderer = renderer
                };
                break;

            default:
                throw new ArgumentException("orientation");
            }
            _scrollBar.Scroll       += OnScrollBarScroll;
            _scrollBar.ValueChanged += OnScrollBarValueChanged;
        }