395 references to Left
System.Windows.Forms (98)
System\Windows\Forms\ActiveX\AxHost.cs (1)
173
Debug.Assert((int)MouseButtons.
Left
== 0x00100000, "mb.left mismatch");
System\Windows\Forms\Control.cs (5)
2545
buttons |= MouseButtons.
Left
;
11374
if (button == MouseButtons.
Left
&& GetStyle(ControlStyles.Selectable))
12335
WmMouseDown(ref m, MouseButtons.
Left
, 2);
12344
WmMouseDown(ref m, MouseButtons.
Left
, 1);
12348
WmMouseUp(ref m, MouseButtons.
Left
, 1);
System\Windows\Forms\Controls\Buttons\Button.cs (1)
220
if (mevent.Button == MouseButtons.
Left
&& MouseIsPressed)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
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 (1)
469
if (mevent.Button == MouseButtons.
Left
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (7)
1592
OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, Ptlc.X, Ptlc.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)));
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 (12)
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
)
17604
if (!e.Handled && e.Button == MouseButtons.
Left
&& e.RowIndex < Rows.Count)
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\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\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 (1)
15
: this(link, MouseButtons.
Left
)
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 (5)
6503
OnItemDrag(new ItemDragEventArgs(MouseButtons.
Left
, 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
;
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 (2)
1989
if ((button & MouseButtons.
Left
) != MouseButtons.
Left
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
484
&& ((button & MouseButtons.
Left
) == MouseButtons.
Left
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2951
if (e.Button == MouseButtons.
Left
&& SplitterInside(e.X) && TotalProperties != 0)
2990
if (e.Button == MouseButtons.
Left
)
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 (2)
97
if ((mouseButtons & MouseButtons.
Left
) == MouseButtons.
Left
)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
813
if (e.Button == MouseButtons.
Left
&& e.Clicks == 1)
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 (2)
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 (1)
871
if (e.Button == MouseButtons.
Left
||
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\TreeView\TreeView.cs (7)
3014
TvnBeginDrag(MouseButtons.
Left
, 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
;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (2)
681
if (e.Clicks == 2 && e.Button == MouseButtons.
Left
)
694
if (mevent.Button == MouseButtons.
Left
)
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 (1)
32
buttons |= MouseButtons.
Left
;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1142
if (e.Button == MouseButtons.
Left
&& e.Clicks == 1 && !IsSplitterFixed)
System\Windows\Forms\NotifyIcon.cs (3)
735
WmMouseDown(MouseButtons.
Left
, 2);
738
WmMouseDown(MouseButtons.
Left
, 1);
741
WmMouseUp(MouseButtons.
Left
);
System.Windows.Forms.Design (37)
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 (3)
308
if (me.Button == MouseButtons.
Left
)
322
if (me.Button == MouseButtons.
Left
&& Bounds.Contains(me.X, me.Y))
337
if (me.Button == MouseButtons.
Left
)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (3)
350
if (_behaviorService.OnMouseDown(MouseButtons.
Left
, mouseLoc))
374
if (_behaviorService.OnMouseUp(MouseButtons.
Left
))
398
if (_behaviorService.OnMouseDoubleClick(MouseButtons.
Left
, mouseLoc))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (2)
91
if (button == MouseButtons.
Left
)
170
if (button == MouseButtons.
Left
&& OkToMove)
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (1)
110
if (button != MouseButtons.
Left
)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
293
if (button != MouseButtons.
Left
)
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (1)
90
if (button == MouseButtons.
Left
&& g is TableLayoutPanelResizeGlyph)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
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 (10)
1850
: MouseButtons.
Left
;
1852
if (button == MouseButtons.
Left
)
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
)
1944
button = MouseButtons.
Left
;
1972
else if (button == MouseButtons.
Left
)
1996
: MouseButtons.
Left
;
2016
if (button == MouseButtons.
Left
)
System\Windows\Forms\Design\SelectionUIService.cs (1)
534
else if (hitTest != SelectionUIItem.NOHIT && me.Button == MouseButtons.
Left
)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
752
public override bool OnMouseUp(Glyph g, MouseButtons button) => button == MouseButtons.
Left
;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (4)
230
if (glyph is not null && button == MouseButtons.
Left
)
284
if ((button == MouseButtons.
Left
) && (keyService is not null) && (keyService.TemplateNodeActive))
333
if (glyph is not null && button == MouseButtons.
Left
)
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.Tests (250)
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 (61)
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));
6097
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
6099
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
6101
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
6103
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0) };
6146
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0), 1 };
6148
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0), 1 };
6150
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0), 1 };
6152
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0), 1 };
6510
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
6512
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
6514
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
6516
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0) };
6563
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
6594
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
6624
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0), 0 };
6626
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0), 0 };
6628
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0), 0 };
6630
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0), 0 };
6688
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0), 0 };
6690
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0), 0 };
6692
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0), 0 };
6694
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0), 0 };
6713
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
6755
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0), 1 };
6757
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0), 1 };
6759
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0), 1 };
6761
yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0), 1 };
6780
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
6829
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
6833
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 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 };
System\Windows\Forms\ButtonTests.cs (17)
1059
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
2251
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
2253
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
2255
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
2257
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0) };
2296
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0), 1 };
2298
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0), 1 };
2300
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0), 1 };
2302
yield return new object[] { enabled, new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0), 1 };
2644
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
2648
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
2696
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4), true };
2700
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4), true };
2714
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
2800
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4), expectedCallCount };
2804
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4), expectedCallCount };
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 (18)
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 };
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 };
System\Windows\Forms\ControlTests.Properties.cs (2)
9261
[InlineData(byte.MaxValue, 0, 0, 0, 0, MouseButtons.
Left
)]
9266
[InlineData(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, MouseButtons.
Left
| MouseButtons.Middle | MouseButtons.Right | MouseButtons.XButton1 | MouseButtons.XButton2)]
System\Windows\Forms\DataGridViewCellMouseEventArgsTests.cs (3)
11
yield return new object[] { -1, -1, -1, -1, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
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 (14)
5498
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5501
yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5504
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5507
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5510
yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5513
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5531
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5534
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5537
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5540
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5543
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
5546
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 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 (2)
11
yield return new object[] { -1, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4, true) };
34
Assert.Throws<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewColumnDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4, true)));
System\Windows\Forms\DataGridViewHeaderCellTests.cs (43)
3845
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles };
3848
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles };
3851
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles };
3854
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles };
3857
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles };
3860
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles };
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)));
4108
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4111
yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4114
yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4117
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4120
yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4123
yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
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 };
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 };
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 };
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 };
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 };
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)));
4448
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4451
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4454
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4457
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)) };
4460
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 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));
4523
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), expectedButtonState2 };
4526
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), expectedButtonState2 };
4529
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), expectedButtonState2 };
4532
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), expectedButtonState2 };
4535
yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0)), expectedButtonState2 };
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 (2)
11
yield return new object[] { -1, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4, true) };
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 (2)
12
[InlineData(MouseButtons.
Left
, 1, 2, 3, 4)]
28
[InlineData(MouseButtons.
Left
, 1, 2, 3, 4, true)]
System\Windows\Forms\ItemDragEventArgsTests.cs (2)
10
[InlineData(MouseButtons.
Left
)]
20
[InlineData(MouseButtons.
Left
, 1)]
System\Windows\Forms\LinkLabelLinkClickedEventArgsTests.cs (2)
21
Assert.Equal(MouseButtons.
Left
, e.Button);
27
yield return new object[] { new LinkLabel.Link(), MouseButtons.
Left
};
System\Windows\Forms\MouseEventArgsTests.cs (1)
12
[InlineData(MouseButtons.
Left
, 1, 2, 3, 4)]
System\Windows\Forms\PropertyGridTests.cs (8)
3702
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0), true };
3704
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0), true };
3706
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0), true };
3708
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0), true };
3803
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
3805
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
3807
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
3809
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0) };
System\Windows\Forms\RadioButtonTests.cs (8)
1049
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
1053
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
1102
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4), expectedIsHandleCreated };
1106
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4), expectedIsHandleCreated };
1120
control.OnMouseDown(new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0));
1205
yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.
Left
, 1, 2, 3, 4) };
1209
yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.
Left
, 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 (6)
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) };
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 };
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 (5)
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));
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 (1)
13
yield return new object[] { null, MouseButtons.
Left
, 1, 2, 3 };
System\Windows\Forms\UpDownBaseTests.cs (5)
2003
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
2005
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
2007
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
2009
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 3, 0, 0, 0) };
2200
HandledMouseEventArgs eventArgs = new(MouseButtons.
Left
, 1, 2, 3, 4, handled);
TextBoxBaseTests.cs (18)
5586
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
5588
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
5590
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
5592
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 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 };
TrackBarTests.cs (5)
2541
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 0, 0, 0, 0) };
2543
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 1, 0, 0, 0) };
2545
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 2, 0, 0, 0) };
2547
yield return new object[] { new MouseEventArgs(MouseButtons.
Left
, 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 (8)
DragDropTests.cs (2)
685
if ((e.Button & MouseButtons.
Left
) == MouseButtons.
Left
)
Input\InputBuilder.cs (2)
85
MouseButtons.
Left
=> MOUSE_EVENT_FLAGS.MOUSEEVENTF_LEFTDOWN,
107
MouseButtons.
Left
=> MOUSE_EVENT_FLAGS.MOUSEEVENTF_LEFTUP,
Input\MouseSimulator.cs (4)
23
return ButtonDown(MouseButtons.
Left
);
28
return ButtonUp(MouseButtons.
Left
);
33
return ButtonClick(MouseButtons.
Left
);
38
return ButtonDoubleClick(MouseButtons.
Left
);