• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.MouseEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.MouseEventArgs的典型用法代码示例。如果您正苦于以下问题:C# MouseEventArgs类的具体用法?C# MouseEventArgs怎么用?C# MouseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MouseEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了MouseEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LeftMouseFullClicked

 public override void LeftMouseFullClicked(MouseEventArgs e)
 {
     if (_validPos)
     {
         engine.addNode(nodeType);
     }
 }
开发者ID:ArchSirius,项目名称:inf2990,代码行数:7,代码来源:CreatePoteau.cs


示例2: MouseUp

 private static void MouseUp(object sender, MouseEventArgs mouseEventArgs)
 {
     if (mouseEventArgs.Button == MouseButtons.Left)
         KeysPressed &= ~VolumeScrollKey.LeftMouseButton;
     if (mouseEventArgs.Button == MouseButtons.Right)
         KeysPressed &= ~VolumeScrollKey.RightMouseButton;
 }
开发者ID:AdditionalPylons,项目名称:AudioSwitch,代码行数:7,代码来源:ScrollVolume.cs


示例3: OnMouseWheel

        void OnMouseWheel(object sender, MouseEventArgs e)
        {
            WheelActions inputaction = e.Delta > 0 ? WheelActions.Up : WheelActions.Down;

            if (inputaction == action)
                base.OnEventTriggered(EventTypes.MouseWheel, this);
        }
开发者ID:infomaniac50,项目名称:ScriptKey,代码行数:7,代码来源:MouseWheelTrigger.cs


示例4: tc_MouseClick

        private void tc_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Middle)
            {
                for (int i = 0; i < tc.TabCount; ++i)
                {
                    if (tc.GetTabRect(i).Contains(e.Location))
                    {
                        TabPage tabPage = tc.TabPages[i];

                        if (tabPage != null)
                        {
                            TabInfo tabInfo = tabPage.Tag as TabInfo;

                            if (tabInfo != null)
                            {
                                tc.TabPages.Remove(tabPage);
                                Tabs.Remove(tabInfo);
                            }
                        }

                        return;
                    }
                }
            }
        }
开发者ID:Jaex,项目名称:IRCLib,代码行数:26,代码来源:TabManager.cs


示例5: listbox_clients_DoubleClickSubItem

 private void listbox_clients_DoubleClickSubItem(object sender, ChatListEventArgs e, MouseEventArgs es)
 {
     if (listbox_clients.Items[0].SubItems[0].Status== ChatListSubItem.UserStatus.OffLine)
     {
         showInfo("你处于离线状态", MyConfig.INT_UPDATEUI_TXBOX);
         return;
     }
     if (listbox_clients.Items[0].SubItems[0].IsVip)
     {
         showInfo("你处于远程控制状态", MyConfig.INT_UPDATEUI_TXBOX);
         return;
     }
     if (e.SelectSubItem.DisplayName.Equals(label_nickname.Text))
     {
         showInfo("设备不能连接自身", MyConfig.INT_UPDATEUI_TXBOX);
         //return;
     }
     if (e.SelectSubItem.Status==ChatListSubItem.UserStatus.OffLine)
     {
         showInfo("你连接的远端设备不在线", MyConfig.INT_UPDATEUI_TXBOX);
         return;
     }
     if (e.SelectSubItem.IsVip)
     {
         showInfo("你连接的远端设备处于控制状态", MyConfig.INT_UPDATEUI_TXBOX);
         return;
     }
     connect(e.SelectSubItem.Tag.ToString());
 }
开发者ID:ywcai,项目名称:RemoteDesk_win,代码行数:29,代码来源:MainForm.cs


示例6: itemListBox_MouseDown

 public void itemListBox_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         offsetListBox.SelectedIndex = offsetListBox.IndexFromPoint(e.Location);
     }
 }
开发者ID:Glain,项目名称:FFTPatcher,代码行数:7,代码来源:AllInflictStatusesEditor.cs


示例7: TxtMessagesMouseUp

 private void TxtMessagesMouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         contextOuputMenu.Show(txtMessages, e.Location);
     }
 }
开发者ID:xxjeng,项目名称:nuxleus,代码行数:7,代码来源:OutputPanel.cs


示例8: CanvasForm_MouseDown

 private void CanvasForm_MouseDown(object sender, MouseEventArgs e)
 {
     allowToDraw = true;
     tmpShape = ShapeFactory.GetShapeInstance(ShapeFactory.GetTypeByNumber(cbType.SelectedIndex), e.X, e.Y, 1, 1, Convert.ToInt16(width.SelectedItem), colorPanel.BackColor);
     tabControlCanvas.SelectedTab.Controls[0].Controls.Add(tmpShape);
     shapeIndex = tabControlCanvas.SelectedTab.Controls[0].Controls.Count - 1;
 }
