示例#1
0
 void PlayAlert(AudioAlertType alertType)
 {
     if (!IsActive)
     {
         AudioAlert.Instance.Play(alertType);
     }
 }
示例#2
0
        public void Stop(AudioAlertType alertType)
        {
            SoundPlayer player;

            if (sounds.TryGetValue(alertType, out player))
            {
                player.Stop();
            }
        }
示例#3
0
        public void Play(AudioAlertType alertType)
        {
            SoundPlayer player;

            if (Enabled && sounds.TryGetValue(alertType, out player))
            {
                player.Play();
            }
        }
示例#4
0
        void LoadSound(AudioAlertType alertType)
        {
            var folder = Path.Combine(AppInfo.Location, "Sounds");

            string soundName     = alertType.ToString() + ".wav";
            string soundLocation = Path.Combine(folder, soundName);

            if (File.Exists(soundLocation))
            {
                var player = new SoundPlayer(soundLocation);
                sounds[alertType] = player;
            }
        }
 void PlayAlert(AudioAlertType alertType)
 {
     if (IsGroupChat)
     {
         if (!IsActive && !ignore)
         {
             AudioAlert.Instance.Play(alertType);
         }
     }
     else
     {
         if (!IsActive && !PrimaryBuddy.IsIgnored)
         {
             AudioAlert.Instance.Play(alertType);
         }
     }
 }
示例#6
0
 internal AudioAlertEventArgs(AudioAlertType alertType)
 {
     AlertType = alertType;
 }