public override bool CanEnable()
{
// Check to see if VC++ 2012 x64 is installed.
if (Registry.LocalMachine.OpenSubKey(
@"SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}") == null)
{
CantEnableText = "Couldn't connect to your Logitech keyboard.\n" +
"The Visual C++ 2012 Redistributable could not be found, which is required.\n" +
"Please download it by going to the following URL:\n\n" +
"https://www.microsoft.com/download/confirmation.aspx?id=30679";
return false;
}
if (DllManager.RestoreLogitechDll())
RestoreDll();
int majorNum = 0, minorNum = 0, buildNum = 0;
LogitechGSDK.LogiLedInit();
LogitechGSDK.LogiLedGetSdkVersion(ref majorNum, ref minorNum, ref buildNum);
LogitechGSDK.LogiLedShutdown();
// Turn it into one long number...
var version = int.Parse($"{majorNum}{minorNum}{buildNum}");
CantEnableText = "Couldn't connect to your Logitech keyboard.\n" +
"Please check your cables and updating the Logitech Gaming Software\n" +
$"A minimum version of 8.81.15 is required (detected {majorNum}.{minorNum}.{buildNum}).\n\n" +
"If the detected version differs from the version LGS is reporting, reinstall LGS or see the FAQ.\n\n" +
"If needed, you can select a different keyboard in Artemis under settings.";
return version >= 88115;
}