mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 15:06:26 +00:00
delegates/events to newer usage
This commit is contained in:
parent
017161cb54
commit
f2048748c3
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user