Example #1
0
        void _clickTimer_Tick(object sender, EventArgs e)
        {
            if (_isClickCheching == true)
            {
                return;
            }
            _isClickCheching = true;
            _mouseClickCount = _clickCount;
            _clickCount      = 0;
            if (_clickTimer.IsEnabled)
            {
                _clickTimer.Stop();
            }
            Args = new CountedClickEventArgs(_clickSender, _clickEventArg, _mouseClickCount, _clickedButton);
            if (OnCountedClick != null)
            {
                OnCountedClick(Args);
            }
            //addItemForTest();
            _isClickCheching = false;

            if (_clickTimer.Dispatcher != null && _funcForElipsed != null)
            {
                _clickTimer.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(_funcForElipsed));
            }
        }
Example #2
0
        public void CountClick(Object sender, RoutedEventArgs e)
        {
            _clickSender   = sender;
            _clickEventArg = e;
            _clickCount++;
            MouseButtonEventArgs arg = e as MouseButtonEventArgs;

            _clickedButton = arg.ChangedButton;
            //_clickTimer.Stop();
            if (_clickTimer.IsEnabled == false)
            {
                _clickTimer.Start();
            }
            Args = null;
        }