Ejemplo n.º 1
0
        protected virtual void OnSeekPendingValueChanged(double value)
        {
            seek_to.Text = DurationStatusFormatters.ConfusingPreciseFormatter(
                TimeSpan.FromMilliseconds(TimeFromPercent(value)));

            ShowSeekToLabel();
        }
Ejemplo n.º 2
0
        private void UpdateTick()
        {
            seek_bar.InhibitValueChangeEvent();
            seek_bar.Value = Math.Max(0, Math.Min(1, Duration > 0 ? Position / Duration : 0));
            seek_bar.UninhibitValueChangeEvent();

            TimeSpan duration = TimeSpan.FromMilliseconds(Duration);
            TimeSpan position = TimeSpan.FromMilliseconds(Position);

            elapsed.Text   = DurationStatusFormatters.ConfusingPreciseFormatter(position);
            remaining.Text = "-" + DurationStatusFormatters.ConfusingPreciseFormatter(duration - position);
        }