Beispiel #1
0
        private void BgProgressBar_OnMouseMove(object sender, MouseEventArgs e)
        {
            if (Panel.GetZIndex(BgProgressBar) < 1)
            {
                return;
            }
            _positionToolTip.Content = PositionToolTipText;
            _positionToolTip.IsOpen  = BgProgressBar.IsMouseOver;
            if (!_positionToolTip.IsOpen)
            {
                return;
            }
            var p = MouseUtils.CorrectGetPosition();

            _positionToolTip.HorizontalOffset = p.X;
            _positionToolTip.VerticalOffset   = p.Y - 20;
        }
Beispiel #2
0
        private void BgProgressBar_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (Panel.GetZIndex(BgProgressBar) < 1 || !PlaybackManagerInstance.IsSomethingLoaded)
            {
                return;
            }
            var p = MouseUtils.CorrectGetPosition(BgProgressBar);

            try
            {
                PlaybackManagerInstance.Position =
                    TimeSpan.FromMilliseconds(PlaybackManagerInstance.Duration.TotalMilliseconds /
                                              BgProgressBar.ActualWidth * p.X);
            }
            catch
            {
            }
        }
Beispiel #3
0
        private void MiniPlayer_OnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key != Key.LeftShift || !IsVisible)
            {
                return;
            }
            Panel.SetZIndex(BgProgressBar, 1);
            AllowDrag = false;
            _positionToolTip.Content = PositionToolTipText;
            BgProgressBar.ToolTip    = _positionToolTip;
            var p = MouseUtils.CorrectGetPosition();

            _positionToolTip.HorizontalOffset = p.X;
            _positionToolTip.VerticalOffset   = p.Y - 20;
            if (BgProgressBar.IsMouseOver)
            {
                _positionToolTip.IsOpen = true;
            }
        }