Esempio n. 1
0
 private void _spotify_OnTrackTimeChange(object sender, TrackTimeChangeEventArgs e)
 {
     timeLabel.Text = $"{FormatTime(e.TrackTime)}/{FormatTime(_currentTrack.Length)}";
     timeProgressBar.Value = (int)e.TrackTime;
 }
 private void _spotify_OnTrackTimeChange(TrackTimeChangeEventArgs e)
 {
     timeLabel.Text = FormatTime(e.TrackTime) + "/" + FormatTime(_currentTrack.Length);
     timeProgressBar.Value = (int)e.TrackTime;
 }
Esempio n. 3
0
 private void spotify_OnTrackTimeChange(object sender, TrackTimeChangeEventArgs e)
 {
     lblCurrentTime.Text = formatTime(e.TrackTime);
     trackPlaytime.Value = Convert.ToInt32(e.TrackTime * 100);
 }
Esempio n. 4
0
 private void OnLocalTrackTimeChange(object sender, SpotifyAPI.Local.TrackTimeChangeEventArgs e)
 {
     OnTrackTimeChange?.Invoke(sender, new TrackTimeChangeEventArgs(TimeSpan.FromSeconds(e.TrackTime)));
 }
Esempio n. 5
0
 private void _spotify_OnTrackTimeChange(object sender, TrackTimeChangeEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new Action(() => _spotify_OnTrackTimeChange(sender, e)));
         return;
     }
     timeLabel.Text = $@"{FormatTime(e.TrackTime)}/{FormatTime(_currentTrack.Length)}";
     if(e.TrackTime < _currentTrack.Length)
         timeProgressBar.Value = (int)e.TrackTime;
 }
Esempio n. 6
0
 private void UpdateSpotifyTrackTime(object sender, TrackTimeChangeEventArgs e)
 {
     var dataModel = (WindowsProfileDataModel) DataModel;
     if (dataModel.Spotify.SongLength > 0)
         dataModel.Spotify.SongPercentCompleted = (int) (e.TrackTime/dataModel.Spotify.SongLength*100.0);
 }