Example #1
0
        public void SetSettings()
        {
            TimelineOverviewSwitch.IsToggled = PlaybarView.DataTrackline.IsVisible;
            PlaybackSpeedButton.Text         = PlaybarView.PlaybackSpeed.ToString() + "x";

            WindowSlider.Maximum = TimeFormatter.SecondsFromTime(Math.Max(
                                                                     PlaybarView.ViewerContext.AvailableTimeTo - PlaybarView.ViewerContext.AvailableTimeFrom,
                                                                     TimeFormatter.TimeFromSeconds(WindowSlider.Maximum)));
            WindowSlider.Value = TimeFormatter.SecondsFromTime(PlaybarView.WindowSize);
        }
        private void OnSelectedTimeRangeChanged(SingleSetDataViewerContext sender, long currentStart, long to)
        {
            var diff = TimeFormatter.SecondsFromTime(currentStart - StartTime);

            try
            {
                _player.Position = TimeSpan.FromSeconds(diff);
            }
            catch (OverflowException)
            {
                //TODO: add warning?
            }
        }