コード例 #1
0
ファイル: WavingFlags.cs プロジェクト: wikey2013/WIKEYEARTH
 void m_category_people_OnMouseUpEvent(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     m_currentCategoryIndex = 9;
     ChangeForm(m_countryNameLabel.Text, m_currentCategoryIndex);
 }
コード例 #2
0
 /// <summary>
 /// Constructor with WfMouseEventArgs</summary>
 /// <param name="args">WfMouseEventArgs</param>
 public MouseEventArgsInterop(WfMouseEventArgs args)
     : this(args.Button, args.Clicks, args.X, args.Y, args.Delta) {}
コード例 #3
0
        private void mouseHookListener_MouseMove(object sender, MouseEventArgs e)
        {
            if (lastMouseDownLocation != null)
            {
                var currentPos = e.Location;
                var proposedYOffset = lastMouseDownVerticalOffset + lastMouseDownLocation.Value.Y - currentPos.Y;
                var proposedXOffset = lastMouseDownHorizontalOffset + lastMouseDownLocation.Value.X - currentPos.X;

                if (proposedYOffset <= 0 || proposedYOffset > source.ScrollViewer.ScrollableHeight)
                {
                    lastMouseDownVerticalOffset = proposedYOffset <= 0 ? 0 : source.ScrollViewer.ScrollableHeight;
                    lastMouseDownLocation = new Point(lastMouseDownLocation.Value.X, e.Y);

                    proposedYOffset = lastMouseDownVerticalOffset + lastMouseDownLocation.Value.Y - currentPos.Y;
                }

                source.ScrollViewer.ScrollToVerticalOffset(proposedYOffset);

                if (proposedXOffset <= 0 || proposedXOffset > source.ScrollViewer.ScrollableWidth)
                {
                    lastMouseDownHorizontalOffset = proposedXOffset <= 0 ? 0 : source.ScrollViewer.ScrollableWidth;
                    lastMouseDownLocation = new Point(e.X, lastMouseDownLocation.Value.Y);
                    proposedXOffset = lastMouseDownHorizontalOffset + lastMouseDownLocation.Value.X - currentPos.X;
                }

                source.ScrollViewer.ScrollToHorizontalOffset(proposedXOffset);
            }
        }
コード例 #4
0
 private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     paper.Clear(this.BackColor);
     paper.DrawRectangle(pen, e.X + 10, this.ClientRectangle.Height - 20, 50, 10);
 }
コード例 #5
0
ファイル: WavingFlags.cs プロジェクト: jpespartero/WorldWind
        void flag_OnMouseEnterEvent(object sender, EventArgs e)
        {
            System.Windows.Forms.MouseEventArgs mea = new System.Windows.Forms.MouseEventArgs(
                System.Windows.Forms.MouseButtons.None,
                0, 
                DrawArgs.LastMousePosition.X, 
                DrawArgs.LastMousePosition.Y, 
                0);

            // hack check to make sure that a widget isn't in the way
            if (DrawArgs.NewRootWidget.OnMouseMove(mea) || DrawArgs.RootWidget.OnMouseMove(mea))
                return;

            WavingFlagLayer flag = (WavingFlagLayer)sender;
            if (m_wavingFlagsList.IsOn && flag.Initialized && flag.IsOn)
            {
                ChangeForm(flag.Name, m_currentCategoryIndex);
                //m_ciaForm.Visible = true;
            }

            for (int i = 0; i < m_wavingFlagsList.ChildObjects.Count; i++)
            {
                if (m_wavingFlagsList.ChildObjects[i] is WavingFlagLayer)
                {
                    WavingFlagLayer wavingFlag = (WavingFlagLayer)m_wavingFlagsList.ChildObjects[i];
                    if (wavingFlag.Name != flag.Name)
                        wavingFlag.ShowHighlight = false;
                    else
                        wavingFlag.ShowHighlight = true;
                }
            }
        }
コード例 #6
0
 /// <summary>
 /// Should the camera do a panning (strafing) motion?</summary>
 /// <param name="controlScheme">The control scheme instance to extend</param>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's WfMouseEventArgs</param>
 /// <returns>True if the user wants to pan the camera</returns>
 /// <remarks>This is used by the arcball and trackball camera controllers.</remarks>
 public static bool IsPanning(this ControlScheme controlScheme, WfKeys modifierKeys, WfMouseEventArgs e)
 {
     return controlScheme.IsPanning(KeysInterop.ToAtf(modifierKeys), MouseEventArgsInterop.ToAtf(e));
 }
コード例 #7
0
 /* ----------------------------------------------------------------- */
 ///
 /// OnMouseUp
 ///
 /// <summary>
 /// 描画対象となるボタンの MouseUp イベントを捕捉するハンドラです。
 /// </summary>
 ///
 /* ----------------------------------------------------------------- */
 protected virtual void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
 {
     IsMouseDown = false;
     View.Invalidate();
 }
コード例 #8
0
ファイル: MouseHelper.cs プロジェクト: pgonzbecer/GDToolkit
 // Called when the mouse wheel is moved
 private void onMouseWheelMoved(object sender, MouseEventArgs args)
 {
     mouseWheel=	args.Delta;
 }
コード例 #9
0
 private void CVue3D_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     Capture = false;
 }
コード例 #10
0
 /* ----------------------------------------------------------------- */
 ///
 /// OnMouseDown
 ///
 /// <summary>
 /// 描画対象となるボタンの MouseDown イベントを捕捉するハンドラです。
 /// </summary>
 ///
 /* ----------------------------------------------------------------- */
 protected virtual void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
 => IsMouseDown = (e.Button == System.Windows.Forms.MouseButtons.Left);
