Esempio n. 1
0
 /// <summary>
 /// Checks whether Spotify is muted in the Volume Mixer control (required Windows 7 or newer)
 /// </summary>
 /// <returns>Null if an error occured, otherwise the muted state</returns>
 public bool IsSpotifyMuted()
 {
     if (!IsOSCompatible(WindowsSevenMajorVersion, WindowsSevenMinorVersion))
     {
         throw new NotSupportedException("This feature is only available on Windows 7 or newer");
     }
     return(VolumeMixerControl.IsSpotifyMuted());
 }
Esempio n. 2
0
 /// <summary>
 /// Checks whether Spotify is muted in the Volume Mixer control (required Windows 7 or newer)
 /// </summary>
 /// <returns>Null if an error occured, otherwise the muted state</returns>
 public bool IsSpotifyMuted()
 {
     //Windows < Windows Vista Check
     if (Environment.OSVersion.Version.Major < 6)
     {
         throw new NotSupportedException("This feature is only available on Windows 7 or newer");
     }
     //Windows Vista Check
     if (Environment.OSVersion.Version.Major == 6)
     {
         if (Environment.OSVersion.Version.Minor == 0)
         {
             throw new NotSupportedException("This feature is only available on Windows 7 or newer");
         }
     }
     return(VolumeMixerControl.IsSpotifyMuted());
 }