Beispiel #1
0
 // Token: 0x060000FB RID: 251 RVA: 0x000066C0 File Offset: 0x000048C0
 public void InitializeScrollbar(IntPtr handle, int height, int autoScrollOffsetY)
 {
     CustomScrollbar.SCROLLINFO scrollinfo = default(CustomScrollbar.SCROLLINFO);
     scrollinfo.Size = (uint)Marshal.SizeOf(scrollinfo);
     scrollinfo.Mask = 23U;
     CustomScrollbar.GetScrollInfo(handle, 1, ref scrollinfo);
     this.Minimum     = 0;
     this.Maximum     = scrollinfo.Max;
     this.LargeChange = this.Maximum / base.Height + height;
     this.SmallChange = 15;
     this.Value       = Math.Abs(autoScrollOffsetY);
 }
Beispiel #2
0
        // Token: 0x060000FD RID: 253 RVA: 0x000067D4 File Offset: 0x000049D4
        internal void MoveScrollbar(IntPtr handle, int keyCode)
        {
            CustomScrollbar.SCROLLINFO scrollinfo = default(CustomScrollbar.SCROLLINFO);
            scrollinfo.Size = (uint)Marshal.SizeOf(scrollinfo);
            scrollinfo.Mask = 23U;
            CustomScrollbar.GetScrollInfo(handle, 1, ref scrollinfo);
            IntPtr wParam = new IntPtr(5 + 65536 * scrollinfo.Pos);

            switch (keyCode)
            {
            case 0:
                scrollinfo.Pos--;
                wParam = new IntPtr(0);
                break;

            case 1:
                scrollinfo.Pos++;
                wParam = new IntPtr(1);
                break;

            case 2:
                scrollinfo.Pos -= Convert.ToInt32(scrollinfo.Page);
                wParam          = new IntPtr(2);
                break;

            case 3:
                scrollinfo.Pos += Convert.ToInt32(scrollinfo.Page);
                wParam          = new IntPtr(3);
                break;
            }
            if (scrollinfo.Pos > scrollinfo.Max)
            {
                scrollinfo.Pos = scrollinfo.Max;
            }
            scrollinfo.Mask = 4U;
            CustomScrollbar.SetScrollInfo(handle, 1, ref scrollinfo, true);
            IntPtr lParam = new IntPtr(0);

            CustomScrollbar.SendMessage(handle, 277U, wParam, lParam);
            CustomScrollbar.GetScrollInfo(handle, 1, ref scrollinfo);
            this.Value = scrollinfo.Pos;
        }
Beispiel #3
0
        // Token: 0x060000FC RID: 252 RVA: 0x00006738 File Offset: 0x00004938
        public void CustomScroll(IntPtr handle, int units)
        {
            IntPtr lParam = new IntPtr(0);

            CustomScrollbar.SCROLLINFO scrollinfo = default(CustomScrollbar.SCROLLINFO);
            scrollinfo.Size = (uint)Marshal.SizeOf(scrollinfo);
            scrollinfo.Mask = 23U;
            CustomScrollbar.GetScrollInfo(handle, 1, ref scrollinfo);
            IntPtr wParam;

            if (units < scrollinfo.Max)
            {
                scrollinfo.Pos = units;
            }
            else
            {
                wParam = new IntPtr(8);
                CustomScrollbar.SendMessage(handle, 277U, wParam, lParam);
            }
            CustomScrollbar.SetScrollInfo(handle, 1, ref scrollinfo, true);
            wParam = new IntPtr(5 + 65536 * scrollinfo.Pos);
            CustomScrollbar.SendMessage(handle, 277U, wParam, lParam);
        }