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


C# Forms.MouseEventArgs类代码示例

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


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


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