1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Customized a warning message for corsair

This commit is contained in:
Logan Saso 2016-02-20 16:36:04 -08:00
parent 7f498cfeca
commit 3c931c3140
3 changed files with 25 additions and 3 deletions

View File

@ -30,6 +30,11 @@ namespace Artemis.KeyboardProviders.Corsair
return false; return false;
throw; throw;
} }
catch (WrapperException)
{
CueSDK.Reinitialize();
return true;
}
return true; return true;

View File

@ -30,6 +30,11 @@ namespace Artemis.KeyboardProviders.Corsair
return false; return false;
throw; throw;
} }
catch (WrapperException)
{
CueSDK.Reinitialize();
return true;
}
return true; return true;

View File

@ -115,11 +115,23 @@ namespace Artemis.Models
// Disable everything if there's no active keyboard found // Disable everything if there's no active keyboard found
if (!keyboardProvider.CanEnable()) if (!keyboardProvider.CanEnable())
{ {
string message;
if (keyboardProvider.Name.ToLower().Contains("Corsair"))
{
message = "Couldn't connect to the " + keyboardProvider.Name + ".\n " +
"Please check your cables and/or drivers (could be outdated) and that Corsair Utility Engine is running.\n\n " +
"If needed, you can select a different keyboard in Artemis under settings.";
}
else
{
message = "Couldn't connect to the " + keyboardProvider.Name + ".\n " +
"Please check your cables and/or drivers (could be outdated).\n\n " +
"If needed, you can select a different keyboard in Artemis under settings.";
}
ActiveKeyboard = null; ActiveKeyboard = null;
MessageBox.Show( MessageBox.Show(
"Couldn't connect to the " + keyboardProvider.Name + ".\n " + message,
"Please check your cables and/or drivers (could be outdated).\n\n " +
"If needed, you can select a different keyboard in Artemis under settings",
"Artemis (╯°□°)╯︵ ┻━┻", "Artemis (╯°□°)╯︵ ┻━┻",
MessageBoxButtons.OK, MessageBoxButtons.OK,
MessageBoxIcon.Warning); MessageBoxIcon.Warning);