delegates/events to newer usage

This commit is contained in:
Jimmy Appelt 2016-01-07 09:33:40 +01:00
parent 017161cb54
commit f2048748c3

View File

@ -102,23 +102,23 @@ namespace SpotifyAPI.Example
isPlayingLabel.Text = playing.ToString();
}
private void _spotify_OnVolumeChange(VolumeChangeEventArgs e)
private void _spotify_OnVolumeChange(object sender, VolumeChangeEventArgs e)
{
volumeLabel.Text = (e.NewVolume * 100).ToString(CultureInfo.InvariantCulture);
}
private void _spotify_OnTrackTimeChange(TrackTimeChangeEventArgs e)
private void _spotify_OnTrackTimeChange(object sender, TrackTimeChangeEventArgs e)
{
timeLabel.Text = $"{FormatTime(e.TrackTime)}/{FormatTime(_currentTrack.Length)}";
timeProgressBar.Value = (int)e.TrackTime;
}
private void _spotify_OnTrackChange(TrackChangeEventArgs e)
private void _spotify_OnTrackChange(object sender, TrackChangeEventArgs e)
{
UpdateTrack(e.NewTrack);
}
private void _spotify_OnPlayStateChange(PlayStateEventArgs e)
private void _spotify_OnPlayStateChange(object sender, PlayStateEventArgs e)
{
UpdatePlayingStatus(e.Playing);
}