本文整理汇总了C#中BasicLib.Forms.Base.BasicMouseEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# BasicMouseEventArgs类的具体用法?C# BasicMouseEventArgs怎么用?C# BasicMouseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasicMouseEventArgs类属于BasicLib.Forms.Base命名空间,在下文中一共展示了BasicMouseEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnMouseIsDown
protected internal override void OnMouseIsDown(BasicMouseEventArgs e)
{
ScrollBarState newState = ScrollBarState.Neutral;
if (e.X < CompoundScrollableControl.scrollBarWidth - 1) {
newState = ScrollBarState.PressFirstBox;
MoveLeft(main.DeltaX);
leftThread = new Thread(() => WalkLeft(main.DeltaX));
leftThread.Start();
} else if (e.X > e.Width - CompoundScrollableControl.scrollBarWidth) {
newState = ScrollBarState.PressSecondBox;
MoveRight(main.DeltaX);
rightThread = new Thread(() => WalkRight(main.DeltaX));
rightThread.Start();
} else if (HasBar) {
int s = CalcBarStart(e.Width);
int l = CalcBarSize(e.Width);
if (e.X >= s && e.X <= s + l) {
newState = ScrollBarState.PressBar;
dragStart = e.X;
visibleDragStart = main.VisibleX;
} else if (e.X < s) {
MoveLeft(main.VisibleWidth);
leftThread = new Thread(() => WalkLeft(main.VisibleWidth));
leftThread.Start();
} else {
MoveRight(main.VisibleWidth);
rightThread = new Thread(() => WalkRight(main.VisibleWidth));
rightThread.Start();
}
}
if (newState != state) {
state = newState;
Invalidate();
}
}
示例2: BasicMouseEventArgs
public BasicMouseEventArgs(BasicMouseEventArgs e, int dx, int dy, int width, int height)
{
x = e.X - dx;
y = e.Y - dy;
this.width = width;
this.height = height;
isMainButton = e.isMainButton;
modifierKeys = e.modifierKeys;
showTip = e.showTip;
}
示例3: OnMouseDragged
// ReSharper restore FunctionNeverReturns
protected internal override void OnMouseDragged(BasicMouseEventArgs e)
{
if (state != ScrollBarState.PressBar) {
return;
}
int hx = e.Height - 2 * CompoundScrollableControl.scrollBarWidth + 2;
int y = visibleDragStart + (int)Math.Round((e.Y - dragStart) / (double)hx * main.TotalHeight);
y = Math.Max(0, y);
y = Math.Min(main.TotalHeight - main.VisibleHeight, y);
main.VisibleY = y;
Invalidate();
}
示例4: OnMouseDragged
// ReSharper restore FunctionNeverReturns
protected internal override void OnMouseDragged(BasicMouseEventArgs e)
{
if (state != ScrollBarState.PressBar) {
return;
}
int hx = e.Width - 2 * CompoundScrollableControl.scrollBarWidth + 2;
int x = visibleDragStart + (int)Math.Round((e.X - dragStart) / (double)hx * main.TotalWidth);
x = Math.Max(0, x);
x = Math.Min(main.TotalWidth - main.VisibleWidth, x);
main.VisibleX = x;
Invalidate();
}
示例5: OnMouseIsDown
protected internal override void OnMouseIsDown(BasicMouseEventArgs e)
{
ScrollBarState newState = ScrollBarState.Neutral;
bool ctrl = e.ControlPressed;
if (e.Y < CompoundScrollableControl.scrollBarWidth - 1) {
if (ctrl) {
newState = ScrollBarState.PressFirstBox;
MoveUp(main.DeltaUpToSelection());
} else {
newState = ScrollBarState.PressFirstBox;
MoveUp(main.DeltaY);
upThread = new Thread(() => WalkUp(main.DeltaY));
upThread.Start();
}
} else if (e.Y > e.Height - CompoundScrollableControl.scrollBarWidth) {
if (ctrl) {
newState = ScrollBarState.PressSecondBox;
MoveDown(main.DeltaDownToSelection());
} else {
newState = ScrollBarState.PressSecondBox;
MoveDown(main.DeltaY);
downThread = new Thread(() => WalkDown(main.DeltaY));
downThread.Start();
}
} else if (HasBar) {
int s = CalcBarStart(e.Height);
int l = CalcBarSize(e.Height);
if (e.Y >= s && e.Y <= s + l) {
newState = ScrollBarState.PressBar;
dragStart = e.Y;
visibleDragStart = main.VisibleY;
} else if (e.Y < s) {
MoveUp(main.VisibleHeight);
upThread = new Thread(() => WalkUp(main.VisibleHeight));
upThread.Start();
} else {
MoveDown(main.VisibleHeight);
downThread = new Thread(() => WalkDown(main.VisibleHeight));
downThread.Start();
}
}
if (newState != state) {
state = newState;
Invalidate();
}
}
示例6: OnMouseDoubleClickColumnHeaderView
protected internal virtual void OnMouseDoubleClickColumnHeaderView(BasicMouseEventArgs e)
{
}
示例7: OnMouseDoubleClickMainView
protected internal virtual void OnMouseDoubleClickMainView(BasicMouseEventArgs e)
{
}
示例8: OnMouseMoved
protected internal override void OnMouseMoved(BasicMouseEventArgs e)
{
main.OnMouseMoveMainView(e);
}
示例9: OnMouseClickCornerView
protected internal virtual void OnMouseClickCornerView(BasicMouseEventArgs e)
{
}
示例10: OnMouseClick
protected internal override void OnMouseClick(BasicMouseEventArgs e)
{
switch (MouseMode){
case ScatterPlotMouseMode.Zoom:
case ScatterPlotMouseMode.Select:
if (!HasMoved()){
bool add = e.ControlPressed;
SelectAt(e.X, e.Y, add, e.Width, e.Height);
Invalidate();
}
break;
}
}
示例11: OnMouseDoubleClick
protected internal override void OnMouseDoubleClick(BasicMouseEventArgs e)
{
indicatorX1 = -1;
indicatorX2 = -1;
indicatorY1 = -1;
indicatorY2 = -1;
FireZoom(false, e.Width, e.Height);
Invalidate();
}
示例12: OnMouseDraggedRowFooterView
protected internal virtual void OnMouseDraggedRowFooterView(BasicMouseEventArgs e)
{
}
示例13: OnMouseIsDown
protected internal override void OnMouseIsDown(BasicMouseEventArgs e)
{
indicatorX1 = e.X;
indicatorX2 = indicatorX1;
indicatorY1 = e.Y;
indicatorY2 = indicatorY1;
}
示例14: OnMouseIsUp
protected internal override void OnMouseIsUp(BasicMouseEventArgs e)
{
if (leftThread != null) {
leftThread.Abort();
leftThread = null;
}
if (rightThread != null) {
rightThread.Abort();
rightThread = null;
}
const ScrollBarState newState = ScrollBarState.Neutral;
OnMouseMoved(e);
state = newState;
Invalidate();
}
示例15: OnMouseMoved
protected internal override void OnMouseMoved(BasicMouseEventArgs e)
{
ScrollBarState newState = ScrollBarState.Neutral;
if (e.X < CompoundScrollableControl.scrollBarWidth - 1) {
newState = ScrollBarState.HighlightFirstBox;
} else if (e.X > e.Width - CompoundScrollableControl.scrollBarWidth) {
newState = ScrollBarState.HighlightSecondBox;
} else if (HasBar) {
int s = CalcBarStart(e.Width);
int l = CalcBarSize(e.Width);
if (e.X >= s && e.X <= s + l) {
newState = ScrollBarState.HighlightBar;
}
}
if (newState != state) {
state = newState;
Invalidate();
}
}