using System;
using System.Diagnostics;
namespace C4IT_CustomerPanel.libs
{
public class VersionHelper
{
///
/// OS is at least Windows Vista
///
public static bool IsAtLeastVista
{
get
{
if (Environment.OSVersion.Version.Major < 6)
{
Debug.WriteLine("How about trying this on Vista?");
return false;
}
return true;
}
}
///
/// OS is Windows 7 or higher
///
public static bool IsWindows7orHigher
{
get
{
if (Environment.OSVersion.Version.Major == 6 &&
Environment.OSVersion.Version.Minor >= 1)
{
return true;
}
else if (Environment.OSVersion.Version.Major > 6)
{
return true;
}
else
{
return false;
}
}
}
}
}