Exemple #1
0
 private void ModelReceiverVolumeChanged(object sender, EventArgsReceiver e)
 {
     if (e.ReceiverUdn == iModel.Preferences.SelectedReceiverUdn)
     {
         UpdateDisplay(false);
     }
 }
Exemple #2
0
 private void ReceiverVolumeChanged(object sender, EventArgsReceiver e)
 {
     if (iSongcast != null && EventReceiverVolumeChanged != null)
     {
         EventReceiverVolumeChanged(this, e);
     }
 }
Exemple #3
0
        private void ReceiverAdded(object sender, EventArgsReceiver e)
        {
            UserLog.WriteLine(DateTime.Now + " : Linn.Songcast.Model.ReceiverAdded " + e.ReceiverUdn);

            if (iSongcast == null)
            {
                return;
            }

            // if the added receiver is the selected receiver and if songcast is enabled, play it
            if (this.Enabled && e.ReceiverUdn == iSelectedReceiverUdn)
            {
                Receiver recv = iSongcastMonitor.Receiver(iSelectedReceiverUdn);
                if (recv != null && recv.IsOnline)
                {
                    recv.Play();
                }
            }

            // update the preferences before notification
            iPreferences.ReceiverList = iSongcastMonitor.ReceiverList;

            if (EventReceiverListChanged != null)
            {
                EventReceiverListChanged(this, EventArgs.Empty);
            }

            // now check for auto selecting first receiver
            if (iSelectedReceiverUdn == string.Empty && iSongcastMonitor.ReceiverList.Length != 0)
            {
                // just set the value in the preferences - the preference eventing will cause the
                // handler to start playing this if necessary
                iPreferences.SelectedReceiverUdn = iSongcastMonitor.ReceiverList[0].Udn;
            }
        }
Exemple #4
0
        private void NotifyReceiverVolumeChanged(EventArgsReceiver aArgs)
        {
            // in main thread
            Assert.Check(!iInvoker.InvokeRequired);

            if (EventReceiverVolumeChanged != null)
            {
                EventReceiverVolumeChanged(this, aArgs);
            }
        }