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