mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Re-enabled Razer, fixed profile import when no keyboard is active
This commit is contained in:
parent
35de216762
commit
985b840af3
@ -20,7 +20,7 @@ namespace Artemis
|
||||
|
||||
public ArtemisBootstrapper()
|
||||
{
|
||||
//CheckDuplicateInstances();
|
||||
CheckDuplicateInstances();
|
||||
Initialize();
|
||||
BindSpecialValues();
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ using Artemis.DeviceProviders.Razer.Utilities;
|
||||
using Artemis.Properties;
|
||||
using Corale.Colore.Core;
|
||||
using Corale.Colore.Razer;
|
||||
using Corale.Colore.Razer.Keyboard;
|
||||
using Constants = Corale.Colore.Razer.Keyboard.Constants;
|
||||
|
||||
namespace Artemis.DeviceProviders.Razer
|
||||
@ -25,8 +24,6 @@ namespace Artemis.DeviceProviders.Razer
|
||||
|
||||
public override bool CanEnable()
|
||||
{
|
||||
return true;
|
||||
|
||||
if (!Chroma.IsSdkAvailable())
|
||||
return false;
|
||||
|
||||
@ -38,19 +35,16 @@ namespace Artemis.DeviceProviders.Razer
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
return;
|
||||
Chroma.Instance.Initialize();
|
||||
}
|
||||
|
||||
public override void Disable()
|
||||
{
|
||||
return;
|
||||
Chroma.Instance.Uninitialize();
|
||||
}
|
||||
|
||||
public override void DrawBitmap(Bitmap bitmap)
|
||||
{
|
||||
return;
|
||||
var razerArray = RazerUtilities.BitmapColorArray(bitmap, Height, Width);
|
||||
Chroma.Instance.Keyboard.SetCustom(razerArray);
|
||||
}
|
||||
|
||||
@ -133,6 +133,7 @@ namespace Artemis.ViewModels.Flyouts
|
||||
// TODO https://github.com/ninject/Ninject.Extensions.Logging/issues/35
|
||||
private void ApplyLogging()
|
||||
{
|
||||
return;
|
||||
var c = LogManager.Configuration;
|
||||
var file = c.FindTargetByName("file") as FileTarget;
|
||||
if (file == null)
|
||||
|
||||
@ -560,6 +560,12 @@ namespace Artemis.ViewModels.Profiles
|
||||
|
||||
public async void ImportProfile()
|
||||
{
|
||||
if (_mainManager.DeviceManager.ActiveKeyboard == null)
|
||||
{
|
||||
DialogService.ShowMessageBox("Cannot import profile.",
|
||||
"To import a profile, please select a keyboard in the options menu first.");
|
||||
return;
|
||||
}
|
||||
var dialog = new OpenFileDialog {Filter = "Artemis profile (*.xml)|*.xml"};
|
||||
var result = dialog.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user