Exemplo n.º 1
0
        /**
         * CurrentPosition調整用Thumbがクリックされた
         */
        private void OnThumbPressed(object sender, PointerRoutedEventArgs e)
        {
            ((UIElement)sender).CapturePointer(e.Pointer);

            beginTracking(e, 1, MWidth, AbsoluteCurrentPosition, TotalRange - TrimEnd - TrimStart);

            mTracking.Moved = (v, last) =>
            {
                CurrentPosition = v;
                if (mTracking.Ext != AbsoluteCurrentPosition)
                {
                    mTracking.Ext = AbsoluteCurrentPosition;
                    CurrentPositionChanged?.Invoke(this, CurrentPosition, false);
                }
            };

            CmLog.debug("WvvTrimmingSlider.OnThumbPressed");
            e.Handled = true;
        }
Exemplo n.º 2
0
 public void ReportCurrentPositionChanged(TimeSpan newPosition, TimeSpan newBufferedPosition)
 {
     CurrentPositionChanged?.Invoke(this, new PositionChangedEventArgs(newPosition, newBufferedPosition));
 }
Exemplo n.º 3
0
 private void ReportPositionChanged(TimeSpan newPosition, TimeSpan newBufferedPosition)
 {
     // TODO fix the interval listener and remove the null conditional operator
     CurrentPositionChanged?.Invoke(this, new PositionChangedEventArgs(newPosition, newBufferedPosition));
     Element?.ReportCurrentPositionChanged(newPosition, newBufferedPosition);
 }
Exemplo n.º 4
0
 private void ReportPositionChanged(TimeSpan newPosition, TimeSpan newBufferedPosition)
 {
     CurrentPositionChanged?.Invoke(this, new PositionChangedEventArgs(newPosition, newBufferedPosition));
     Element.ReportCurrentPositionChanged(newPosition, newBufferedPosition);
 }