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()
|
public ArtemisBootstrapper()
|
||||||
{
|
{
|
||||||
//CheckDuplicateInstances();
|
CheckDuplicateInstances();
|
||||||
Initialize();
|
Initialize();
|
||||||
BindSpecialValues();
|
BindSpecialValues();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ using Artemis.DeviceProviders.Razer.Utilities;
|
|||||||
using Artemis.Properties;
|
using Artemis.Properties;
|
||||||
using Corale.Colore.Core;
|
using Corale.Colore.Core;
|
||||||
using Corale.Colore.Razer;
|
using Corale.Colore.Razer;
|
||||||
using Corale.Colore.Razer.Keyboard;
|
|
||||||
using Constants = Corale.Colore.Razer.Keyboard.Constants;
|
using Constants = Corale.Colore.Razer.Keyboard.Constants;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Razer
|
namespace Artemis.DeviceProviders.Razer
|
||||||
@ -25,8 +24,6 @@ namespace Artemis.DeviceProviders.Razer
|
|||||||
|
|
||||||
public override bool CanEnable()
|
public override bool CanEnable()
|
||||||
{
|
{
|
||||||
return true;
|
|
||||||
|
|
||||||
if (!Chroma.IsSdkAvailable())
|
if (!Chroma.IsSdkAvailable())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -38,19 +35,16 @@ namespace Artemis.DeviceProviders.Razer
|
|||||||
|
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
Chroma.Instance.Initialize();
|
Chroma.Instance.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Disable()
|
public override void Disable()
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
Chroma.Instance.Uninitialize();
|
Chroma.Instance.Uninitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DrawBitmap(Bitmap bitmap)
|
public override void DrawBitmap(Bitmap bitmap)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
var razerArray = RazerUtilities.BitmapColorArray(bitmap, Height, Width);
|
var razerArray = RazerUtilities.BitmapColorArray(bitmap, Height, Width);
|
||||||
Chroma.Instance.Keyboard.SetCustom(razerArray);
|
Chroma.Instance.Keyboard.SetCustom(razerArray);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -133,6 +133,7 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
// TODO https://github.com/ninject/Ninject.Extensions.Logging/issues/35
|
// TODO https://github.com/ninject/Ninject.Extensions.Logging/issues/35
|
||||||
private void ApplyLogging()
|
private void ApplyLogging()
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
var c = LogManager.Configuration;
|
var c = LogManager.Configuration;
|
||||||
var file = c.FindTargetByName("file") as FileTarget;
|
var file = c.FindTargetByName("file") as FileTarget;
|
||||||
if (file == null)
|
if (file == null)
|
||||||
|
|||||||
@ -560,6 +560,12 @@ namespace Artemis.ViewModels.Profiles
|
|||||||
|
|
||||||
public async void ImportProfile()
|
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 dialog = new OpenFileDialog {Filter = "Artemis profile (*.xml)|*.xml"};
|
||||||
var result = dialog.ShowDialog();
|
var result = dialog.ShowDialog();
|
||||||
if (result != DialogResult.OK)
|
if (result != DialogResult.OK)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user