Beispiel #1
0
        protected virtual void RaiseSongChanged(object Sender, MediaScriptCommandRoutedEventArgs eArgs)
        {
            SongEventArgs e = new SongEventArgs((string)eArgs.OriginalSource, eArgs.ParameterType, eArgs.ParameterValue);

            // Temporary copy, to prevent a race condition
            EventHandler<SongEventArgs> eventHandler = SongChanged;

            if (eventHandler != null)
            {
                // Raise Event
                eventHandler(this, e);
            }
        }
 void _radio_SongChanged(object sender, SongEventArgs e)
 {
     // Radio hat neue Meta Daten empfangen
     MessageBox.Show(e.title + e.album + e.artist);
 }