Пример #1
0
        protected override void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            var pos = MainWindow.ScreenToCoord(e.X, e.Y, Window.Width, Window.Height);

            _startButton.PressIfInside(pos);
            if (_freqSlider.SelectIfInside(pos))
            {
                _freqSlider.SlideIfSelected(pos);
            }
            if (_speedSlider.SelectIfInside(pos))
            {
                _speedSlider.SlideIfSelected(pos);
            }
            _timeSlipCheck.ToggleIfInside(pos);
        }
Пример #2
0
        protected override void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            var pos = MainWindow.ScreenToCoord(e.X, e.Y, _window.Width, _window.Height);

            _buttons["start1"].PressIfInside(pos);
            _buttons["start2"].PressIfInside(pos);
            _buttons["startboth"].PressIfInside(pos);
            if (_freq1Slider.SelectIfInside(pos))
            {
                _freq1Slider.SlideIfSelected(pos);
            }
            if (_freq2Slider.SelectIfInside(pos))
            {
                _freq2Slider.SlideIfSelected(pos);
            }
            if (_timeSlider.SelectIfInside(pos))
            {
                _timeSlider.SlideIfSelected(pos);
            }
        }