This commit is contained in:
Meik
2026-03-05 09:56:57 +01:00
parent 838e6b1ee1
commit 4013fa8e32
827 changed files with 743038 additions and 0 deletions

87
libs/versionHelper.cs Normal file
View File

@@ -0,0 +1,87 @@
using System;
using System.Diagnostics;
namespace C4IT_CustomerPanel.libs
{
public class VersionHelper
{
/// <summary>
/// OS is at least Windows Vista
/// </summary>
public static bool IsAtLeastVista
{
get
{
if (Environment.OSVersion.Version.Major < 6)
{
Debug.WriteLine("How about trying this on Vista?");
return false;
}
return true;
}
}
/// <summary>
/// OS is Windows 7 or higher
/// </summary>
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;
}
}
}
}
}