public void OnMouseMove(MouseState e) { Timer.Stop(_th); if (_state.value == 0) // FeatureCursorProviderKey でカーソル変更していない状態の時のみ、処理を行いたい { if (_pos.Count == 0) { _th = Timer.AddTrigger(e, 50, new GuiTimer.Proc1(proc)); } } }
/// <summary> /// オートスクロールする /// </summary> public void autoScroll() { try { var e = MouseState.Now; _timer = null; var pp = 0; if (e.Attr.IsButton) { var pr = _tarPane.GetPaneRect(); e.Pos = ThreadSafe.PointToClient(_tarPane.Control, e.Pos); if (e.Pos.Y > -24 && e.Pos.Y < pr.Height + 24) { if (e.Pos.X < 16) { pp = 20; } if (e.Pos.X > pr.Width - 32) { pp = -20; } } } if (pp != 0) { Pane.Scroll = ScreenPos.FromInt(Pane.Scroll.X + pp, Pane.Scroll.Y); Pane.Invalidate(null); _timer = Timer.AddTrigger(100, new GuiTimer.Proc0(autoScroll)); } else { _timer = null; } } catch (Exception) { } }