コード例 #11
0
 void MyNotifyIcon_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     this.WindowState = WindowState.Normal;
 }
コード例 #12
0
 public bool OnMouseWheel(System.Windows.Forms.MouseEventArgs e)
 {
     // TODO:  Add TextBox.OnMouseWheel implementation
     return(false);
 }
コード例 #13
0
 void Viewport_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
     }
 }
コード例 #14
0
 /// <summary>
 /// Creates AtfMouseEventArgs instance from data in WfMouseEventArgs instance</summary>
 /// <param name="args">WfMouseEventArgs instance</param>
 /// <returns>AtfMouseEventArgs instance</returns>
 public static AtfMouseEventArgs ToAtf(WfMouseEventArgs args)
 {
     return new AtfMouseEventArgs(MouseButtonsInterop.ToAtf(args.Button), args.Clicks, args.X, args.Y, args.Delta);
 }
コード例 #15
0
 private void con_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     p = new System.Drawing.Point(e.X, e.Y);
 }
コード例 #16
0
ファイル: MouseHelper.cs プロジェクト: pgonzbecer/GDToolkit
 // Called when the viewport has detected a mouse button is up
 private void onMouseUp(object sender, MouseEventArgs args)
 {
     switch((int)args.Button)
     {
         case 1048576:	held[0]=	false;	break;
         case 4194304:	held[1]=	false;	break;
         case 2097152:	held[2]=	false;	break;
         case 8388608:	held[3]=	false;	break;
         case 16777216:	held[4]=	false;	break;
     }
     mouseWheel=	args.Delta;
 }
コード例 #17
0
 private void con_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
 {
 }
コード例 #18
0
ファイル: SharpMapHost.cs プロジェクト: lishxi/_SharpMap
 /// <summary>
 /// Gets called when mouse moves over map
 /// </summary>
 /// <param name="worldPos">The click coordinate</param>
 /// <param name="mouseEventArgs">The event arguments</param>
 private void MapBoxOnMouseMove(Coordinate worldPos, MouseEventArgs mouseEventArgs)
 {
     _currentMouseCoordinate = worldPos;
     if (PropertyChanged != null)
     {
         PropertyChanged(this, new PropertyChangedEventArgs("CurrentMouseCoordinate"));
         PropertyChanged(this, new PropertyChangedEventArgs("CurrentMouseCoordinateString"));
     }
 }
コード例 #19
0
 private void GlControlHost_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     WInput.SetMouseState(WinFormToWPFMouseButton(e), true);
 }
コード例 #20
0
ファイル: DockManager.cs プロジェクト: WELL-E/Hurricane
        void HookManager_MouseMove(object sender, MouseEventArgs e)
        {
            
            //Side dock > top dock
            if (!IsEnabled) return;
            if (Mouse.LeftButton == MouseButtonState.Released) //If the user doubleclicks the window, relocates the window and releases the mouse, it doesn't get stopped
            {
                DragStop();
                return;
            }

            if (MouseIsLeftRightOrTop(e.X, e.Y, out _newSide))
            {
                var screen = WpfScreen.GetScreenFrom(new Point(e.X, e.Y));
                if (NewSide == WindowPositionSide.Left || NewSide == WindowPositionSide.Right)
                {
                    if (!IsAtRightOrLeftBorder)
                    {
                        IsAtRightOrLeftBorder = true;
                        OpenWindow(NewSide.Value, screen);
                        if (IsAtTop) IsAtTop = false;
                    }
                    return;
                }
                if (IsAtRightOrLeftBorder)
                {
                    IsAtRightOrLeftBorder = false;
                    CloseWindowIfExists();
                }
                if (NewSide == WindowPositionSide.Top)
                {
                    if (!IsAtTop || screen.DeviceName != DisplayingScreen)
                    {
                        IsAtTop = true;
                        OpenWindow(NewSide.Value, screen);
                        DisplayingScreen = screen.DeviceName;
                    }
                }
            }
            else
            {
                if (!_firedUndocked)
                {
                    _firedUndocked = true;
                    OnUndocked();
                }
                if (IsAtTop)
                {
                    IsAtTop = false;
                    CloseWindowIfExists();
                }
                if (IsAtRightOrLeftBorder)
                {
                    IsAtRightOrLeftBorder = false;
                    CloseWindowIfExists();
                }
            }
        }
コード例 #21
0
 private void GlControlHost_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     WInput.SetMouseScrollDelta(e.Delta);
 }
コード例 #22
0
 private void mouseHookListener_MouseUp(object sender, MouseEventArgs e)
 {
     mouseHookListener.Enabled = false;
     lastMouseDownLocation = null;
 }
コード例 #23
0
ファイル: WavingFlags.cs プロジェクト: wikey2013/WIKEYEARTH
 void m_category_transportation_OnMouseUpEvent(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     m_currentCategoryIndex = 71;
     ChangeForm(m_countryNameLabel.Text, m_currentCategoryIndex);
 }
コード例 #24
0
 private void mouseHookListener_MouseDown(object sender, MouseEventArgs e)
 {
     source.ZoomIn();
 }
コード例 #25
0
 public override void MouseDownAction(System.Windows.Forms.MouseEventArgs e)
 {
     points = new LinkedList <Vector2>();
     points.Add(new Vector2(e.X, e.Y));
 }