当前位置: 首页>>代码示例>>C#>>正文


C# Base.BasicMouseEventArgs类代码示例

本文整理汇总了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();
     }
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:35,代码来源:HorizontalScrollBarView.cs

示例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;
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:10,代码来源:BasicMouseEventArgs.cs

示例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();
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:13,代码来源:VerticalScrollBarView.cs

示例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();
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:13,代码来源:HorizontalScrollBarView.cs

示例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();
     }
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:46,代码来源:VerticalScrollBarView.cs

示例6: OnMouseDoubleClickColumnHeaderView

 protected internal virtual void OnMouseDoubleClickColumnHeaderView(BasicMouseEventArgs e)
 {
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:3,代码来源:CompoundScrollableControl.cs

示例7: OnMouseDoubleClickMainView

 protected internal virtual void OnMouseDoubleClickMainView(BasicMouseEventArgs e)
 {
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:3,代码来源:CompoundScrollableControl.cs

示例8: OnMouseMoved

 protected internal override void OnMouseMoved(BasicMouseEventArgs e)
 {
     main.OnMouseMoveMainView(e);
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:4,代码来源:SimpleScrollableControlMainView.cs

示例9: OnMouseClickCornerView

 protected internal virtual void OnMouseClickCornerView(BasicMouseEventArgs e)
 {
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:3,代码来源:CompoundScrollableControl.cs

示例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;
     }
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:13,代码来源:ScatterPlotPlaneView.cs

示例11: OnMouseDoubleClick

 protected internal override void OnMouseDoubleClick(BasicMouseEventArgs e)
 {
     indicatorX1 = -1;
     indicatorX2 = -1;
     indicatorY1 = -1;
     indicatorY2 = -1;
     FireZoom(false, e.Width, e.Height);
     Invalidate();
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:9,代码来源:ScatterPlotPlaneView.cs

示例12: OnMouseDraggedRowFooterView

 protected internal virtual void OnMouseDraggedRowFooterView(BasicMouseEventArgs e)
 {
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:3,代码来源:CompoundScrollableControl.cs

示例13: OnMouseIsDown

 protected internal override void OnMouseIsDown(BasicMouseEventArgs e)
 {
     indicatorX1 = e.X;
     indicatorX2 = indicatorX1;
     indicatorY1 = e.Y;
     indicatorY2 = indicatorY1;
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:7,代码来源:ScatterPlotPlaneView.cs

示例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();
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:15,代码来源:HorizontalScrollBarView.cs

示例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();
     }
 }
开发者ID:neuhauser,项目名称:compbio-base,代码行数:19,代码来源:HorizontalScrollBarView.cs


注:本文中的BasicLib.Forms.Base.BasicMouseEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。