Inheritance: IMouseInputAdapter
コード例 #1
0
        public void SetUp()
        {
            _sourceControl    = MockRepository.GenerateStub <Control>();
            _mouseInputTarget = MockRepository.GenerateStub <IMouseInputTarget>();

            _mouseInputAdapter        = new MouseInputAdapter();
            _mouseInputAdapter.Target = _mouseInputTarget;

            _expectedMouseMoveEvent = new MouseEventArgs(MouseButtons.None, 0, ExpectedX, ExpectedY, 0);
            _expectedMouseDownEvent = new MouseEventArgs(MouseButtons.Left, 0, ExpectedX, ExpectedY, 0);
            _expectedMouseUpEvent   = new MouseEventArgs(MouseButtons.Left, 0, MouseUpX, MouseUpY, 0);
            _mouseMoveArguments     = new MouseEventArgs(MouseButtons.None, 0, MouseMoveX, MouseMoveY, 0);

            _mouseInputAdapter.Source = _sourceControl;
        }
コード例 #2
0
        public void SetUp()
        {
            _sourceControl = MockRepository.GenerateStub<Control>();
            _mouseInputTarget = MockRepository.GenerateStub<IMouseInputTarget>();

            _mouseInputAdapter = new MouseInputAdapter();
            _mouseInputAdapter.Target = _mouseInputTarget;

            _expectedMouseMoveEvent = new MouseEventArgs(MouseButtons.None, 0, ExpectedX, ExpectedY, 0);
            _expectedMouseDownEvent = new MouseEventArgs(MouseButtons.Left, 0, ExpectedX, ExpectedY, 0);
            _expectedMouseUpEvent = new MouseEventArgs(MouseButtons.Left, 0, MouseUpX, MouseUpY, 0);
            _mouseMoveArguments = new MouseEventArgs(MouseButtons.None, 0, MouseMoveX, MouseMoveY, 0);

            _mouseInputAdapter.Source = _sourceControl;
        }