Beispiel #1
0
 /// <summary>
 /// Left mouse button has been double clicked.
 /// </summary>
 /// <param name="pt">Mouse position relative to control.</param>
 public virtual void DoubleClick(Point pt)
 {
     // Use mouse controller as first preference
     if (MouseController != null)
     {
         MouseController.DoubleClick(pt);
     }
     else
     {
         // Bubble event up to the parent
         Parent?.DoubleClick(pt);
     }
 }
Beispiel #2
0
        [Platform(Exclude = "Unix")]       // MouseController uses Win32.GetCursorPos so not portable
        public void DoubleClickOnWhiteSpaceToRightOfEntry_EntryAlreadySelected_EntryStaysSelected()
        {
            ListViewTester l = new ListViewTester("_listView", _window);

            using (MouseController mc = new MouseController(l))
            {
                Rectangle r = l.Properties.GetItemRect(0);
                mc.Click(r.Right + 1, r.Top + 1);
                // move enough to not confuse click with double-click
                mc.DoubleClick(r.Right + SystemInformation.DoubleClickSize.Width + 2, r.Top + 1);
            }
            Assert.AreEqual(1, l.Properties.SelectedIndices.Count);
            Assert.AreEqual(0, l.Properties.SelectedIndices[0]);
        }
 /// <summary>
 ///     Double clicks, by default - left button
 /// </summary>
 public Task DoubleClick(MouseButton btn = MouseButton.Left)
 {
     return(controller.DoubleClick(btn));
 }
Beispiel #4
0
 /// <summary>
 ///     Double clicks, by default - left button
 /// </summary>
 public FluentInvoker DoubleClick(MouseButton btn = MouseButton.Left)
 {
     MouseController.DoubleClick(btn).Wait();
     return(this);
 }