當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。