开发者ID:MGnuskina,项目名称:Tasks,代码行数:7,代码来源:CanvasFormEvents.cs


示例9: rb_MouseUp

        private void rb_MouseUp(object sender, MouseEventArgs e)
        {
            var fs = ((RibbonButton)sender).Text;
            fontSize = Convert.ToInt32(fs);

            switch (FontSize)
            {
                case 8:
                    fontSize = 1;
                    break;
                case 10:
                    fontSize = 2;
                    break;
                case 12:
                    fontSize = 3;
                    break;
                case 14:
                    fontSize = 4;
                    break;
                case 18:
                    fontSize = 5;
                    break;
                case 24:
                    fontSize = 6;
                    break;
                case 28:
                    fontSize = 7;
                    break;
            }

            TextBoxText = fs;
        }
开发者ID:AlexGaidukov,项目名称:gipertest_streaming,代码行数:32,代码来源:FontSizeComboBox.cs


示例10: ListBoxMouseDoubleClick

 private void ListBoxMouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (listBox.SelectedIndex == -1)
         return;
     DialogResult = DialogResult.OK;
     Close();
 }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:7,代码来源:ListSelectDialog.cs


示例11: LeftMousePressed

 public override void LeftMousePressed(MouseEventArgs e)
 {
     engine.setInitPos();
     engine.setInitAngle();
     origX = System.Windows.Forms.Control.MousePosition.X;
     origY = System.Windows.Forms.Control.MousePosition.Y;
 }
开发者ID:ArchSirius,项目名称:inf2990,代码行数:7,代码来源:Rotation.cs


示例12: LlText_MouseClick

 private void LlText_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         CmMenu.Show(PlHead, 0, PlHead.Height);
     }
 }
开发者ID:burstas,项目名称:rmps,代码行数:7,代码来源:UcOpt.cs


示例13: notifyIcon_MouseUp

        private void notifyIcon_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left) return;

            var mi = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic);
            mi.Invoke(_notifyIcon, null);
        }
开发者ID:gandarez,项目名称:trackactivewindow-wakatime,代码行数:7,代码来源:CustomApplicationContext.cs


示例14: OnMouseButton

        public override void OnMouseButton(bool down, MouseEventArgs e)
        {
            int deviceX = 0, deviceY = 0;
            HardwareToDevice(e.X, e.Y, ref deviceX, ref deviceY);

            switch (e.Button)
            {
                case MouseButtons.Left:
                    if (down)
                    {
                        m_Camera.BeginMouseRotate(deviceX, deviceY);
                    }
                    break;
                case MouseButtons.Middle:
                    if (down)
                    {
                        m_Camera.BeginMouseTrack(deviceX, deviceY);
                    }
                    break;
                case MouseButtons.Right:
                    if (down)
                    {
                        m_Camera.BeginMouseZoom(deviceX);
                    }
                    break;
            }
        }
开发者ID:sojo2600,项目名称:css552_Research_Project,代码行数:27,代码来源:DrawAndMouseHandler.cs


示例15: MouseUp

        public MouseEvent MouseUp(MouseEventArgs e)
        {
            MouseEvent.MouseInfo mouseInfo = new MouseEvent.MouseInfo(false, false, new TPoint(e.X, e.Y));
            InheritButtonStatesFromPreviousMouseEvent(ref mouseInfo);

            if (e.Button == MouseButtons.Left)
            {
                mouseInfo.leftButton = false;
                MouseEvent mouseEvent = new MouseEvent(MouseEvent.EventState.LUp, mouseInfo, m_previousEvent.Info.position);
                m_previousEvent = mouseEvent;
                return mouseEvent;
            }
            else if (e.Button == MouseButtons.Middle)
            {
                mouseInfo.middleButton = false;
                MouseEvent mouseEvent = new MouseEvent(MouseEvent.EventState.MUp, mouseInfo, m_previousEvent.Info.position);
                m_previousEvent = mouseEvent;
                return mouseEvent;
            }
            else if (e.Button == MouseButtons.Right)
            {
                mouseInfo.rightButton = false;
                MouseEvent mouseEvent = new MouseEvent(MouseEvent.EventState.RUp, mouseInfo, m_previousEvent.Info.position);
                m_previousEvent = mouseEvent;
                return mouseEvent;
            }

            return null;
        }
