C# Class Last.fm_Scrubbler_WPF.ViewModels.ITunesScrobbleViewModel

ViewModel for the Views.ITunesScrobbleView.
Inheritance: ScrobbleViewModelBase, IDisposable
Afficher le fichier Open project: coczero/Last.fm-Scrubbler-WPF Class Usage Examples

Méthodes publiques

Méthode Description
ConnectToITunes ( ) : void

Connects/reconnects to iTunes.

DisconnectFromITunes ( ) : void

Disposes the current connection to the iTunes com.

Dispose ( ) : void

Cleans up.

ITunesScrobbleViewModel ( ) : IF.Lastfm.Core.Objects

Constructor.

Preview ( ) : void

Does nothing here.

Scrobble ( ) : System.Threading.Tasks.Task

Scrobbles the current song.

Private Methods

Méthode Description
FetchAlbumArtwork ( ) : System.Threading.Tasks.Task

Gets the album artwork of the current track.

GetCurrentTrackInfo ( ) : void

Gets the info of the currently playing track.

_app_AboutToQuitEvent ( ) : void

Disconnect when iTunes is about to close.

_app_OnPlayerPlayEvent ( object iTrack ) : void

Starts the _countTimer

_app_OnPlayerStopEvent ( object iTrack ) : void

Stops the _countTimer

_countTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Counts up and scrobbles if the track has been played longer than 50%.

_refreshTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Checks if the current playing song is still the same. If not, prepare for new track.

Method Details

ConnectToITunes() public méthode

Connects/reconnects to iTunes.
public ConnectToITunes ( ) : void
Résultat void

DisconnectFromITunes() public méthode

Disposes the current connection to the iTunes com.
public DisconnectFromITunes ( ) : void
Résultat void

Dispose() public méthode

Cleans up.
public Dispose ( ) : void
Résultat void

ITunesScrobbleViewModel() public méthode

Constructor.
public ITunesScrobbleViewModel ( ) : IF.Lastfm.Core.Objects
Résultat IF.Lastfm.Core.Objects

Preview() public méthode

Does nothing here.
public Preview ( ) : void
Résultat void

Scrobble() public méthode

Scrobbles the current song.
public Scrobble ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task