Esempio n. 1
0
        public void ScrollStop()
        {
            if (IsScrolling)
            {
                IsScrolling      = false;
                service.Clicked -= DragClicked;

                scrollTimer.Stop();

                if (scroll != null)
                {
                    scroll.Dispatcher.Invoke(() =>
                    {
                        scroll.Close();
                        scroll = null;
                    });
                }
            }
        }
Esempio n. 2
0
        public void ScrollStart(Point startPt)
        {
            if (!IsScrolling)
            {
                IsScrolling = true;

                if (scrollTimer == null)
                {
                    scrollTimer          = new DispatcherTimer();
                    scrollTimer.Interval = TimeSpan.FromMilliseconds(500);
                    scrollTimer.Tick    += delegate
                    {
                        service.Clicked += ScrollClicked;
                        scrollTimer.Stop();
                    };
                }
                scrollTimer.Start();

                scroll = new ScrollCursorWindow(startPt.ToPoint());
                scroll.Show();
            }
        }