Пример #1
0
        private void ReceivePlayNotificationMessage(PlayNotificationMessage msg)
        {
            switch (msg.NotificationSound)
            {
            case NotificationSound.Burmese:
                BurmeseGongMediaElement.Play();
                break;

            case NotificationSound.Cymbals:
                CymbalsGongMediaElement.Play();
                break;

            case NotificationSound.Flute:
                FluteGongMediaElement.Play();
                break;

            case NotificationSound.Perfect:
                PerfectGongMediaElement.Play();
                break;

            case NotificationSound.HareKrishna:
                ChantHariKrishnaMediaElement.Play();
                break;

            case NotificationSound.JongSou:
                ChantJongSouElement.Play();
                break;

            case NotificationSound.Ohm:
                ChantOhmMediaElement.Play();
                break;

            case NotificationSound.Oahu:
                ChantOahuMediaElement.Play();
                break;

            case NotificationSound.RatanaMahathat:
                ChantRatanaMahathatMediaElement.Play();
                break;

            case NotificationSound.ThaiBuddhist:
                ChantThaiBuddhistMediaElement.Play();
                break;

            default:
                throw new ArgumentException("NotificationSound not found.", nameof(msg));
            }
        }
Пример #2
0
        private void ReceivePlayMessage(PlayMessage msg)
        {
            switch (msg.BellSound)
            {
            case BellSound.Burmese:
                BurmeseGongMediaElement.Play();
                break;

            case BellSound.Cymbals:
                CymbalsGongMediaElement.Play();
                break;

            case BellSound.Flute:
                FluteGongMediaElement.Play();
                break;

            case BellSound.Perfect:
                PerfectGongMediaElement.Play();
                break;

            default:
                throw new ArgumentException("BellSound not found.", nameof(msg));
            }
        }