/// <summary>
 /// Construct a sound view that plays the specified system sound
 /// </summary>
 public SoundView(SystemSound sound)
     : base(1)
 {
     this.DoOnDeploy(c => { sound.Play(); });
 }
Example #2
0
 /// <summary>Plays a system sound.</summary>
 /// <param name="systemSound"><see cref="T:System.Media.SystemSound"></see> object representing the system sound to play.</param>
 public static void PlaySystemSound(SystemSound systemSound)
 {
     if (systemSound == null)
     {
         throw new ArgumentNullException("systemSound");
     }
     systemSound.Play();
 }
 public void PlaySystemSound(SystemSound systemSound)
 {
     if (systemSound == null)
     {
         throw ExceptionUtils.GetArgumentNullException("systemSound");
     }
     systemSound.Play();
 }