1018 references to MouseButtons
System.Windows.Forms (201)
System\Windows\Forms\ActiveX\AxHost.cs (3)
3858base.OnMouseMove(new MouseEventArgs((MouseButtons)(button << 20), 1, x, y, 0)); 3876base.OnMouseUp(new MouseEventArgs((MouseButtons)(button << 20), 1, x, y, 0)); 3894base.OnMouseDown(new MouseEventArgs((MouseButtons)(button << 20), 1, x, y, 0));
System\Windows\Forms\Control.cs (26)
2537public static MouseButtons MouseButtons 2541MouseButtons buttons = default; 2545buttons |= MouseButtons.Left; 2550buttons |= MouseButtons.Right; 2555buttons |= MouseButtons.Middle; 2560buttons |= MouseButtons.XButton1; 2565buttons |= MouseButtons.XButton2; 5301private static MouseButtons GetXButton(int wparam) => wparam switch 5303PInvoke.XBUTTON1 => MouseButtons.XButton1, 5304PInvoke.XBUTTON2 => MouseButtons.XButton2, 5305_ => MouseButtons.None, 11346private void WmMouseDown(ref Message m, MouseButtons button, int clicks) 11351MouseButtons realState = MouseButtons; 11369if (button == MouseButtons.Left && GetStyle(ControlStyles.Selectable)) 11522private void WmMouseUp(ref Message m, MouseButtons button, int clicks) 11538if (button == MouseButtons.Right) 11584MouseButtons.None, 12330WmMouseDown(ref m, MouseButtons.Left, 2); 12339WmMouseDown(ref m, MouseButtons.Left, 1); 12343WmMouseUp(ref m, MouseButtons.Left, 1); 12347WmMouseDown(ref m, MouseButtons.Middle, 2); 12356WmMouseDown(ref m, MouseButtons.Middle, 1); 12360WmMouseUp(ref m, MouseButtons.Middle, 1); 12423WmMouseDown(ref m, MouseButtons.Right, 2); 12432WmMouseDown(ref m, MouseButtons.Right, 1); 12436WmMouseUp(ref m, MouseButtons.Right, 1);
System\Windows\Forms\Controls\Buttons\Button.cs (1)
220if (mevent.Button == MouseButtons.Left && MouseIsPressed)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (2)
869if (mevent.Button != MouseButtons.None && GetFlag(FlagMousePressed)) 900if (mevent.Button == MouseButtons.Left)
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
488if (mevent.Button == MouseButtons.Left
System\Windows\Forms\Controls\Buttons\RadioButton.cs (2)
369if (MouseButtons == MouseButtons.None) 469if (mevent.Button == MouseButtons.Left
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (13)
1593OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptlc.X, Ptlc.Y, 0)); 1610OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, Ptmc.X, Ptmc.Y, 0)); 1627OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Ptrc.X, Ptrc.Y, 0)); 1641OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptl.X, Ptl.Y, 0)); 1657OnClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 1658OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 1673OnMouseUp(new MouseEventArgs(MouseButtons.Left, 1, EditToComboboxMapping(m))); 1686OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, P.X, P.Y, 0)); 1703OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Pt.X, Pt.Y, 0)); 1712OnMouseUp(new MouseEventArgs(MouseButtons.Middle, 1, PARAM.ToPoint(m.LParamInternal))); 1723OnMouseUp(new MouseEventArgs(MouseButtons.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0)); 3711OnClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 3712OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal)));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (15)
5820if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5881if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5889if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 11898if (!_dataGridViewState2[State2_MessageFromEditingCtrls] && e.Button == MouseButtons.Left) 11942if (!_dataGridViewState2[State2_MessageFromEditingCtrls] && e.Button == MouseButtons.Left) 12668&& e.Button == MouseButtons.Left 13452if (!e.Handled && e.Button == MouseButtons.Left && e.ColumnIndex < Columns.Count) 13627if (e.Button == MouseButtons.Left 14938&& me.Button == MouseButtons.Left) 15859&& (e.Button != MouseButtons.Left 15877if (e.Button == MouseButtons.Left) 16444if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons != MouseButtons.None) 17604if (!e.Handled && e.Button == MouseButtons.Left && e.RowIndex < Rows.Count) 26233if (MouseButtons != MouseButtons.None) 26348if (MouseButtons != MouseButtons.None)
System\Windows\Forms\Controls\DataGridView\DataGridView.MouseClickInfo.cs (1)
10public MouseButtons Button;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
446e.Button == MouseButtons.Left; 455e.Button == MouseButtons.Left; 517if (e.Button == MouseButtons.Left && s_mouseInContentBounds) 568Control.MouseButtons == MouseButtons.Left) 593if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3038if (e.Button == MouseButtons.Left && GetContentBounds(e.RowIndex).Contains(x, y))
System\Windows\Forms\Controls\DataGridView\DataGridViewCellMouseEventArgs.cs (1)
14: base(e?.Button ?? MouseButtons.None, e?.Clicks ?? 0, localX, localY, e?.Delta ?? 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (5)
761protected override bool MouseDownUnsharesRow(DataGridViewCellMouseEventArgs e) => e.Button == MouseButtons.Left; 771protected override bool MouseUpUnsharesRow(DataGridViewCellMouseEventArgs e) => e.Button == MouseButtons.Left; 866if (e.Button == MouseButtons.Left && s_mouseInContentBounds) 917Control.MouseButtons == MouseButtons.Left) 942if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnDividerDoubleClickEventArgs.cs (1)
9: base(e?.Button ?? MouseButtons.None, e?.Clicks ?? 0, e?.X ?? 0, e?.Y ?? 0, e?.Delta ?? 0, e?.Handled ?? false)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (5)
429DataGridView is not null && e.Button == MouseButtons.Left && DataGridView.ApplyVisualStylesToHeaderCells; 441DataGridView is not null && e.Button == MouseButtons.Left && DataGridView.ApplyVisualStylesToHeaderCells; 450if (e.Button == MouseButtons.Left && 470Control.MouseButtons == MouseButtons.Left && 508if (e.Button == MouseButtons.Left && DataGridView.ApplyVisualStylesToHeaderCells)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
579if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex && e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\Labels\LinkLabelLinkClickedEventArgs.cs (3)
15: this(link, MouseButtons.Left) 19public LinkLabelLinkClickedEventArgs(LinkLabel.Link? link, MouseButtons button) 33public MouseButtons Button { get; }
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
2426OnClick(new MouseEventArgs(MouseButtons.Left, 1, point)); 2427OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, point)); 2437OnDoubleClick(new MouseEventArgs(MouseButtons.Left, 2, point)); 2438OnMouseDoubleClick(new MouseEventArgs(MouseButtons.Left, 2, point));
System\Windows\Forms\Controls\ListView\ListView.cs (18)
117private MouseButtons _downButton; 5876private void WmMouseDown(ref Message m, MouseButtons button, int clicks) 5967if (m.LParamInternal != 0 && MouseButtons == MouseButtons.None) 6503OnItemDrag(new ItemDragEventArgs(MouseButtons.Left, item)); 6518OnItemDrag(new ItemDragEventArgs(MouseButtons.Right, item)); 6645MouseButtons button = nmhdr->code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 6945WmMouseDown(ref m, MouseButtons.Left, 2); 6961WmMouseDown(ref m, MouseButtons.Left, 1); 6968_downButton = MouseButtons.Left; 6997WmMouseDown(ref m, MouseButtons.Middle, 2); 7000WmMouseDown(ref m, MouseButtons.Middle, 1); 7001_downButton = MouseButtons.Middle; 7004WmMouseDown(ref m, MouseButtons.Right, 2); 7007WmMouseDown(ref m, MouseButtons.Right, 1); 7008_downButton = MouseButtons.Right; 7011if (_listViewState[LISTVIEWSTATE_expectingMouseUp] && !_listViewState[LISTVIEWSTATE_mouseUpFired] && MouseButtons == MouseButtons.None)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2770if (target is not null && me.Button == MouseButtons.Left)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
1982public virtual bool OnMouseClick(int x, int y, int count, MouseButtons button) 1989if ((button & MouseButtons.Left) != MouseButtons.Left)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (3)
479public override bool OnMouseClick(int x, int y, int count, MouseButtons button) 484&& ((button & MouseButtons.Left) == MouseButtons.Left)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
2946if (e.Button == MouseButtons.Left && SplitterInside(e.X) && TotalProperties != 0) 2985if (e.Button == MouseButtons.Left) 3118if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons != MouseButtons.None)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
392if (e.Button == MouseButtons.Left) 494if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (7)
87MouseButtons mouseButtons = MouseButtons; 97if ((mouseButtons & MouseButtons.Left) == MouseButtons.Left) 102if ((mouseButtons & MouseButtons.Right) == MouseButtons.Right) 107if ((mouseButtons & MouseButtons.Middle) == MouseButtons.Middle)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
813if (e.Button == MouseButtons.Left && e.Clicks == 1)
System\Windows\Forms\Controls\TextBox\TextBox.cs (2)
589if (SelectionLength == 0 && MouseButtons == MouseButtons.None) 919MouseButtons realState = MouseButtons;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1472if (mevent is not null && mevent.Button == MouseButtons.Left)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
132(e.Button == MouseButtons.Left)) 153(e.Button == MouseButtons.Left))
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
106return (Control.MouseButtons == MouseButtons.Left) && (Control.ModifierKeys == Keys.None);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
2553if (e.Button == MouseButtons.Left) 2581if (e.Button == MouseButtons.Left || (e.Button == MouseButtons.Right && _state[s_stateSupportsRightClick]))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
871if (e.Button == MouseButtons.Left || 872(e.Button == MouseButtons.Right && SupportsRightClick))
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (3)
423if (e.Button == MouseButtons.Left) 450if (e.Button == MouseButtons.Left) 467if ((e.Button == MouseButtons.Left) && SplitButtonButton.Bounds.Contains(clickPoint))
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
925if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons != MouseButtons.None)
System\Windows\Forms\Controls\TreeView\TreeNodeMouseClickEventArgs.cs (1)
14MouseButtons button,
System\Windows\Forms\Controls\TreeView\TreeView.cs (19)
132private MouseButtons _downButton; 2417private unsafe void TvnBeginDrag(MouseButtons buttons, NMTREEVIEWW* nmtv) 2681private void WmMouseDown(ref Message m, MouseButtons button, int clicks) 3014TvnBeginDrag(MouseButtons.Left, nmtv); 3017TvnBeginDrag(MouseButtons.Right, nmtv); 3027MouseButtons button = MouseButtons.Left; 3037button = nmtv->hdr.code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 3246WmMouseDown(ref m, MouseButtons.Left, 2); 3282OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 3298WmMouseDown(ref m, MouseButtons.Left, 1); 3301_downButton = MouseButtons.Left; 3357WmMouseDown(ref m, MouseButtons.Middle, 2); 3362WmMouseDown(ref m, MouseButtons.Middle, 1); 3363_downButton = MouseButtons.Middle; 3372WmMouseDown(ref m, MouseButtons.Right, 2); 3395WmMouseDown(ref m, MouseButtons.Right, 1); 3396_downButton = MouseButtons.Right;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (3)
681if (e.Clicks == 2 && e.Button == MouseButtons.Left) 694if (mevent.Button == MouseButtons.Left) 733if ((ModifierKeys & (Keys.Shift | Keys.Alt)) != 0 || MouseButtons != MouseButtons.None)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
116if (!_parent.ValidationCancelled && e.Button == MouseButtons.Left) 121if (e.Clicks == 2 && e.Button == MouseButtons.Left) 213if (!_parent.ValidationCancelled && e.Button == MouseButtons.Left) 224if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (2)
44if (e.Clicks == 2 && e.Button == MouseButtons.Left) 64if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\WebBrowser\HtmlElementEventArgs.cs (6)
24public MouseButtons MouseButtonsPressed 28MouseButtons buttons = MouseButtons.None; 32buttons |= MouseButtons.Left; 37buttons |= MouseButtons.Right; 42buttons |= MouseButtons.Middle;
System\Windows\Forms\Form.cs (1)
7113if (Capture && MouseButtons == MouseButtons.None)
System\Windows\Forms\Help\HelpProvider.cs (1)
123if (Control.MouseButtons != MouseButtons.None && !string.IsNullOrEmpty(helpString))
System\Windows\Forms\Input\HandledMouseEventArgs.cs (3)
10public HandledMouseEventArgs(MouseButtons button, int clicks, int x, int y, int delta) 15internal HandledMouseEventArgs(MouseButtons button, int clicks, Point location, int delta) 20public HandledMouseEventArgs(MouseButtons button, int clicks, int x, int y, int delta, bool defaultHandledValue)
System\Windows\Forms\Input\MouseEventArgs.cs (3)
17public MouseEventArgs(MouseButtons button, int clicks, int x, int y, int delta) 29internal MouseEventArgs(MouseButtons button, int clicks, Point location, int delta = 0) 41public MouseButtons Button { get; }
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1142if (e.Button == MouseButtons.Left && e.Clicks == 1 && !IsSplitterFixed)
System\Windows\Forms\NotifyIcon.cs (11)
685private void WmMouseDown(MouseButtons button, int clicks) 708private void WmMouseUp(MouseButtons button) 735WmMouseDown(MouseButtons.Left, 2); 738WmMouseDown(MouseButtons.Left, 1); 741WmMouseUp(MouseButtons.Left); 744WmMouseDown(MouseButtons.Middle, 2); 747WmMouseDown(MouseButtons.Middle, 1); 750WmMouseUp(MouseButtons.Middle); 756WmMouseDown(MouseButtons.Right, 2); 759WmMouseDown(MouseButtons.Right, 1); 767WmMouseUp(MouseButtons.Right);
System\Windows\Forms\OLE\ItemDragEventArgs.cs (3)
11public ItemDragEventArgs(MouseButtons button) 16public ItemDragEventArgs(MouseButtons button, object? item) 22public MouseButtons Button { get; }
System.Windows.Forms.Design (84)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
258if (e.Button == MouseButtons.Left)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (2)
25if (e.Button == MouseButtons.Left) 47if (e.Button == MouseButtons.Left)
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
157if (e.Button == MouseButtons.Left)
System\Drawing\Design\ColorEditor.ColorPalette.cs (4)
308if (me.Button == MouseButtons.Left) 322if (me.Button == MouseButtons.Left && Bounds.Contains(me.X, me.Y)) 337if (me.Button == MouseButtons.Left) 347else if (me.Button == MouseButtons.Right)
System\Windows\Forms\Design\Behavior\Behavior.cs (4)
126public virtual bool OnMouseDoubleClick(Glyph? g, MouseButtons button, Point mouseLoc) 148public virtual bool OnMouseDown(Glyph? g, MouseButtons button, Point mouseLoc) 229public virtual bool OnMouseMove(Glyph? g, MouseButtons button, Point mouseLoc) 252public virtual bool OnMouseUp(Glyph? g, MouseButtons button)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (6)
350if (_behaviorService.OnMouseDown(MouseButtons.Left, mouseLoc)) 358if (_behaviorService.OnMouseDown(MouseButtons.Right, mouseLoc)) 374if (_behaviorService.OnMouseUp(MouseButtons.Left)) 382if (_behaviorService.OnMouseUp(MouseButtons.Right)) 398if (_behaviorService.OnMouseDoubleClick(MouseButtons.Left, mouseLoc)) 406if (_behaviorService.OnMouseDoubleClick(MouseButtons.Right, mouseLoc))
System\Windows\Forms\Design\Behavior\BehaviorService.cs (4)
669private bool OnMouseDoubleClick(MouseButtons button, Point mouseLoc) 672private bool OnMouseDown(MouseButtons button, Point mouseLoc) 687private bool OnMouseMove(MouseButtons button, Point mouseLoc) 694private bool OnMouseUp(MouseButtons button)
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (5)
89public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 91if (button == MouseButtons.Left) 168public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc) 170if (button == MouseButtons.Left && OkToMove) 193public override bool OnMouseUp(Glyph g, MouseButtons button)
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (4)
91public override bool OnMouseDoubleClick(Glyph? g, MouseButtons button, Point mouseLoc) 97public override bool OnMouseDown(Glyph? g, MouseButtons button, Point mouseLoc) 108public override bool OnMouseUp(Glyph? g, MouseButtons button) 110if (button != MouseButtons.Left)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (4)
290public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 293if (button != MouseButtons.Left) 457public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc) 905public override bool OnMouseUp(Glyph g, MouseButtons button)
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (4)
87public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 90if (button == MouseButtons.Left && g is TableLayoutPanelResizeGlyph) 239public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc) 387public override bool OnMouseUp(Glyph g, MouseButtons button)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
302public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (2)
74public override bool OnMouseDown(Glyph? glyph, MouseButtons button, Point screenCoordinates) 76if (button != MouseButtons.Left || !(glyph is ToolStripPanelSelectionGlyph selectionGlyph))
System\Windows\Forms\Design\ComponentTray.cs (4)
1232if (e.Button == MouseButtons.Left && _toolboxService is not null) 1263if (e.Button == MouseButtons.Left) 1330if (_mouseDragStart != InvalidPoint && e.Button == MouseButtons.Left) 2158if (me.Button == MouseButtons.Left)
System\Windows\Forms\Design\ControlDesigner.cs (17)
1790MouseButtons button = MouseButtons.None; 1849? MouseButtons.Right 1850: MouseButtons.Left; 1852if (button == MouseButtons.Left) 1872? MouseButtons.Right 1873: MouseButtons.Left; 1880if (button == MouseButtons.Left && IsDoubleClick(location.X, location.Y)) 1894if (!EnableDragRect && button == MouseButtons.Left) 1923else if (button == MouseButtons.Left) 1927else if (button == MouseButtons.Right) 1944button = MouseButtons.Left; 1948button = MouseButtons.Right; 1972else if (button == MouseButtons.Left) 1995? MouseButtons.Right 1996: MouseButtons.Left; 2016if (button == MouseButtons.Left)
System\Windows\Forms\Design\IMouseHandler.cs (2)
22void OnMouseDown(IComponent component, MouseButtons button, int x, int y); 37void OnMouseUp(IComponent component, MouseButtons button);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
452if ((rules & SelectionRules.AllSizeable) != SelectionRules.None || Control.MouseButtons == MouseButtons.None)
System\Windows\Forms\Design\SelectionUIService.cs (2)
534else if (hitTest != SelectionUIItem.NOHIT && me.Button == MouseButtons.Left) 735if (me.Button == MouseButtons.Right && oldContainerDrag is not null && !oldDragMoved)
System\Windows\Forms\Design\TabOrder.cs (2)
559public virtual void OnMouseDown(IComponent component, MouseButtons button, int x, int y) 634public virtual void OnMouseUp(IComponent component, MouseButtons button)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (2)
752public override bool OnMouseUp(Glyph g, MouseButtons button) => button == MouseButtons.Left;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (9)
207public override bool OnMouseDoubleClick(Glyph g, MouseButtons button, Point mouseLoc) 218public override bool OnMouseUp(Glyph g, MouseButtons button) 230if (glyph is not null && button == MouseButtons.Left) 277public override bool OnMouseDown(Glyph g, MouseButtons button, Point mouseLoc) 284if ((button == MouseButtons.Left) && (keyService is not null) && (keyService.TemplateNodeActive)) 333if (glyph is not null && button == MouseButtons.Left) 457if (glyph is not null && button == MouseButtons.Right) 527public override bool OnMouseMove(Glyph g, MouseButtons button, Point mouseLoc) 544if (button == MouseButtons.Left && glyph is not null && glyph.ItemDesigner is not null && !glyph.ItemDesigner.IsEditorActive)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
276_behavior?.OnMouseDown(_containerSelectorGlyph, MouseButtons.Left, Point.Empty);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
461if (e.Button == MouseButtons.Right) 1152if (e.Button == MouseButtons.Right)
System.Windows.Forms.Tests (705)
CheckedListBoxTests.cs (1)
790MouseEventArgs eventArgs = new(MouseButtons.Left, 1, 0, 0, 0);
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (1)
57button.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\ButtonBaseTests.cs (143)
5544control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5648control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5729control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5813control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5918control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6008control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6017control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6096yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 6097yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 6098yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 6099yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 6100yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 6101yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 6102yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 6103yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 6104yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 6145yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0), 0 }; 6146yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 1 }; 6147yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 6148yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 1 }; 6149yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 6150yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 1 }; 6151yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 6152yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 1 }; 6153yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 6509yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 6510yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 6511yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 6512yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 6513yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 6514yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 6515yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 6516yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 6517yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 6518yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0) }; 6519yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0) }; 6563control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6594control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6623yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0), 0 }; 6624yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 0 }; 6625yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 6626yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 0 }; 6627yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 6628yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 0 }; 6629yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 6630yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 0 }; 6631yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 6632yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0), 0 }; 6633yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0), 0 }; 6687yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0), 0 }; 6688yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 0 }; 6689yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 6690yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 0 }; 6691yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 6692yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 0 }; 6693yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 6694yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 0 }; 6695yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 6696yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0), 1 }; 6697yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0), 1 }; 6698yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, -1, 0), 1 }; 6699yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, int.MaxValue, int.MaxValue, 0), 1 }; 6713control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6754yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0), 0 }; 6755yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 1 }; 6756yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 1 }; 6757yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 1 }; 6758yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 1 }; 6759yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 1 }; 6760yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 1 }; 6761yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 1 }; 6762yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 1 }; 6763yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, 0, 0), 0 }; 6764yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, -1, 0), 0 }; 6765yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, -1, -1, 0), 0 }; 6766yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Right, 3, int.MaxValue, int.MaxValue, 0), 0 }; 6780control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6828yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 6829yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 6830yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 6831yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 6832yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 6833yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 6834yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 6835yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 7642control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7673control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7705control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7791control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7833control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7876control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7967control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8003control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8040control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8136control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8183control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8231control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8472control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8508control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8545control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8641control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8688control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8736control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8826yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 8827yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 8828yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 8829yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 8830yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 8831yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 8833yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 8834yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 8835yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 8836yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 8837yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 8838yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 8840yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 8841yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 8842yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 8843yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 8844yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 8845yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 8847yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 8848yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 8849yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 8850yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 8851yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 8852yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 8854yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 8855yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 8856yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 8857yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 8858yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 8859yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 8861yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 8862yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 8863yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 8864yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 8865yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 8866yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 8871public void ButtonBase_WndProc_InvokeMouseUpWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 8906public void ButtonBase_WndProc_InvokeMouseUpWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 8971public void ButtonBase_WndProc_InvokeMouseUpWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 9014public void ButtonBase_WndProc_InvokeMouseUpWithHandleNotSelectable_DoesNotCallMouseUp(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY)
System\Windows\Forms\ButtonTests.cs (45)
1059control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 2250yield return new object[] { enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 2251yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 2252yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 2253yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 2254yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 2255yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 2256yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 2257yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 2258yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 2295yield return new object[] { enabled, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0), 0 }; 2296yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 1 }; 2297yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), 0 }; 2298yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 1 }; 2299yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), 0 }; 2300yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 1 }; 2301yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), 0 }; 2302yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 1 }; 2303yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), 0 }; 2643yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 2644yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 2645yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 2646yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 2647yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 2648yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 2649yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 2650yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 2695yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4), false }; 2696yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true }; 2697yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), false }; 2698yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 2699yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4), false }; 2700yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true }; 2701yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), false }; 2702yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 2714control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 2799yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4), 0 }; 2800yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedCallCount }; 2801yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), 0 }; 2802yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), 0 }; 2803yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4), 0 }; 2804yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedCallCount }; 2805yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), 0 }; 2806yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), 0 }; 2818control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\CheckBoxTests.cs (1)
822MouseEventArgs eventArgs = new(MouseButtons.Left, 1, new Point(0, 0), 0);
System\Windows\Forms\ComboBoxTests.cs (1)
2776public void OnMouseDown(Point p) => base.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, p.X, p.Y, 0));
System\Windows\Forms\ControlTests.Handlers.cs (1)
3628HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4);
System\Windows\Forms\ControlTests.Methods.cs (116)
13379yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 13380yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 13381yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 13382yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 13383yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 13384yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 13386yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 0, 0 }; 13387yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 1, 2 }; 13388yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, -1, -2 }; 13389yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 0, 0 }; 13390yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 1, 2 }; 13391yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, -1, -2 }; 13393yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 13394yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 13395yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 13396yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 13397yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 13398yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 13400yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 0, 0 }; 13401yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 1, 2 }; 13402yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, -1, -2 }; 13403yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 0, 0 }; 13404yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 1, 2 }; 13405yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, -1, -2 }; 13407yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 13408yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 13409yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 13410yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 13411yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 13412yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 13414yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 0, 0 }; 13415yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 1, 2 }; 13416yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, -1, -2 }; 13417yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 0, 0 }; 13418yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 1, 2 }; 13419yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, -1, -2 }; 13421yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 13422yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 13423yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 13424yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 13425yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 13426yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 13428yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 13429yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 13430yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 13431yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 13432yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 13433yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 13435yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 13436yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 13437yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 13438yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 13439yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 13440yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 13442yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 0, 0 }; 13443yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 1, 2 }; 13444yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, -1, -2 }; 13445yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 0, 0 }; 13446yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 1, 2 }; 13447yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, -1, -2 }; 13449yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 0, 0 }; 13450yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 1, 2 }; 13451yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, -1, -2 }; 13452yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 0, 0 }; 13453yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 1, 2 }; 13454yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, -1, -2 }; 13456yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 0, 0 }; 13457yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 1, 2 }; 13458yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, -1, -2 }; 13459yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 0, 0 }; 13460yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 1, 2 }; 13461yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, -1, -2 }; 13466public void Control_WndProc_InvokeMouseDownWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13501public void Control_WndProc_InvokeMouseDownWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13570public void Control_WndProc_InvokeMouseDownWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13613public void Control_WndProc_InvokeMouseDownWithHandleNotSelectable_DoesNotCallMouseDown(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13756yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 13757yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 13758yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 13759yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 13760yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 13761yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 13763yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 13764yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 13765yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 13766yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 13767yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 13768yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 13770yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 13771yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 13772yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 13773yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 13774yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 13775yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 13777yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 13778yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 13779yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 13780yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 13781yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 13782yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 13784yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 13785yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 13786yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 13787yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 13788yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 13789yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 13791yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 13792yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 13793yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 13794yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 13795yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 13796yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 13801public void Control_WndProc_InvokeMouseUpWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13836public void Control_WndProc_InvokeMouseUpWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13901public void Control_WndProc_InvokeMouseUpWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13944public void Control_WndProc_InvokeMouseUpWithHandleNotSelectable_DoesNotCallMouseUp(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY)
System\Windows\Forms\ControlTests.Properties.cs (13)
9259[InlineData(0, 0, 0, 0, 0, MouseButtons.None)] 9260[InlineData(1, 2, 3, 4, 5, MouseButtons.None)] 9261[InlineData(byte.MaxValue, 0, 0, 0, 0, MouseButtons.Left)] 9262[InlineData(0, byte.MaxValue, 0, 0, 0, MouseButtons.Middle)] 9263[InlineData(0, 0, byte.MaxValue, 0, 0, MouseButtons.Right)] 9264[InlineData(0, 0, 0, byte.MaxValue, 0, MouseButtons.XButton1)] 9265[InlineData(0, 0, 0, 0, byte.MaxValue, MouseButtons.XButton2)] 9266[InlineData(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, MouseButtons.Left | MouseButtons.Middle | MouseButtons.Right | MouseButtons.XButton1 | MouseButtons.XButton2)] 9267public unsafe void MouseButtons_Get_ReturnsExpected(byte lState, byte mState, byte rState, byte xState1, byte xState2, MouseButtons expected)
System\Windows\Forms\DataGridViewCellMouseEventArgsTests.cs (5)
11yield return new object[] { -1, -1, -1, -1, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 12yield return new object[] { 0, 0, 0, 0, new MouseEventArgs((MouseButtons)1, 0, 0, 0, 0) }; 13yield return new object[] { 1, 2, 3, 4, new MouseEventArgs((MouseButtons)3, -1, -1, -1, -2) }; 34Assert.Throws<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellMouseEventArgs(-2, 0, 1, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4))); 41Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellMouseEventArgs(0, -2, 1, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4)));
System\Windows\Forms\DataGridViewCellTests.cs (38)
5497yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5498yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5499yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5500yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5501yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5502yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5503yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5504yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5505yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5506yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5507yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5508yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5509yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5510yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5511yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5512yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5513yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5514yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5530yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5531yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5532yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5533yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5534yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5535yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5536yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5537yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5538yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5539yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5540yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5541yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5542yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5543yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5544yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 5545yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 5546yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5547yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 6475cell.MouseClick(new DataGridViewCellMouseEventArgs(0, 0, 10, 10, new MouseEventArgs(MouseButtons.Left, 1, 10, 10, 0))); 6483cell.MouseClick(new DataGridViewCellMouseEventArgs(0, 0, 10, 10, new MouseEventArgs(MouseButtons.Left, 1, 10, 10, 0)));
System\Windows\Forms\DataGridViewColumnDividerDoubleClickEventArgsTests.cs (4)
11yield return new object[] { -1, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true) }; 12yield return new object[] { 0, new HandledMouseEventArgs((MouseButtons)1, 0, 0, 0, 0, true) }; 13yield return new object[] { 1, new HandledMouseEventArgs((MouseButtons)3, -1, -1, -1, -2, false) }; 34Assert.Throws<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewColumnDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true)));
System\Windows\Forms\DataGridViewHeaderCellTests.cs (115)
3811yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 3813yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 3814yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 3816yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 3817yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 3819yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 3820yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 3822yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 3823yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 3825yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 3826yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 3828yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 3844yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), false }; 3845yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3846yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), false }; 3847yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), false }; 3848yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3849yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), false }; 3850yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), false }; 3851yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3852yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), false }; 3853yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), false }; 3854yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3855yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), false }; 3856yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), false }; 3857yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3858yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), false }; 3859yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), false }; 3860yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3861yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), false }; 3899yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3900yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3901yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3902yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3903yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3904yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4039cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4107yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4108yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4109yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4110yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4111yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4112yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4113yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4114yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4115yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4116yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4117yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4118yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4119yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4120yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4121yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4122yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4123yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4124yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4140yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4141yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4142yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4143yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4144yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4145yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4146yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4147yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4148yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4149yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4150yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4151yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4152yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4153yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles ? ButtonState.Pushed : ButtonState.Normal }; 4154yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4155yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), ButtonState.Normal }; 4156yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), ButtonState.Normal }; 4159yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.Normal }; 4213DataGridViewCellMouseEventArgs e = new(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)); 4398cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4428cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4447yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4448yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4449yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4450yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4451yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4452yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4453yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4454yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4455yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4456yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4457yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4458yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4459yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4460yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4461yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4462yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)) }; 4463yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)) }; 4467yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4512DataGridViewCellMouseEventArgs e = new(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)); 4522yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), expectedButtonState1 }; 4523yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4524yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), expectedButtonState1 }; 4525yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), expectedButtonState1 }; 4526yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4527yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), expectedButtonState1 }; 4528yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), expectedButtonState1 }; 4529yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4530yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), expectedButtonState1 }; 4531yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), expectedButtonState1 }; 4532yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4533yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), expectedButtonState1 }; 4534yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), expectedButtonState1 }; 4535yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4536yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), expectedButtonState1 }; 4537yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)), expectedButtonState1 }; 4538yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Middle, 0, 0, 0, 0)), expectedButtonState1 }; 4541yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.Normal }; 4569cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4596DataGridViewCellMouseEventArgs e = new(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0));
System\Windows\Forms\DataGridViewRowDividerDoubleClickEventArgsTests.cs (4)
11yield return new object[] { -1, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true) }; 12yield return new object[] { 0, new HandledMouseEventArgs((MouseButtons)1, 0, 0, 0, 0, true) }; 13yield return new object[] { 1, new HandledMouseEventArgs((MouseButtons)3, -1, -1, -1, -2, false) }; 34Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewRowDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true)));
System\Windows\Forms\DataGridViewTests.cs (10)
3742DataGridViewCellMouseEventArgs args = new(0, 0, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3747args = new(0, 1, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3769DataGridViewCellMouseEventArgs args = new(0, 0, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0)); 3774args = new(0, 1, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0)); 3795DataGridViewColumnDividerDoubleClickEventArgs args = new(0, new(MouseButtons.Left, 2, 0, 0, 0)); 3800args = new(1, new(MouseButtons.Left, 2, 0, 0, 0)); 3821DataGridViewCellMouseEventArgs args = new(0, -1, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3826args = new(1, -1, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3847DataGridViewCellMouseEventArgs args = new(0, -1, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0)); 3852args = new(1, -1, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0));
System\Windows\Forms\DateTimePickerTests.cs (4)
573control.OnMouseClick(new(MouseButtons.Left, 1, 0, 0, 0)); 577control.OnMouseClick(new(MouseButtons.Left, 1, 0, 0, 0)); 594control.OnMouseDoubleClick(new(MouseButtons.Left, 1, 0, 0, 0)); 598control.OnMouseDoubleClick(new(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\HandledMouseEventArgsTests.cs (8)
12[InlineData(MouseButtons.Left, 1, 2, 3, 4)] 13[InlineData((MouseButtons)1, 0, 0, 0, 0)] 14[InlineData((MouseButtons)3, -1, -1, -1, -2)] 15public void Ctor_MouseButtons_Int_Int_Int_Int(MouseButtons button, int clicks, int x, int y, int delta) 28[InlineData(MouseButtons.Left, 1, 2, 3, 4, true)] 29[InlineData((MouseButtons)1, 0, 0, 0, 0, true)] 30[InlineData((MouseButtons)3, -1, -1, -1, -2, false)] 31public void Ctor_MouseButtons_Int_Int_Int_Int_Bool(MouseButtons button, int clicks, int x, int y, int delta, bool handled)
System\Windows\Forms\ItemDragEventArgsTests.cs (6)
10[InlineData(MouseButtons.Left)] 11[InlineData((MouseButtons.None - 1))] 12public void Ctor_MouseButtons(MouseButtons button) 20[InlineData(MouseButtons.Left, 1)] 21[InlineData((MouseButtons.None - 1), null)] 22public void Ctor_MouseButtons_Object(MouseButtons button, object item)
System\Windows\Forms\LinkLabelLinkClickedEventArgsTests.cs (5)
21Assert.Equal(MouseButtons.Left, e.Button); 26yield return new object[] { null, (MouseButtons)1 }; 27yield return new object[] { new LinkLabel.Link(), MouseButtons.Left }; 28yield return new object[] { new LinkLabel.Link(), MouseButtons.None }; 33public void Ctor_LinkLabelLink_MouseButtons(LinkLabel.Link link, MouseButtons button)
System\Windows\Forms\MouseEventArgsTests.cs (4)
12[InlineData(MouseButtons.Left, 1, 2, 3, 4)] 13[InlineData((MouseButtons)1, 0, 0, 0, 0)] 14[InlineData((MouseButtons)3, -1, -1, -1, -2)] 15public void Ctor_MouseButtons_Int_Int_Int_Int(MouseButtons button, int clicks, int x, int y, int delta)
System\Windows\Forms\PropertyGridTests.cs (18)
3701yield return new object[] { new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0), false }; 3702yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), true }; 3703yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0), false }; 3704yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), true }; 3705yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0), false }; 3706yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), true }; 3707yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0), false }; 3708yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), true }; 3709yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0), false }; 3802yield return new object[] { new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 3803yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 3804yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 3805yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 3806yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 3807yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 3808yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 3809yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 3810yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) };
System\Windows\Forms\RadioButtonTests.cs (26)
1048yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 1049yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1050yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 1051yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1052yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 1053yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1054yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 1055yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1101yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4), false }; 1102yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedIsHandleCreated }; 1103yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), false }; 1104yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 1105yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4), false }; 1106yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedIsHandleCreated }; 1107yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), false }; 1108yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4), false }; 1120control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 1204yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 1205yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1206yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 1207yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1208yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.None, 1, 2, 3, 4) }; 1209yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1210yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 1211yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Right, 1, 2, 3, 4) }; 1223control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\ScrollBarTests.cs (2)
2211HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4); 2478MouseEventArgs eventArgs = new(MouseButtons.Left, 0, 0, 0, delta);
System\Windows\Forms\SplitterTests.cs (8)
1955yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 2, 3, 4) }; 1956yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1957yield return new object[] { new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4) }; 1958yield return new object[] { new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1997yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 2, 3, 4), false }; 1998yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true }; 1999yield return new object[] { new MouseEventArgs(MouseButtons.Middle, 1, 2, 3, 4), false }; 2000yield return new object[] { new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true };
System\Windows\Forms\ToolStripControlHostTests.cs (3)
4083c.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 4095c.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 4098c.OnMouseUp(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\ToolStripItemTests.cs (7)
7738owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7776parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7794parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14432owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14521parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 15419menuStrip1.MoveMouse(new MouseEventArgs(MouseButtons.None, 0, new Point(i, 5))); 15426menuStrip1.MoveMouse(new MouseEventArgs(MouseButtons.None, 0, new Point(i, 5)));
System\Windows\Forms\ToolStripTests.cs (1)
5831toolStrip.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0));
System\Windows\Forms\TreeNodeMouseClickEventArgsTests.cs (4)
13yield return new object[] { null, MouseButtons.Left, 1, 2, 3 }; 14yield return new object[] { new TreeNode(), (MouseButtons)1, 0, 0, 0 }; 15yield return new object[] { new TreeNode(), (MouseButtons)3, -1, -1, -1 }; 20public void Ctor_TreeNode_MouseButtons_Int_Int_Int_Int(TreeNode node, MouseButtons button, int clicks, int x, int y)
System\Windows\Forms\TreeViewTests.cs (4)
5700yield return new object[] { new ItemDragEventArgs(MouseButtons.None) }; 5701yield return new object[] { new ItemDragEventArgs(MouseButtons.Right, new object()) }; 6417yield return new object[] { new TreeNodeMouseClickEventArgs(null, MouseButtons.None, 0, 0, 0) }; 6418yield return new object[] { new TreeNodeMouseClickEventArgs(new TreeNode(), MouseButtons.Right, 1, 2, 3) };
System\Windows\Forms\UpDownBaseTests.cs (10)
2002yield return new object[] { new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 2003yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 2004yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 2005yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 2006yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 2007yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 2008yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 2009yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 2010yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 2200HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4, handled);
TextBoxBaseTests.cs (87)
5585yield return new object[] { new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 5586yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 5587yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 5588yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 5589yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 5590yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 5591yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 5592yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 5593yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 5619Assert.Equal(eventArgs is not null && eventArgs.Button == MouseButtons.Left, control.IsHandleCreated); 5627Assert.Equal(eventArgs is not null && eventArgs.Button == MouseButtons.Left, control.IsHandleCreated); 7167yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 7168yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 7169yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 7170yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 7171yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 7172yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 7174yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 0, 0 }; 7175yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 1, 2 }; 7176yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, -1, -2 }; 7177yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 0, 0 }; 7178yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 1, 2 }; 7179yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, -1, -2 }; 7181yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 7182yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 7183yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 7184yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 7185yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 7186yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 7188yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 0, 0 }; 7189yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 1, 2 }; 7190yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, -1, -2 }; 7191yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 0, 0 }; 7192yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 1, 2 }; 7193yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, -1, -2 }; 7195yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 7196yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 7197yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 7198yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 7199yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 7200yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 7202yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 0, 0 }; 7203yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 1, 2 }; 7204yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, -1, -2 }; 7205yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 0, 0 }; 7206yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 1, 2 }; 7207yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, -1, -2 }; 7209yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 7210yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 7211yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 7212yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 7213yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 7214yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 7216yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 7217yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 7218yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 7219yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 7220yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 7221yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 7223yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 7224yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 7225yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 7226yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 7227yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 7228yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 7230yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 0, 0 }; 7231yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 1, 2 }; 7232yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, -1, -2 }; 7233yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 0, 0 }; 7234yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 1, 2 }; 7235yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, -1, -2 }; 7237yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 0, 0 }; 7238yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 1, 2 }; 7239yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, -1, -2 }; 7240yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 0, 0 }; 7241yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 1, 2 }; 7242yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, -1, -2 }; 7244yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 0, 0 }; 7245yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 1, 2 }; 7246yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, -1, -2 }; 7247yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 0, 0 }; 7248yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 1, 2 }; 7249yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, -1, -2 }; 7254public void TextBoxBase_WndProc_InvokeMouseDownWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7289public void TextBoxBase_WndProc_InvokeMouseDownWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7358public void TextBoxBase_WndProc_InvokeMouseDownWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7401public void TextBoxBase_WndProc_InvokeMouseDownWithHandleNotSelectable_DoesNotCallMouseDown(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY)
TrackBarTests.cs (10)
2540yield return new object[] { new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0) }; 2541yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 2542yield return new object[] { new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0) }; 2543yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 2544yield return new object[] { new MouseEventArgs(MouseButtons.Right, 1, 0, 0, 0) }; 2545yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 2546yield return new object[] { new MouseEventArgs(MouseButtons.Right, 2, 0, 0, 0) }; 2547yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 2548yield return new object[] { new MouseEventArgs(MouseButtons.Right, 3, 0, 0, 0) }; 2580HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4, handled);
System.Windows.Forms.TestUtilities (2)
CommonTestHelperEx.cs (2)
155new(MouseButtons.Left, 1, 2, 3, 4), 156new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4)
System.Windows.Forms.UI.IntegrationTests (26)
DragDropTests.cs (2)
683if ((e.Button & MouseButtons.Left) == MouseButtons.Left)
Input\InputBuilder.cs (8)
73public static INPUT MouseButtonDown(MouseButtons button) 85MouseButtons.Left => MOUSE_EVENT_FLAGS.MOUSEEVENTF_LEFTDOWN, 86MouseButtons.Middle => MOUSE_EVENT_FLAGS.MOUSEEVENTF_MIDDLEDOWN, 87MouseButtons.Right => MOUSE_EVENT_FLAGS.MOUSEEVENTF_RIGHTDOWN, 95public static INPUT MouseButtonUp(MouseButtons button) 107MouseButtons.Left => MOUSE_EVENT_FLAGS.MOUSEEVENTF_LEFTUP, 108MouseButtons.Middle => MOUSE_EVENT_FLAGS.MOUSEEVENTF_MIDDLEUP, 109MouseButtons.Right => MOUSE_EVENT_FLAGS.MOUSEEVENTF_RIGHTUP,
Input\MouseSimulator.cs (16)
23return ButtonDown(MouseButtons.Left); 28return ButtonUp(MouseButtons.Left); 33return ButtonClick(MouseButtons.Left); 38return ButtonDoubleClick(MouseButtons.Left); 43return ButtonDown(MouseButtons.Middle); 48return ButtonUp(MouseButtons.Middle); 53return ButtonClick(MouseButtons.Middle); 58return ButtonDoubleClick(MouseButtons.Middle); 63return ButtonDown(MouseButtons.Right); 68return ButtonUp(MouseButtons.Right); 73return ButtonClick(MouseButtons.Right); 78return ButtonDoubleClick(MouseButtons.Right); 81private MouseSimulator ButtonDown(MouseButtons button) 92private MouseSimulator ButtonUp(MouseButtons button) 103private MouseSimulator ButtonClick(MouseButtons button) 115private MouseSimulator ButtonDoubleClick(MouseButtons button)