75 references to new
System.Windows.Forms.Tests (73)
KeyboardTooltipStateMachineTests.cs (1)
112public void SimulateKeyUp(Keys keys) => base.OnKeyUp(new KeyEventArgs(keys));
System\Windows\Forms\ButtonBaseTests.cs (26)
5483yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel), false, false }; 5484yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter), false, false }; 5485yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space), true, expectedIsHandleCreated }; 5528yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel), false }; 5529yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter), false }; 5530yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space), true }; 5574yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel), false, 0 }; 5575yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter), false, 0 }; 5576yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space), true, 1 }; 5632yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel), false }; 5633yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter), false }; 5634yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space), true }; 5705control.OnKeyDown(new KeyEventArgs(key)); 5730control.OnKeyDown(new KeyEventArgs(key)); 5747yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.None) }; 5748yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel) }; 5749yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter) }; 5750yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space) }; 5797yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel), 0, expectedIsHandleCreated }; 5798yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter), 1, expectedIsHandleCreated }; 5799yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space), 1, expectedIsHandleCreated }; 5902yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Cancel), 0, expectedCallCount }; 5903yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Enter), 1, expectedCallCount }; 5904yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.Space), 1, expectedCallCount }; 5984control.OnKeyUp(new KeyEventArgs(key)); 6009control.OnKeyUp(new KeyEventArgs(key));
System\Windows\Forms\ComboBoxTests.cs (1)
2774public void OnKeyUp() => base.OnKeyUp(new KeyEventArgs(Keys.Left));
System\Windows\Forms\DataGridViewCellTests.cs (2)
6491cell.OnKeyClick(new KeyEventArgs(Keys.Space), 0); 6499cell.OnKeyClick(new KeyEventArgs(Keys.Space), 0);
System\Windows\Forms\KeyEventArgsTests.cs (3)
24KeyEventArgs e = new(keyData); 49KeyEventArgs e = new(Keys.A) 63KeyEventArgs e = new(Keys.A)
System\Windows\Forms\LabelTests.cs (2)
749KeyEventArgs keyEventArgs = new KeyEventArgs(Keys.A); 771KeyEventArgs keyEventArgs = new KeyEventArgs(Keys.A);
System\Windows\Forms\SplitterTests.cs (3)
1820yield return new object[] { new KeyEventArgs(Keys.None) }; 1821yield return new object[] { new KeyEventArgs(Keys.Cancel) }; 1822yield return new object[] { new KeyEventArgs(Keys.Escape) };
System\Windows\Forms\ToolStripControlHostTests.cs (2)
4065c.OnKeyDown(new KeyEventArgs(Keys.A)); 4071c.OnKeyUp(new KeyEventArgs(Keys.A));
System\Windows\Forms\TreeViewTests.cs (21)
5730yield return new object[] { new KeyEventArgs(Keys.None) }; 5731yield return new object[] { new KeyEventArgs(Keys.A) }; 5732yield return new object[] { new KeyEventArgs(Keys.Space) }; 5733yield return new object[] { new KeyEventArgs(Keys.Control | Keys.Space) }; 5762yield return new object[] { false, true, false, new KeyEventArgs(Keys.None), 0, 0, false }; 5763yield return new object[] { false, true, false, new KeyEventArgs(Keys.A), 0, 0, false }; 5764yield return new object[] { false, true, false, new KeyEventArgs(Keys.Space), 1, 1, true }; 5765yield return new object[] { false, true, true, new KeyEventArgs(Keys.Space), 1, 0, true }; 5766yield return new object[] { false, true, false, new KeyEventArgs(Keys.Control | Keys.Space), 1, 1, true }; 5767yield return new object[] { false, true, true, new KeyEventArgs(Keys.Control | Keys.Space), 1, 0, true }; 5769yield return new object[] { true, true, false, new KeyEventArgs(Keys.Space), 0, 0, true }; 5770yield return new object[] { true, false, false, new KeyEventArgs(Keys.Space), 0, 0, true }; 5771yield return new object[] { false, false, false, new KeyEventArgs(Keys.Space), 0, 0, false }; 5895yield return new object[] { true, new KeyEventArgs(Keys.None), true }; 5896yield return new object[] { true, new KeyEventArgs(Keys.A), true }; 5897yield return new object[] { true, new KeyEventArgs(Keys.Space), true }; 5898yield return new object[] { true, new KeyEventArgs(Keys.Control | Keys.Space), true }; 5900yield return new object[] { false, new KeyEventArgs(Keys.None), false }; 5901yield return new object[] { false, new KeyEventArgs(Keys.A), false }; 5902yield return new object[] { false, new KeyEventArgs(Keys.Space), true }; 5903yield return new object[] { false, new KeyEventArgs(Keys.Control | Keys.Space), true };
System\Windows\Forms\UpDownBaseTests.cs (12)
2357yield return new object[] { true, userEdit, source, new KeyEventArgs(Keys.A), 0, 0, 0, false }; 2358yield return new object[] { false, userEdit, source, new KeyEventArgs(Keys.A), 0, 0, 0, false }; 2359yield return new object[] { true, userEdit, source, new KeyEventArgs(Keys.Up), 1, 0, 0, true }; 2360yield return new object[] { false, userEdit, source, new KeyEventArgs(Keys.Up), 0, 0, 0, false }; 2361yield return new object[] { true, userEdit, source, new KeyEventArgs(Keys.Down), 0, 1, 0, true }; 2362yield return new object[] { false, userEdit, source, new KeyEventArgs(Keys.Down), 0, 0, 0, false }; 2363yield return new object[] { true, userEdit, source, new KeyEventArgs(Keys.Left), 0, 0, 0, false }; 2364yield return new object[] { false, userEdit, source, new KeyEventArgs(Keys.Left), 0, 0, 0, false }; 2365yield return new object[] { true, userEdit, source, new KeyEventArgs(Keys.Right), 0, 0, 0, false }; 2366yield return new object[] { false, userEdit, source, new KeyEventArgs(Keys.Right), 0, 0, 0, false }; 2371yield return new object[] { interceptArrowKeys, true, source, new KeyEventArgs(Keys.Return), 0, 0, 1, false }; 2372yield return new object[] { interceptArrowKeys, false, source, new KeyEventArgs(Keys.Return), 0, 0, 0, false };
System.Windows.Forms.TestUtilities (2)
CommonTestHelperEx.cs (2)
124new(Keys.None), 125new(Keys.Cancel)