394 references to Left
System.Windows.Forms (97)
System\Windows\Forms\Control.cs (5)
2546buttons |= MouseButtons.Left; 11402if (button == MouseButtons.Left && GetStyle(ControlStyles.Selectable)) 12362WmMouseDown(ref m, MouseButtons.Left, 2); 12371WmMouseDown(ref m, MouseButtons.Left, 1); 12375WmMouseUp(ref m, MouseButtons.Left, 1);
System\Windows\Forms\Controls\Buttons\Button.cs (1)
220if (mevent.Button == MouseButtons.Left && MouseIsPressed)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
900if (mevent.Button == MouseButtons.Left)
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
488if (mevent.Button == MouseButtons.Left
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
469if (mevent.Button == MouseButtons.Left
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (7)
1594OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptlc.X, Ptlc.Y, 0)); 1642OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptl.X, Ptl.Y, 0)); 1658OnClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 1659OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 1674OnMouseUp(new MouseEventArgs(MouseButtons.Left, 1, EditToComboboxMapping(m))); 3712OnClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 3713OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal)));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (12)
5820if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5881if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5889if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 11907if (!_dataGridViewState2[State2_MessageFromEditingCtrls] && e.Button == MouseButtons.Left) 11952if (!_dataGridViewState2[State2_MessageFromEditingCtrls] && e.Button == MouseButtons.Left) 12681&& e.Button == MouseButtons.Left 13466if (!e.Handled && e.Button == MouseButtons.Left && e.ColumnIndex < Columns.Count) 13641if (e.Button == MouseButtons.Left 14953&& me.Button == MouseButtons.Left) 15878&& (e.Button != MouseButtons.Left 15896if (e.Button == MouseButtons.Left) 17623if (!e.Handled && e.Button == MouseButtons.Left && e.RowIndex < Rows.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
446e.Button == MouseButtons.Left; 455e.Button == MouseButtons.Left; 517if (e.Button == MouseButtons.Left && s_mouseInContentBounds) 568Control.MouseButtons == MouseButtons.Left) 593if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3038if (e.Button == MouseButtons.Left && GetContentBounds(e.RowIndex).Contains(x, y))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (5)
762protected override bool MouseDownUnsharesRow(DataGridViewCellMouseEventArgs e) => e.Button == MouseButtons.Left; 772protected override bool MouseUpUnsharesRow(DataGridViewCellMouseEventArgs e) => e.Button == MouseButtons.Left; 867if (e.Button == MouseButtons.Left && s_mouseInContentBounds) 918Control.MouseButtons == MouseButtons.Left) 943if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (5)
429DataGridView is not null && e.Button == MouseButtons.Left && DataGridView.ApplyVisualStylesToHeaderCells; 441DataGridView is not null && e.Button == MouseButtons.Left && DataGridView.ApplyVisualStylesToHeaderCells; 450if (e.Button == MouseButtons.Left && 470Control.MouseButtons == MouseButtons.Left && 508if (e.Button == MouseButtons.Left && DataGridView.ApplyVisualStylesToHeaderCells)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
579if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex && e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\Labels\LinkLabelLinkClickedEventArgs.cs (1)
15: this(link, MouseButtons.Left)
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
2426OnClick(new MouseEventArgs(MouseButtons.Left, 1, point)); 2427OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, point)); 2437OnDoubleClick(new MouseEventArgs(MouseButtons.Left, 2, point)); 2438OnMouseDoubleClick(new MouseEventArgs(MouseButtons.Left, 2, point));
System\Windows\Forms\Controls\ListView\ListView.cs (5)
6507OnItemDrag(new ItemDragEventArgs(MouseButtons.Left, item)); 6649MouseButtons button = nmhdr->code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 6949WmMouseDown(ref m, MouseButtons.Left, 2); 6965WmMouseDown(ref m, MouseButtons.Left, 1); 6972_downButton = MouseButtons.Left;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2770if (target is not null && me.Button == MouseButtons.Left)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (2)
1989if ((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)
2947if (e.Button == MouseButtons.Left && SplitterInside(e.X) && TotalProperties != 0) 2986if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
392if (e.Button == MouseButtons.Left) 494if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
97if ((mouseButtons & MouseButtons.Left) == MouseButtons.Left)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
813if (e.Button == MouseButtons.Left && e.Clicks == 1)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1464if (mevent is not null && mevent.Button == MouseButtons.Left)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
132(e.Button == MouseButtons.Left)) 153(e.Button == MouseButtons.Left))
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
106return (Control.MouseButtons == MouseButtons.Left) && (Control.ModifierKeys == Keys.None);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2545if (e.Button == MouseButtons.Left) 2573if (e.Button == MouseButtons.Left || (e.Button == MouseButtons.Right && _state[s_stateSupportsRightClick]))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
871if (e.Button == MouseButtons.Left ||
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (3)
423if (e.Button == MouseButtons.Left) 450if (e.Button == MouseButtons.Left) 467if ((e.Button == MouseButtons.Left) && SplitButtonButton.Bounds.Contains(clickPoint))
System\Windows\Forms\Controls\TreeView\TreeView.cs (7)
3014TvnBeginDrag(MouseButtons.Left, nmtv); 3027MouseButtons button = MouseButtons.Left; 3037button = nmtv->hdr.code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 3246WmMouseDown(ref m, MouseButtons.Left, 2); 3282OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, PARAM.ToPoint(m.LParamInternal))); 3298WmMouseDown(ref m, MouseButtons.Left, 1); 3301_downButton = MouseButtons.Left;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (2)
681if (e.Clicks == 2 && e.Button == MouseButtons.Left) 694if (mevent.Button == MouseButtons.Left)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
116if (!_parent.ValidationCancelled && e.Button == MouseButtons.Left) 121if (e.Clicks == 2 && e.Button == MouseButtons.Left) 213if (!_parent.ValidationCancelled && e.Button == MouseButtons.Left) 224if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (2)
44if (e.Clicks == 2 && e.Button == MouseButtons.Left) 64if (e.Button == MouseButtons.Left)
System\Windows\Forms\Controls\WebBrowser\HtmlElementEventArgs.cs (1)
31buttons |= MouseButtons.Left;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1142if (e.Button == MouseButtons.Left && e.Clicks == 1 && !IsSplitterFixed)
System\Windows\Forms\NotifyIcon.cs (3)
735WmMouseDown(MouseButtons.Left, 2); 738WmMouseDown(MouseButtons.Left, 1); 741WmMouseUp(MouseButtons.Left);
System.Windows.Forms.Design (37)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
258if (e.Button == MouseButtons.Left)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (2)
25if (e.Button == MouseButtons.Left) 47if (e.Button == MouseButtons.Left)
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
157if (e.Button == MouseButtons.Left)
System\Drawing\Design\ColorEditor.ColorPalette.cs (3)
308if (me.Button == MouseButtons.Left) 322if (me.Button == MouseButtons.Left && Bounds.Contains(me.X, me.Y)) 337if (me.Button == MouseButtons.Left)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (3)
350if (_behaviorService.OnMouseDown(MouseButtons.Left, mouseLoc)) 374if (_behaviorService.OnMouseUp(MouseButtons.Left)) 398if (_behaviorService.OnMouseDoubleClick(MouseButtons.Left, mouseLoc))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (2)
91if (button == MouseButtons.Left) 170if (button == MouseButtons.Left && OkToMove)
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (1)
110if (button != MouseButtons.Left)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
293if (button != MouseButtons.Left)
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (1)
90if (button == MouseButtons.Left && g is TableLayoutPanelResizeGlyph)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
76if (button != MouseButtons.Left || !(glyph is ToolStripPanelSelectionGlyph selectionGlyph))
System\Windows\Forms\Design\ComponentTray.cs (4)
1232if (e.Button == MouseButtons.Left && _toolboxService is not null) 1263if (e.Button == MouseButtons.Left) 1330if (_mouseDragStart != InvalidPoint && e.Button == MouseButtons.Left) 2158if (me.Button == MouseButtons.Left)
System\Windows\Forms\Design\ControlDesigner.cs (10)
1848: MouseButtons.Left; 1850if (button == MouseButtons.Left) 1871: MouseButtons.Left; 1878if (button == MouseButtons.Left && IsDoubleClick(location.X, location.Y)) 1892if (!EnableDragRect && button == MouseButtons.Left) 1921else if (button == MouseButtons.Left) 1942button = MouseButtons.Left; 1970else if (button == MouseButtons.Left) 1994: MouseButtons.Left; 2014if (button == MouseButtons.Left)
System\Windows\Forms\Design\SelectionUIService.cs (1)
534else if (hitTest != SelectionUIItem.NOHIT && me.Button == MouseButtons.Left)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
752public override bool OnMouseUp(Glyph g, MouseButtons button) => button == MouseButtons.Left;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (4)
230if (glyph is not null && button == MouseButtons.Left) 284if ((button == MouseButtons.Left) && (keyService is not null) && (keyService.TemplateNodeActive)) 333if (glyph is not null && button == MouseButtons.Left) 544if (button == MouseButtons.Left && glyph is not null && glyph.ItemDesigner is not null && !glyph.ItemDesigner.IsEditorActive)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
276_behavior?.OnMouseDown(_containerSelectorGlyph, MouseButtons.Left, Point.Empty);
System.Windows.Forms.Tests (250)
CheckedListBoxTests.cs (1)
790MouseEventArgs eventArgs = new(MouseButtons.Left, 1, 0, 0, 0);
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (1)
57button.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\ButtonBaseTests.cs (61)
5544control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5648control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5729control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5813control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 5918control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6008control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6017control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6097yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 6099yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 6101yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 6103yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 6146yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 1 }; 6148yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 1 }; 6150yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 1 }; 6152yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 1 }; 6510yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 6512yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 6514yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 6516yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 6563control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6594control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6624yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 0 }; 6626yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 0 }; 6628yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 0 }; 6630yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 0 }; 6688yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 0 }; 6690yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 0 }; 6692yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 0 }; 6694yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 0 }; 6713control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6755yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 1 }; 6757yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 1 }; 6759yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 1 }; 6761yield return new object[] { flatStyle, enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 1 }; 6780control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 6829yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 6833yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 7642control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7673control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7705control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7791control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7833control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7876control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 7967control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8003control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8040control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8136control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8183control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8231control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8472control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8508control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8545control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8641control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8688control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8736control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 8826yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 8827yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 8828yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 8829yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 8830yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 8831yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 };
System\Windows\Forms\ButtonTests.cs (17)
1059control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 2251yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 2253yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 2255yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 2257yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 2296yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), 1 }; 2298yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), 1 }; 2300yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), 1 }; 2302yield return new object[] { enabled, new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), 1 }; 2644yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 2648yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 2696yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true }; 2700yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true }; 2714control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 2800yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedCallCount }; 2804yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedCallCount }; 2818control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\CheckBoxTests.cs (1)
822MouseEventArgs eventArgs = new(MouseButtons.Left, 1, new Point(0, 0), 0);
System\Windows\Forms\ComboBoxTests.cs (1)
2776public void OnMouseDown(Point p) => base.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, p.X, p.Y, 0));
System\Windows\Forms\ControlTests.Handlers.cs (1)
3628HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4);
System\Windows\Forms\ControlTests.Methods.cs (18)
13388yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 13389yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 13390yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 13391yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 13392yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 13393yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 13395yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 0, 0 }; 13396yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 1, 2 }; 13397yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, -1, -2 }; 13398yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 0, 0 }; 13399yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 1, 2 }; 13400yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, -1, -2 }; 13765yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 13766yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 13767yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 13768yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 13769yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 13770yield 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)
11yield return new object[] { -1, -1, -1, -1, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 34Assert.Throws<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellMouseEventArgs(-2, 0, 1, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4))); 41Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellMouseEventArgs(0, -2, 1, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4)));
System\Windows\Forms\DataGridViewCellTests.cs (14)
5498yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5501yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5504yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5507yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5510yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5513yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5531yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5534yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5537yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5540yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5543yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 5546yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 6475cell.MouseClick(new DataGridViewCellMouseEventArgs(0, 0, 10, 10, new MouseEventArgs(MouseButtons.Left, 1, 10, 10, 0))); 6483cell.MouseClick(new DataGridViewCellMouseEventArgs(0, 0, 10, 10, new MouseEventArgs(MouseButtons.Left, 1, 10, 10, 0)));
System\Windows\Forms\DataGridViewColumnDividerDoubleClickEventArgsTests.cs (2)
11yield return new object[] { -1, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true) }; 34Assert.Throws<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewColumnDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true)));
System\Windows\Forms\DataGridViewHeaderCellTests.cs (43)
3842yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3845yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3848yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3851yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3854yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3857yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), VisualStyleRenderer.IsSupported && enableHeadersVisualStyles }; 3896yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3897yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3898yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3899yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3900yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 3901yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4036cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4105yield return new object[] { new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4108yield return new object[] { new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4111yield return new object[] { new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4114yield return new object[] { new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4117yield return new object[] { new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4120yield return new object[] { new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4138yield 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 }; 4141yield 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 }; 4144yield 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 }; 4147yield 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 }; 4150yield 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 }; 4156yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.Normal }; 4210DataGridViewCellMouseEventArgs e = new(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)); 4395cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4425cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4445yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4448yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4451yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4454yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4457yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4464yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)) }; 4509DataGridViewCellMouseEventArgs e = new(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)); 4520yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4523yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4526yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(-1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4529yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(0, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4532yield return new object[] { enableHeadersVisualStyles, new DataGridViewCellMouseEventArgs(1, 0, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), expectedButtonState2 }; 4538yield return new object[] { false, new DataGridViewCellMouseEventArgs(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0)), ButtonState.Normal }; 4566cell.OnMouseDown(new DataGridViewCellMouseEventArgs(-1, -1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0))); 4593DataGridViewCellMouseEventArgs e = new(0, 1, 0, 0, new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0));
System\Windows\Forms\DataGridViewRowDividerDoubleClickEventArgsTests.cs (2)
11yield return new object[] { -1, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true) }; 34Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewRowDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true)));
System\Windows\Forms\DataGridViewTests.cs (10)
3742DataGridViewCellMouseEventArgs args = new(0, 0, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3747args = new(0, 1, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3769DataGridViewCellMouseEventArgs args = new(0, 0, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0)); 3774args = new(0, 1, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0)); 3795DataGridViewColumnDividerDoubleClickEventArgs args = new(0, new(MouseButtons.Left, 2, 0, 0, 0)); 3800args = new(1, new(MouseButtons.Left, 2, 0, 0, 0)); 3821DataGridViewCellMouseEventArgs args = new(0, -1, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3826args = new(1, -1, 0, 0, new(MouseButtons.Left, 1, 0, 0, 0)); 3847DataGridViewCellMouseEventArgs args = new(0, -1, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0)); 3852args = new(1, -1, 0, 0, new(MouseButtons.Left, 2, 0, 0, 0));
System\Windows\Forms\DateTimePickerTests.cs (4)
573control.OnMouseClick(new(MouseButtons.Left, 1, 0, 0, 0)); 577control.OnMouseClick(new(MouseButtons.Left, 1, 0, 0, 0)); 594control.OnMouseDoubleClick(new(MouseButtons.Left, 1, 0, 0, 0)); 598control.OnMouseDoubleClick(new(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\HandledMouseEventArgsTests.cs (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)
21Assert.Equal(MouseButtons.Left, e.Button); 27yield 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)
3702yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0), true }; 3704yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0), true }; 3706yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0), true }; 3708yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0), true }; 3803yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 3805yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 3807yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 3809yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) };
System\Windows\Forms\RadioButtonTests.cs (8)
1049yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1053yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1102yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedIsHandleCreated }; 1106yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), expectedIsHandleCreated }; 1120control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 1205yield return new object[] { flatStyle, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1209yield return new object[] { flatStyle, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1223control.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\ScrollBarTests.cs (2)
2211HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4); 2478MouseEventArgs eventArgs = new(MouseButtons.Left, 0, 0, 0, delta);
System\Windows\Forms\SplitterTests.cs (6)
1955yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 2, 3, 4) }; 1956yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1958yield return new object[] { new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4) }; 1997yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 2, 3, 4), false }; 1998yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true }; 2000yield return new object[] { new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4), true };
System\Windows\Forms\ToolStripControlHostTests.cs (3)
4083c.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 4095c.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0)); 4098c.OnMouseUp(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
System\Windows\Forms\ToolStripItemTests.cs (5)
7738owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7776parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7794parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14432owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14521parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0));
System\Windows\Forms\ToolStripTests.cs (1)
5831toolStrip.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0));
System\Windows\Forms\TreeNodeMouseClickEventArgsTests.cs (1)
13yield return new object[] { null, MouseButtons.Left, 1, 2, 3 };
System\Windows\Forms\UpDownBaseTests.cs (5)
2003yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 2005yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 2007yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 2009yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 2200HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4, handled);
TextBoxBaseTests.cs (18)
5586yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 5588yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 5590yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 5592yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 5619Assert.Equal(eventArgs is not null && eventArgs.Button == MouseButtons.Left, control.IsHandleCreated); 5627Assert.Equal(eventArgs is not null && eventArgs.Button == MouseButtons.Left, control.IsHandleCreated); 7167yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 7168yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 7169yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 7170yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 7171yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 7172yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 7174yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 0, 0 }; 7175yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 1, 2 }; 7176yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, -1, -2 }; 7177yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 0, 0 }; 7178yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 1, 2 }; 7179yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, -1, -2 };
TrackBarTests.cs (5)
2541yield return new object[] { new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0) }; 2543yield return new object[] { new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0) }; 2545yield return new object[] { new MouseEventArgs(MouseButtons.Left, 2, 0, 0, 0) }; 2547yield return new object[] { new MouseEventArgs(MouseButtons.Left, 3, 0, 0, 0) }; 2580HandledMouseEventArgs eventArgs = new(MouseButtons.Left, 1, 2, 3, 4, handled);
System.Windows.Forms.TestUtilities (2)
CommonTestHelperEx.cs (2)
155new(MouseButtons.Left, 1, 2, 3, 4), 156new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4)
System.Windows.Forms.UI.IntegrationTests (8)
DragDropTests.cs (2)
742if ((e.Button & MouseButtons.Left) == MouseButtons.Left)
Input\InputBuilder.cs (2)
85MouseButtons.Left => MOUSE_EVENT_FLAGS.MOUSEEVENTF_LEFTDOWN, 107MouseButtons.Left => MOUSE_EVENT_FLAGS.MOUSEEVENTF_LEFTUP,
Input\MouseSimulator.cs (4)
23return ButtonDown(MouseButtons.Left); 28return ButtonUp(MouseButtons.Left); 33return ButtonClick(MouseButtons.Left); 38return ButtonDoubleClick(MouseButtons.Left);