开发者ID:microm,项目名称:eplib,代码行数:29,代码来源:MouseEventTranslator.cs


示例16: ListViewUsersMouseDoubleClick

 private void ListViewUsersMouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (SelectedUsers.Count > 0)
     {
         ButtonValidateClick(null, null);
     }
 }
开发者ID:NielsMinnee,项目名称:XrmToolBox,代码行数:7,代码来源:CrmUserPickerForm.cs


示例17: Mouse_Move

        public override void Mouse_Move(MouseEventArgs e)
        {
            _endMouseRay = Editor.Camera.GetWorldRay(new Vector2(e.X, e.Y));
            if (!_startSet)
            {
                _startPositions.Clear();
                foreach (var control in Editor.Selection)
                {
                    _startPositions.Add(control, control.Position);
                }
                _startMouseRay = _endMouseRay;
                _cameraPlane = new Plane(Editor.Camera.LookAt, Editor.Camera.LookAt + Editor.Camera.Right, Editor.Camera.LookAt + Editor.Camera.UpEffective);
                _startSet = true;
            }

            float? distanceStart, distance;
            _startMouseRay.Intersects(ref _cameraPlane, out distanceStart);
            _endMouseRay.Intersects(ref _cameraPlane, out distance);

            if (distanceStart != null && distance != null)
            {
                var deltaMouse = (_endMouseRay.Position + Vector3.Multiply(_endMouseRay.Direction, distance.Value))
                    - (_startMouseRay.Position + Vector3.Multiply(_startMouseRay.Direction, distanceStart.Value));

                foreach (var control in Editor.Selection)
                {
                    control.Position = _startPositions[control] + deltaMouse;
                }
            }
        }
开发者ID:Tokter,项目名称:TokED,代码行数:30,代码来源:MoveSelected.cs


示例18: zarzadzaniePracownicyListBox_MouseDoubleClick

        private void zarzadzaniePracownicyListBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = zarzadzaniePracownicyListBox.HitTest(e.X, e.Y);
            ListViewItem item = info.Item;

            if (item != null)
            {
                var employee = item.Tag as Employee;
                var employeeForm = new EmployeeForm(employee);
                if (employeeForm.ShowDialog(this) == DialogResult.OK)
                {

                    AsyncTaskRunner task = new AsyncTaskRunner(
                        new Task(
                            () =>
                            {
                                Zarzadzanie_UpdateEmployee(employee);
                            }),
                            () =>
                            {
                                MessageBox.Show("Zaktualizowano dane pracownika: " + employee.Login, "Sukces",
                                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                                Zarzadzanie_UpdatePracownicyListBox();
                            });
                    task.StartInTransaction();
                }

            }
        }
开发者ID:Bajena,项目名称:aptekanet,代码行数:30,代码来源:MainForm_Zarzadzanie.cs


示例19: OnMouseUp

 public override bool OnMouseUp(MouseEventArgs e, KeyModifier eKeyMod, int iOldX, int iOldY)
 {
     base.OnMouseUp(e, eKeyMod, iOldX, iOldY);
       if (e.Button == MouseButtons.Left)// && eKeyMod != KeyModifier.None)
     HandleClick();
       return true;
 }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:7,代码来源:MeasureTool.cs


示例20: BlobTreeMouseUp

        private void BlobTreeMouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                currentNode = blobTree.GetNodeAt(e.X, e.Y);

                if (currentNode != null)
                {
                    if (currentNode is BlobTreeNode)
                        blobContextMenu.Show(blobTree, e.Location);
                    else if (currentNode is ContainerTreeNode)
                    {
                        CloudBlobContainer containerRef = (currentNode as ContainerTreeNode).Container;
                        BlobContainerPermissions containerPermissions = containerRef.GetPermissions();

                        privateToolStripMenuItem.Checked = (containerPermissions.PublicAccess ==
                                                            BlobContainerPublicAccessType.Off);
                        publicBlobsToolStripMenuItem.Checked = (containerPermissions.PublicAccess ==
                                                                BlobContainerPublicAccessType.Blob);
                        publicContainerToolStripMenuItem.Checked = (containerPermissions.PublicAccess ==
                                                                    BlobContainerPublicAccessType.Container);

                        containerContextMenu.Show(blobTree, e.Location);
                    }
                }
            }
        }
开发者ID:caseywatson,项目名称:AzureStorageDemo,代码行数:27,代码来源:Form1.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.Msg类代码示例发布时间:2022-05-26
下一篇:
C# Forms.MonthCalendar类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap