📄 scroll_widget.cs
字号:
}
else
{
size.Width = rcClient.right - rcClient.left;
}
size.Height = num4;
if ((rcWnd.bottom - rcWnd.top) < ((num4 + rcClient.bottom) - rcClient.top))
{
flag = false;
}
}
else
{
point3.X = ptOut.x;
point3.Y = point2.y;
size.Width = rcWnd.right - rcWnd.left;
size.Height = num4;
}
}
}
if (this.m_for_buddytree)
{
if (this.m_hook_host)
{
base.Visible = flag;
}
else
{
base.Visible = true;
}
}
else
{
base.Visible = flag;
}
if (flag)
{
base.Location = point3;
base.Size = size;
base.BringToFront();
if (this.m_hook_host)
{
this.calculate_thumb_rect();
}
this.do_paint();
}
}
}
}
}
}
}
protected override void OnHandleDestroyed(EventArgs e)
{
this.host = null;
base.OnHandleDestroyed(e);
}
protected override void OnMouseCaptureChanged(EventArgs e)
{
if (this.m_toggling)
{
this.m_toggling = false;
}
if ((toggleingpos_type.back_button == this.m_togglingpos) || (toggleingpos_type.prev_button == this.m_togglingpos))
{
this.m_togglingpos = toggleingpos_type.toggle_null;
this.m_slide_timer.Enabled = false;
this.m_startup_timer.Enabled = false;
}
base.OnMouseCaptureChanged(e);
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (MouseButtons.Left == e.Button)
{
this.m_toggling = true;
Rectangle rcPrevArrow = new Rectangle();
Rectangle rcBackArrow = new Rectangle();
this.calculate_arrows_rect(ref rcPrevArrow, ref rcBackArrow);
if (rcPrevArrow.Contains(e.get_Location()))
{
this.m_togglingpos = toggleingpos_type.prev_button;
this.m_prev_arrow_state = DrawItemState.HotLight | DrawItemState.Selected;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
this.click_prev_button();
this.m_startup_timer.Enabled = true;
}
else if (rcBackArrow.Contains(e.get_Location()))
{
this.m_togglingpos = toggleingpos_type.back_button;
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.HotLight | DrawItemState.Selected;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
this.click_back_button();
this.m_startup_timer.Enabled = true;
}
else if (this.m_thumb_is_visable)
{
if (this.m_thumb_rect.Contains(e.get_Location()))
{
if (this.m_for_pane)
{
Point point = base.PointToScreen(e.get_Location());
win32api_wrapper.SendMessage(this.m_host.Handle, 0xa1, this.vertical ? ((IntPtr) 7) : ((IntPtr) 6), (IntPtr) (point.X + (point.Y << 0x10)));
}
this.m_last_hit_thumb_pos = this.vertical ? (e.get_Location().Y - this.m_thumb_rect.Top) : (e.get_Location().X - this.m_thumb_rect.Left);
this.m_togglingpos = toggleingpos_type.thumb_button;
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.HotLight | DrawItemState.Selected;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
else
{
this.m_togglingpos = toggleingpos_type.tunnel;
this.click_tunnel(e.get_Location());
this.m_startup_timer.Enabled = true;
}
}
else
{
this.m_togglingpos = toggleingpos_type.tunnel;
this.click_tunnel(e.get_Location());
this.m_startup_timer.Enabled = true;
}
}
}
protected override void OnMouseEnter(EventArgs e)
{
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.do_paint();
base.OnMouseEnter(e);
}
protected override void OnMouseLeave(EventArgs e)
{
this.m_thumb_state = DrawItemState.Inactive;
this.m_tunnel_state = DrawItemState.Inactive;
this.m_prev_arrow_state = DrawItemState.Inactive;
this.m_back_arrow_state = DrawItemState.Inactive;
this.do_paint();
base.OnMouseLeave(e);
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (this.m_toggling)
{
if (toggleingpos_type.thumb_button == this.m_togglingpos)
{
this.on_drag_thumb(e.get_Location());
}
}
else
{
Rectangle rcPrevArrow = new Rectangle();
Rectangle rcBackArrow = new Rectangle();
this.calculate_arrows_rect(ref rcPrevArrow, ref rcBackArrow);
if (rcPrevArrow.Contains(e.get_Location()))
{
if (DrawItemState.HotLight != (this.m_prev_arrow_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.HotLight;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
}
else if (rcBackArrow.Contains(e.get_Location()))
{
if (DrawItemState.HotLight != (this.m_back_arrow_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.HotLight;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
}
else if (this.m_thumb_is_visable)
{
if (!this.m_thumb_rect.Contains(e.get_Location()))
{
if (DrawItemState.HotLight != (this.m_tunnel_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.HotLight;
this.do_paint();
}
}
else if (DrawItemState.HotLight != (this.m_thumb_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.HotLight;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
}
else if (DrawItemState.HotLight == (this.m_tunnel_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
}
}
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
if (MouseButtons.Left == e.Button)
{
if (toggleingpos_type.thumb_button == this.m_togglingpos)
{
this.on_drag_thumb(e.get_Location());
if (this.m_for_pane)
{
Point point = base.PointToScreen(e.get_Location());
win32api_wrapper.SendMessage(this.m_host.Handle, 0xa2, this.vertical ? ((IntPtr) 7) : ((IntPtr) 6), (IntPtr) (point.X + (point.Y << 0x10)));
}
this.on_end_drag_thumb(e.get_Location());
}
else if ((toggleingpos_type.tunnel == this.m_togglingpos) && this.m_for_buddytree)
{
this.on_end_drag_thumb(e.get_Location());
}
this.m_toggling = false;
this.m_togglingpos = toggleingpos_type.toggle_null;
this.m_startup_timer.Enabled = false;
this.m_slide_timer.Enabled = false;
if (!base.ClientRectangle.Contains(e.get_Location()))
{
this.m_thumb_state = DrawItemState.Inactive;
this.m_tunnel_state = DrawItemState.Inactive;
this.m_prev_arrow_state = DrawItemState.Inactive;
this.m_back_arrow_state = DrawItemState.Inactive;
this.do_paint();
}
else
{
Rectangle rcPrevArrow = new Rectangle();
Rectangle rcBackArrow = new Rectangle();
this.calculate_arrows_rect(ref rcPrevArrow, ref rcBackArrow);
if (rcPrevArrow.Contains(e.get_Location()))
{
if (DrawItemState.HotLight != (this.m_prev_arrow_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.HotLight;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
}
else if (rcBackArrow.Contains(e.get_Location()))
{
if (DrawItemState.HotLight != (this.m_back_arrow_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.HotLight;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
this.do_paint();
}
}
else if (this.m_thumb_is_visable)
{
if (!this.m_thumb_rect.Contains(e.get_Location()))
{
if (DrawItemState.HotLight != (this.m_tunnel_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.HotLight;
this.do_paint();
}
}
else if (DrawItemState.HotLight == (this.m_thumb_state & DrawItemState.HotLight))
{
this.m_prev_arrow_state = DrawItemState.Default;
this.m_back_arrow_state = DrawItemState.Default;
this.m_thumb_state = DrawItemState.Default;
this.m_tunnel_state = DrawItemState.Default;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -