public void TestMouseWheelWithActivatedControl() { Screen screen = new Screen(100.0f, 100.0f); MouseTestControl control = new MouseTestControl(); control.Bounds = new UniRectangle(10.0f, 10.0f, 80.0f, 80.0f); screen.Desktop.Children.Add(control); screen.InjectKeyPress(Keys.A); screen.InjectMouseWheel(12.34f); Assert.AreEqual(12.34f, control.MouseWheelTicks); }
public void TestMouseWheel() { Screen screen = new Screen(); MouseTestControl control = new MouseTestControl(); control.Bounds = new UniRectangle(10.0f, 10.0f, 80.0f, 80.0f); screen.Desktop.Children.Add(control); screen.InjectMouseMove(50.0f, 50.0f); screen.InjectMouseWheel(12.34f); Assert.AreEqual(12.34f, control.MouseWheelTicks); }
public void TestMousePressWithActivatedControl() { Screen screen = new Screen(100.0f, 100.0f); MouseTestControl child = new MouseTestControl(); child.Bounds = new UniRectangle(55.0f, 10.0f, 35.0f, 80.0f); screen.Desktop.Children.Add(child); screen.InjectKeyPress(Keys.A); screen.InjectMousePress(MouseButtons.Left); Assert.AreEqual(MouseButtons.Left, child.HeldMouseButtons); }
public void TestMouseWheelWithActivatedControl() { Screen screen = new Screen(100.0f, 100.0f); MouseTestControl control = new MouseTestControl(); control.Bounds = new UniRectangle(10.0f, 10.0f, 80.0f, 80.0f); screen.Desktop.Children.Add(control); screen.InjectKeyPress(Keys.A); screen.InjectMouseWheel(12.34f); Assert.AreEqual(12.34f, control.MouseWheelTicks); }
public void TestMouseWheel() { Screen screen = new Screen(); MouseTestControl control = new MouseTestControl(); control.Bounds = new UniRectangle(10.0f, 10.0f, 80.0f, 80.0f); screen.Desktop.Children.Add(control); screen.InjectMouseMove(50.0f, 50.0f); screen.InjectMouseWheel(12.34f); Assert.AreEqual(12.34f, control.MouseWheelTicks); }
public void TestMousePressWithActivatedControl() { Screen screen = new Screen(100.0f, 100.0f); MouseTestControl child = new MouseTestControl(); child.Bounds = new UniRectangle(55.0f, 10.0f, 35.0f, 80.0f); screen.Desktop.Children.Add(child); screen.InjectKeyPress(Keys.A); screen.InjectMousePress(MouseButtons.Left); Assert.AreEqual(MouseButtons.Left, child.HeldMouseButtons); }