mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 01:42:02 +00:00
Plugins - Added descriptions
Settings - Plugin settings tab UI - Catch exceptions during exception dialog display Plugins - Implemented enable/disable of plugins (WIP) Novation - Added Launchpad Mini layout and image
This commit is contained in:
parent
57d82fafa8
commit
c62997ca41
92
src/Artemis.Core/Extensions/IEnumerableExtensions.cs
Normal file
92
src/Artemis.Core/Extensions/IEnumerableExtensions.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
// I don't want all of MoreLINQ (https://github.com/morelinq/MoreLINQ) so we'll borrow just this
|
||||||
|
|
||||||
|
#region License and Terms
|
||||||
|
|
||||||
|
// MoreLINQ - Extensions to LINQ to Objects
|
||||||
|
// Copyright (c) 2008 Jonathan Skeet. All rights reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Artemis.Core.Extensions
|
||||||
|
{
|
||||||
|
public static class IEnumerableExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Returns all distinct elements of the given source, where "distinctness"
|
||||||
|
/// is determined via a projection and the default equality comparer for the projected type.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This operator uses deferred execution and streams the results, although
|
||||||
|
/// a set of already-seen keys is retained. If a key is seen multiple times,
|
||||||
|
/// only the first element with that key is returned.
|
||||||
|
/// </remarks>
|
||||||
|
/// <typeparam name="TSource">Type of the source sequence</typeparam>
|
||||||
|
/// <typeparam name="TKey">Type of the projected element</typeparam>
|
||||||
|
/// <param name="source">Source sequence</param>
|
||||||
|
/// <param name="keySelector">Projection for determining "distinctness"</param>
|
||||||
|
/// <returns>
|
||||||
|
/// A sequence consisting of distinct elements from the source sequence,
|
||||||
|
/// comparing them by the specified key projection.
|
||||||
|
/// </returns>
|
||||||
|
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source,
|
||||||
|
Func<TSource, TKey> keySelector)
|
||||||
|
{
|
||||||
|
return source.DistinctBy(keySelector, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns all distinct elements of the given source, where "distinctness"
|
||||||
|
/// is determined via a projection and the specified comparer for the projected type.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This operator uses deferred execution and streams the results, although
|
||||||
|
/// a set of already-seen keys is retained. If a key is seen multiple times,
|
||||||
|
/// only the first element with that key is returned.
|
||||||
|
/// </remarks>
|
||||||
|
/// <typeparam name="TSource">Type of the source sequence</typeparam>
|
||||||
|
/// <typeparam name="TKey">Type of the projected element</typeparam>
|
||||||
|
/// <param name="source">Source sequence</param>
|
||||||
|
/// <param name="keySelector">Projection for determining "distinctness"</param>
|
||||||
|
/// <param name="comparer">
|
||||||
|
/// The equality comparer to use to determine whether or not keys are equal.
|
||||||
|
/// If null, the default equality comparer for <c>TSource</c> is used.
|
||||||
|
/// </param>
|
||||||
|
/// <returns>
|
||||||
|
/// A sequence consisting of distinct elements from the source sequence,
|
||||||
|
/// comparing them by the specified key projection.
|
||||||
|
/// </returns>
|
||||||
|
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source,
|
||||||
|
Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
|
||||||
|
{
|
||||||
|
if (source == null) throw new ArgumentNullException(nameof(source));
|
||||||
|
if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));
|
||||||
|
|
||||||
|
return _();
|
||||||
|
|
||||||
|
IEnumerable<TSource> _()
|
||||||
|
{
|
||||||
|
var knownKeys = new HashSet<TKey>(comparer);
|
||||||
|
foreach (var element in source)
|
||||||
|
{
|
||||||
|
if (knownKeys.Add(keySelector(element)))
|
||||||
|
yield return element;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,7 +3,9 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Artemis.Core.Extensions;
|
using Artemis.Core.Extensions;
|
||||||
using Artemis.Core.Plugins.Models;
|
using Artemis.Core.Plugins.Models;
|
||||||
|
using Ninject;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace Artemis.Core.Plugins.Abstract
|
namespace Artemis.Core.Plugins.Abstract
|
||||||
{
|
{
|
||||||
@ -20,6 +22,8 @@ namespace Artemis.Core.Plugins.Abstract
|
|||||||
|
|
||||||
public IRGBDeviceProvider RgbDeviceProvider { get; }
|
public IRGBDeviceProvider RgbDeviceProvider { get; }
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
protected void ResolveAbsolutePath(Type type, object sender, ResolvePathEventArgs e)
|
protected void ResolveAbsolutePath(Type type, object sender, ResolvePathEventArgs e)
|
||||||
{
|
{
|
||||||
@ -30,7 +34,24 @@ namespace Artemis.Core.Plugins.Abstract
|
|||||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePart, e.FileName);
|
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePart, e.FileName);
|
||||||
else if (e.RelativePath != null)
|
else if (e.RelativePath != null)
|
||||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePath);
|
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePath);
|
||||||
|
|
||||||
|
var deviceInfo = ((IRGBDevice) sender).DeviceInfo;
|
||||||
|
if (e.FileName != null && !File.Exists(e.FinalPath))
|
||||||
|
{
|
||||||
|
Logger?.Information("Couldn't find a layout for device {deviceName}, model {deviceModel} at {filePath}",
|
||||||
|
deviceInfo.DeviceName, deviceInfo.Model, e.FinalPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
// Does not happen with device providers, they require Artemis to restart
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void DisablePlugin()
|
||||||
|
{
|
||||||
|
// Does not happen with device providers, they require Artemis to restart
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,6 +31,12 @@ namespace Artemis.Core.Plugins.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugins display icon that's shown in the settings see <see href="https://materialdesignicons.com" /> for available
|
||||||
|
/// icons
|
||||||
|
/// </summary>
|
||||||
|
public string Icon { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The version of the plugin
|
/// The version of the plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -78,7 +84,7 @@ namespace Artemis.Core.Plugins.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
internal PluginEntity PluginEntity { get; set; }
|
internal PluginEntity PluginEntity { get; set; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{nameof(Guid)}: {Guid}, {nameof(Name)}: {Name}, {nameof(Version)}: {Version}";
|
return $"{nameof(Guid)}: {Guid}, {nameof(Name)}: {Name}, {nameof(Version)}: {Version}";
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Windows;
|
||||||
using Artemis.Core.Events;
|
using Artemis.Core.Events;
|
||||||
using Artemis.Core.Exceptions;
|
using Artemis.Core.Exceptions;
|
||||||
using Artemis.Core.Extensions;
|
using Artemis.Core.Extensions;
|
||||||
@ -10,6 +12,7 @@ using Artemis.Core.Plugins.Abstract;
|
|||||||
using Artemis.Core.Plugins.Exceptions;
|
using Artemis.Core.Plugins.Exceptions;
|
||||||
using Artemis.Core.Plugins.Models;
|
using Artemis.Core.Plugins.Models;
|
||||||
using Artemis.Core.Services.Interfaces;
|
using Artemis.Core.Services.Interfaces;
|
||||||
|
using Artemis.Core.Utilities;
|
||||||
using Artemis.Storage.Entities.Plugins;
|
using Artemis.Storage.Entities.Plugins;
|
||||||
using Artemis.Storage.Repositories.Interfaces;
|
using Artemis.Storage.Repositories.Interfaces;
|
||||||
using McMaster.NETCore.Plugins;
|
using McMaster.NETCore.Plugins;
|
||||||
@ -219,7 +222,7 @@ namespace Artemis.Core.Services
|
|||||||
var pluginEntity = _pluginRepository.GetPluginByGuid(pluginInfo.Guid);
|
var pluginEntity = _pluginRepository.GetPluginByGuid(pluginInfo.Guid);
|
||||||
if (pluginEntity == null)
|
if (pluginEntity == null)
|
||||||
pluginEntity = new PluginEntity {PluginGuid = pluginInfo.Guid, IsEnabled = true, LastEnableSuccessful = true};
|
pluginEntity = new PluginEntity {PluginGuid = pluginInfo.Guid, IsEnabled = true, LastEnableSuccessful = true};
|
||||||
|
|
||||||
pluginInfo.PluginEntity = pluginEntity;
|
pluginInfo.PluginEntity = pluginEntity;
|
||||||
pluginInfo.Enabled = pluginEntity.IsEnabled;
|
pluginInfo.Enabled = pluginEntity.IsEnabled;
|
||||||
|
|
||||||
@ -332,7 +335,7 @@ namespace Artemis.Core.Services
|
|||||||
plugin.PluginInfo.PluginEntity.LastEnableSuccessful = true;
|
plugin.PluginInfo.PluginEntity.LastEnableSuccessful = true;
|
||||||
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
|
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
OnPluginEnabled(new PluginEventArgs(plugin.PluginInfo));
|
OnPluginEnabled(new PluginEventArgs(plugin.PluginInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,11 +345,15 @@ namespace Artemis.Core.Services
|
|||||||
plugin.PluginInfo.PluginEntity.IsEnabled = false;
|
plugin.PluginInfo.PluginEntity.IsEnabled = false;
|
||||||
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
|
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
|
||||||
|
|
||||||
|
// Device providers cannot be disabled at runtime, restart the application
|
||||||
|
if (plugin is DeviceProvider)
|
||||||
|
{
|
||||||
|
CurrentProcessUtilities.RestartSelf();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
plugin.DisablePlugin();
|
plugin.DisablePlugin();
|
||||||
|
|
||||||
// We got this far so the plugin enabled and we didn't crash horribly, yay
|
|
||||||
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
|
|
||||||
|
|
||||||
OnPluginDisabled(new PluginEventArgs(plugin.PluginInfo));
|
OnPluginDisabled(new PluginEventArgs(plugin.PluginInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
27
src/Artemis.Core/Utilities/CurrentProcessUtilities.cs
Normal file
27
src/Artemis.Core/Utilities/CurrentProcessUtilities.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using Stylet;
|
||||||
|
|
||||||
|
namespace Artemis.Core.Utilities
|
||||||
|
{
|
||||||
|
public static class CurrentProcessUtilities
|
||||||
|
{
|
||||||
|
public static string GetCurrentLocation()
|
||||||
|
{
|
||||||
|
return Process.GetCurrentProcess().MainModule.FileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RestartSelf()
|
||||||
|
{
|
||||||
|
var info = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
Arguments = "/C choice /C Y /N /D Y /T 5 & START /wait taskkill /f /im \"Artemis.UI.exe\" & START \"\" \"" + GetCurrentLocation() + "\"",
|
||||||
|
WindowStyle = ProcessWindowStyle.Hidden,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
FileName = "cmd.exe"
|
||||||
|
};
|
||||||
|
Process.Start(info);
|
||||||
|
Execute.OnUIThread(() => Application.Current.Shutdown());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -100,12 +100,19 @@ namespace Artemis.UI.Shared.Services.Dialog
|
|||||||
|
|
||||||
private async Task<object> ShowDialog(string identifier, DialogViewModelBase viewModel)
|
private async Task<object> ShowDialog(string identifier, DialogViewModelBase viewModel)
|
||||||
{
|
{
|
||||||
var view = _viewManager.CreateViewForModel(viewModel);
|
Task<object> result = null;
|
||||||
_viewManager.BindViewToModel(view, viewModel);
|
await Execute.OnUIThreadAsync(() =>
|
||||||
|
{
|
||||||
|
var view = _viewManager.CreateViewForModel(viewModel);
|
||||||
|
_viewManager.BindViewToModel(view, viewModel);
|
||||||
|
|
||||||
|
if (identifier == null)
|
||||||
|
result = DialogHost.Show(view, viewModel.OnDialogOpened, viewModel.OnDialogClosed);
|
||||||
|
else
|
||||||
|
result = DialogHost.Show(view, identifier, viewModel.OnDialogOpened, viewModel.OnDialogClosed);
|
||||||
|
});
|
||||||
|
|
||||||
if (identifier == null)
|
return await result;
|
||||||
return await DialogHost.Show(view, viewModel.OnDialogOpened, viewModel.OnDialogClosed);
|
|
||||||
return await DialogHost.Show(view, identifier, viewModel.OnDialogOpened, viewModel.OnDialogClosed);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,7 +93,14 @@ namespace Artemis.UI
|
|||||||
logger.Fatal(e.Exception, "Unhandled exception");
|
logger.Fatal(e.Exception, "Unhandled exception");
|
||||||
|
|
||||||
var dialogService = Kernel.Get<IDialogService>();
|
var dialogService = Kernel.Get<IDialogService>();
|
||||||
dialogService.ShowExceptionDialog("Artemis encountered an error", e.Exception);
|
try
|
||||||
|
{
|
||||||
|
dialogService.ShowExceptionDialog("Artemis encountered an error", e.Exception);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// We did our best eh.. trap exceptions during exception display here to avoid an infinite loop
|
||||||
|
}
|
||||||
|
|
||||||
// Don't shut down, is that a good idea? Depends on the exception of course..
|
// Don't shut down, is that a good idea? Depends on the exception of course..
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
|||||||
@ -225,56 +225,28 @@
|
|||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="PLUGINS" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
<TabItem Header="PLUGINS" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
||||||
<DockPanel Margin="15">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0 12 0 0">
|
||||||
<TextBlock DockPanel.Dock="Top">The list below shows all loaded plugins. If you're missing something, view your logs folder.</TextBlock>
|
<DockPanel Margin="15" MaxWidth="1230" HorizontalAlignment="Center">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
<TextBlock DockPanel.Dock="Top">The list below shows all loaded plugins. If you're missing something, view your logs folder.</TextBlock>
|
||||||
<DataGrid Margin="0 8 0 0"
|
<ItemsControl ItemsSource="{Binding Plugins}">
|
||||||
ItemsSource="{Binding Plugins}"
|
<ItemsControl.ItemsPanel>
|
||||||
CanUserSortColumns="True"
|
<ItemsPanelTemplate>
|
||||||
CanUserAddRows="False"
|
<WrapPanel />
|
||||||
AutoGenerateColumns="False"
|
</ItemsPanelTemplate>
|
||||||
materialDesign:DataGridAssist.CellPadding="13 8 8 8"
|
</ItemsControl.ItemsPanel>
|
||||||
materialDesign:DataGridAssist.ColumnHeaderPadding="8">
|
<ItemsControl.ItemTemplate>
|
||||||
<DataGrid.Columns>
|
<DataTemplate>
|
||||||
<DataGridTextColumn Binding="{Binding Type}" Header="Type" IsReadOnly="True" />
|
<ContentControl xaml:View.Model="{Binding}" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top" />
|
||||||
<DataGridTextColumn Binding="{Binding Name}" Header="Name" IsReadOnly="True" Width="*" />
|
</DataTemplate>
|
||||||
<DataGridTextColumn Binding="{Binding Description}" Header="Description" IsReadOnly="True" Width="*" />
|
</ItemsControl.ItemTemplate>
|
||||||
<DataGridTextColumn Binding="{Binding Version}" Header="Version" IsReadOnly="True" />
|
</ItemsControl>
|
||||||
<DataGridTemplateColumn>
|
</DockPanel>
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
</ScrollViewer>
|
||||||
<DataTemplate >
|
|
||||||
<Button Style="{StaticResource MaterialDesignOutlinedButton}" s:View.ActionTarget="{Binding}" Command="{s:Action OpenSettings}">
|
|
||||||
CONFIGURE
|
|
||||||
</Button>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
<DataGridCheckBoxColumn Header="Enabled"
|
|
||||||
Binding="{Binding IsEnabled}"
|
|
||||||
ElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnStyle}"
|
|
||||||
EditingElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnEditingStyle}">
|
|
||||||
<DataGridCheckBoxColumn.HeaderStyle>
|
|
||||||
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
||||||
<Setter Property="ContentTemplate">
|
|
||||||
<Setter.Value>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding}" TextAlignment="Right" />
|
|
||||||
</DataTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</DataGridCheckBoxColumn.HeaderStyle>
|
|
||||||
</DataGridCheckBoxColumn>
|
|
||||||
</DataGrid.Columns>
|
|
||||||
</DataGrid>
|
|
||||||
</ScrollViewer>
|
|
||||||
</DockPanel>
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="DEVICES" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
<TabItem Header="DEVICES" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
||||||
<DockPanel Margin="15">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0 12 0 0">
|
||||||
<TextBlock DockPanel.Dock="Top">Below you view and manage the devices that were detected by Artemis</TextBlock>
|
<DockPanel Margin="15" MaxWidth="1230" HorizontalAlignment="Center">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0 12 0 0">
|
<TextBlock DockPanel.Dock="Top">Below you view and manage the devices that were detected by Artemis</TextBlock>
|
||||||
<ItemsControl ItemsSource="{Binding DeviceSettingsViewModels}">
|
<ItemsControl ItemsSource="{Binding DeviceSettingsViewModels}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
@ -287,8 +259,8 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</ScrollViewer>
|
</DockPanel>
|
||||||
</DockPanel>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -10,6 +10,7 @@ using Artemis.Core.Plugins.Abstract;
|
|||||||
using Artemis.Core.Services;
|
using Artemis.Core.Services;
|
||||||
using Artemis.Core.Services.Interfaces;
|
using Artemis.Core.Services.Interfaces;
|
||||||
using Artemis.Core.Services.Storage.Interfaces;
|
using Artemis.Core.Services.Storage.Interfaces;
|
||||||
|
using Artemis.Core.Utilities;
|
||||||
using Artemis.UI.Ninject.Factories;
|
using Artemis.UI.Ninject.Factories;
|
||||||
using Artemis.UI.Screens.Settings.Debug;
|
using Artemis.UI.Screens.Settings.Debug;
|
||||||
using Artemis.UI.Screens.Settings.Tabs.Devices;
|
using Artemis.UI.Screens.Settings.Tabs.Devices;
|
||||||
@ -205,7 +206,7 @@ namespace Artemis.UI.Screens.Settings
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var autoRunFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Artemis.lnk");
|
var autoRunFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Artemis.lnk");
|
||||||
var executableFile = Process.GetCurrentProcess().MainModule.FileName;
|
var executableFile = CurrentProcessUtilities.GetCurrentLocation();
|
||||||
|
|
||||||
if (File.Exists(autoRunFile))
|
if (File.Exists(autoRunFile))
|
||||||
File.Delete(autoRunFile);
|
File.Delete(autoRunFile);
|
||||||
|
|||||||
@ -41,8 +41,8 @@
|
|||||||
<materialDesign:PackIcon Kind="AlarmLight" />
|
<materialDesign:PackIcon Kind="AlarmLight" />
|
||||||
</Button>
|
</Button>
|
||||||
<StackPanel Grid.Row="1" Margin="8 24 8 0">
|
<StackPanel Grid.Row="1" Margin="8 24 8 0">
|
||||||
<TextBlock FontWeight="Bold" Text="{Binding Device.RgbDevice.DeviceInfo.Model}" />
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Text="{Binding Device.RgbDevice.DeviceInfo.Model}" />
|
||||||
<TextBlock TextWrapping="Wrap" VerticalAlignment="Center">
|
<TextBlock TextWrapping="Wrap" Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
|
||||||
<Run Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer, Mode=OneWay}" />
|
<Run Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer, Mode=OneWay}" />
|
||||||
-
|
-
|
||||||
<Run Text="{Binding Device.RgbDevice.DeviceInfo.DeviceType, Mode=OneWay}" />
|
<Run Text="{Binding Device.RgbDevice.DeviceInfo.DeviceType, Mode=OneWay}" />
|
||||||
|
|||||||
@ -0,0 +1,70 @@
|
|||||||
|
<UserControl x:Class="Artemis.UI.Screens.Settings.Tabs.Plugins.PluginSettingsView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
|
xmlns:s="https://github.com/canton7/Stylet"
|
||||||
|
xmlns:devices="clr-namespace:Artemis.UI.Screens.Settings.Tabs.Plugins"
|
||||||
|
d:DataContext="{d:DesignInstance devices:PluginSettingsViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
|
||||||
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml" />
|
||||||
|
<ResourceDictionary
|
||||||
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<materialDesign:Card Width="400">
|
||||||
|
<Grid Margin="8">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="100" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid Grid.Row="0" Grid.ColumnSpan="2" Margin="0 10">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<materialDesign:PackIcon Kind="{Binding Icon}" Width="48" Height="48" Grid.Row="0" Grid.RowSpan="2" HorizontalAlignment="Center" />
|
||||||
|
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Text="{Binding PluginInfo.Name}" Grid.Column="1" Grid.Row="0" />
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="{Binding PluginInfo.Description}"
|
||||||
|
Style="{StaticResource MaterialDesignTextBlock}"
|
||||||
|
Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
|
||||||
|
<Button Style="{StaticResource MaterialDesignOutlinedButton}" ToolTip="MaterialDesignOutlinedButton" Margin="4" s:View.ActionTarget="{Binding}" Command="{s:Action OpenSettings}">
|
||||||
|
Settings
|
||||||
|
</Button>
|
||||||
|
<!-- <Button Style="{StaticResource MaterialDesignOutlinedButton}" ToolTip="MaterialDesignOutlinedButton" Margin="4"> -->
|
||||||
|
<!-- Details -->
|
||||||
|
<!-- </Button> -->
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8">
|
||||||
|
<CheckBox Style="{StaticResource MaterialDesignCheckBox}" IsChecked="{Binding IsEnabled}">
|
||||||
|
Plugin enabled
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</materialDesign:Card>
|
||||||
|
</UserControl>
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for PluginSettingsView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PluginSettingsView : UserControl
|
||||||
|
{
|
||||||
|
public PluginSettingsView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Artemis.Core.Plugins.Abstract;
|
using Artemis.Core.Plugins.Abstract;
|
||||||
|
using Artemis.Core.Plugins.LayerBrush;
|
||||||
|
using Artemis.Core.Plugins.Models;
|
||||||
using Artemis.Core.Services.Interfaces;
|
using Artemis.Core.Services.Interfaces;
|
||||||
using Artemis.UI.Shared.Services.Interfaces;
|
using Artemis.UI.Shared.Services.Interfaces;
|
||||||
|
using MaterialDesignThemes.Wpf;
|
||||||
using Stylet;
|
using Stylet;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||||
@ -10,36 +13,65 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
|||||||
public class PluginSettingsViewModel : PropertyChangedBase
|
public class PluginSettingsViewModel : PropertyChangedBase
|
||||||
{
|
{
|
||||||
private readonly IDialogService _dialogService;
|
private readonly IDialogService _dialogService;
|
||||||
private readonly Plugin _plugin;
|
|
||||||
private readonly IPluginService _pluginService;
|
private readonly IPluginService _pluginService;
|
||||||
private readonly IWindowManager _windowManager;
|
private readonly IWindowManager _windowManager;
|
||||||
|
|
||||||
public PluginSettingsViewModel(Plugin plugin, IWindowManager windowManager, IDialogService dialogService, IPluginService pluginService)
|
public PluginSettingsViewModel(Plugin plugin, IWindowManager windowManager, IDialogService dialogService, IPluginService pluginService)
|
||||||
{
|
{
|
||||||
_plugin = plugin;
|
Plugin = plugin;
|
||||||
|
PluginInfo = plugin.PluginInfo;
|
||||||
|
|
||||||
_windowManager = windowManager;
|
_windowManager = windowManager;
|
||||||
_dialogService = dialogService;
|
_dialogService = dialogService;
|
||||||
_pluginService = pluginService;
|
_pluginService = pluginService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Type => _plugin.GetType().BaseType?.Name ?? _plugin.GetType().Name;
|
public Plugin Plugin { get; set; }
|
||||||
public string Name => _plugin.PluginInfo.Name;
|
public PluginInfo PluginInfo { get; set; }
|
||||||
public string Description => _plugin.PluginInfo.Description;
|
|
||||||
public Version Version => _plugin.PluginInfo.Version;
|
public string Type => Plugin.GetType().BaseType?.Name ?? Plugin.GetType().Name;
|
||||||
|
|
||||||
|
public PackIconKind Icon => GetIconKind();
|
||||||
|
|
||||||
|
private PackIconKind GetIconKind()
|
||||||
|
{
|
||||||
|
if (PluginInfo.Icon != null)
|
||||||
|
{
|
||||||
|
var parsedIcon = Enum.TryParse<PackIconKind>(PluginInfo.Icon, true, out var iconEnum);
|
||||||
|
if (parsedIcon == false)
|
||||||
|
return PackIconKind.QuestionMarkCircle;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (Plugin)
|
||||||
|
{
|
||||||
|
case DataModelExpansion _:
|
||||||
|
return PackIconKind.TableAdd;
|
||||||
|
case DeviceProvider _:
|
||||||
|
return PackIconKind.Devices;
|
||||||
|
case ProfileModule _:
|
||||||
|
return PackIconKind.VectorRectangle;
|
||||||
|
case Core.Plugins.Abstract.Module _:
|
||||||
|
return PackIconKind.GearBox;
|
||||||
|
case LayerBrushProvider _:
|
||||||
|
return PackIconKind.Brush;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PackIconKind.Plugin;
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsEnabled
|
public bool IsEnabled
|
||||||
{
|
{
|
||||||
get => _plugin.PluginInfo.Enabled;
|
get => PluginInfo.Enabled;
|
||||||
set => Task.Run(() => UpdateEnabled(value));
|
set => Task.Run(() => UpdateEnabled(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanOpenSettings => IsEnabled && _plugin.HasConfigurationViewModel;
|
public bool CanOpenSettings => IsEnabled && Plugin.HasConfigurationViewModel;
|
||||||
|
|
||||||
public async Task OpenSettings()
|
public async Task OpenSettings()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var configurationViewModel = _plugin.GetConfigurationViewModel();
|
var configurationViewModel = Plugin.GetConfigurationViewModel();
|
||||||
if (configurationViewModel != null)
|
if (configurationViewModel != null)
|
||||||
_windowManager.ShowDialog(new PluginSettingsWindowViewModel(configurationViewModel));
|
_windowManager.ShowDialog(new PluginSettingsWindowViewModel(configurationViewModel));
|
||||||
}
|
}
|
||||||
@ -50,15 +82,33 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateEnabled(in bool enable)
|
private async Task UpdateEnabled(bool enable)
|
||||||
{
|
{
|
||||||
if (_plugin.PluginInfo.Enabled == enable)
|
if (PluginInfo.Enabled == enable)
|
||||||
|
{
|
||||||
|
NotifyOfPropertyChange(() => IsEnabled);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!enable && Plugin is DeviceProvider)
|
||||||
|
{
|
||||||
|
var confirm = await _dialogService.ShowConfirmDialog(
|
||||||
|
"Disable device provider",
|
||||||
|
"You are disabling a device provider, this requires that Artemis restarts, please confirm."
|
||||||
|
);
|
||||||
|
if (!confirm)
|
||||||
|
{
|
||||||
|
NotifyOfPropertyChange(() => IsEnabled);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
_pluginService.EnablePlugin(_plugin);
|
_pluginService.EnablePlugin(Plugin);
|
||||||
else
|
else
|
||||||
_pluginService.DisablePlugin(_plugin);
|
_pluginService.DisablePlugin(Plugin);
|
||||||
|
|
||||||
|
NotifyOfPropertyChange(() => IsEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -21,17 +21,5 @@ namespace Artemis.Plugins.Devices.Asus
|
|||||||
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(AsusRGBDevice<>), sender, args);
|
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(AsusRGBDevice<>), sender, args);
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// AsusDeviceProvider.Instance.ResetDevices();
|
|
||||||
// AsusDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "c20e876f-7cb0-4fa1-b0cc-ae1afb5865d1",
|
"Guid": "c20e876f-7cb0-4fa1-b0cc-ae1afb5865d1",
|
||||||
"Name": "Asus Devices",
|
"Name": "Asus Devices",
|
||||||
|
"Description": "Allows Artemis to control lighting on different ASUS devices such as motherboards, GPUs, headsets, RAM, keyboards and PC cases.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Asus.dll"
|
"Main": "Artemis.Plugins.Devices.Asus.dll"
|
||||||
}
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using System.IO;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using Artemis.Core.Plugins.Abstract;
|
using Artemis.Core.Plugins.Abstract;
|
||||||
using Artemis.Core.Plugins.Models;
|
using Artemis.Core.Plugins.Models;
|
||||||
using Artemis.Core.Services.Interfaces;
|
using Artemis.Core.Services.Interfaces;
|
||||||
@ -24,17 +25,5 @@ namespace Artemis.Plugins.Devices.CoolerMaster
|
|||||||
RGB.NET.Devices.CoolerMaster.CoolerMasterDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CMSDK.dll"));
|
RGB.NET.Devices.CoolerMaster.CoolerMasterDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CMSDK.dll"));
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// CoolerMasterDeviceProvider.Instance.ResetDevices();
|
|
||||||
// CoolerMasterDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "b78f644b-827f-4bb4-bf03-2adaa365b58b",
|
"Guid": "b78f644b-827f-4bb4-bf03-2adaa365b58b",
|
||||||
"Name": "CoolerMaster Devices",
|
"Name": "CoolerMaster Devices",
|
||||||
|
"Description": "Allows Artemis to control the lighting on CoolerMaster mice and keyboards.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.CoolerMaster.dll"
|
"Main": "Artemis.Plugins.Devices.CoolerMaster.dll"
|
||||||
}
|
}
|
||||||
@ -24,16 +24,5 @@ namespace Artemis.Plugins.Devices.Corsair
|
|||||||
RGB.NET.Devices.Corsair.CorsairDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CUESDK_2017.dll"));
|
RGB.NET.Devices.Corsair.CorsairDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CUESDK_2017.dll"));
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// CorsairDeviceProvider.Instance.ResetDevices();
|
|
||||||
// CorsairDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "926629ab-8170-42f3-be18-22c694aa91cd",
|
"Guid": "926629ab-8170-42f3-be18-22c694aa91cd",
|
||||||
"Name": "Corsair Devices",
|
"Name": "Corsair Devices",
|
||||||
|
"Description": "Allows Artemis to control lighting on all iCUE enabled Corsair products",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Corsair.dll"
|
"Main": "Artemis.Plugins.Devices.Corsair.dll"
|
||||||
}
|
}
|
||||||
@ -24,18 +24,6 @@ namespace Artemis.Plugins.Devices.DMX
|
|||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// DMXDeviceProvider.Instance.ResetDevices();
|
|
||||||
// DMXDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override PluginConfigurationViewModel GetConfigurationViewModel()
|
public override PluginConfigurationViewModel GetConfigurationViewModel()
|
||||||
{
|
{
|
||||||
return new DMXConfigurationViewModel(this);
|
return new DMXConfigurationViewModel(this);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "6f073d4d-d97d-4040-9750-841fdbe06915",
|
"Guid": "6f073d4d-d97d-4040-9750-841fdbe06915",
|
||||||
"Name": "DMX Devices",
|
"Name": "DMX Devices",
|
||||||
|
"Description": "Allows Artemis to control lighting on DMX controllers via a COM port.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.DMX.dll"
|
"Main": "Artemis.Plugins.Devices.DMX.dll"
|
||||||
}
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Artemis.Core.Extensions;
|
||||||
using Artemis.Core.Plugins.Abstract;
|
using Artemis.Core.Plugins.Abstract;
|
||||||
using Artemis.Core.Plugins.Models;
|
using Artemis.Core.Plugins.Models;
|
||||||
using Artemis.Core.Services.Interfaces;
|
using Artemis.Core.Services.Interfaces;
|
||||||
@ -33,18 +34,10 @@ namespace Artemis.Plugins.Devices.Logitech
|
|||||||
if (_logger.IsEnabled(LogEventLevel.Debug))
|
if (_logger.IsEnabled(LogEventLevel.Debug))
|
||||||
LogDeviceIds();
|
LogDeviceIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LogDeviceIds()
|
private void LogDeviceIds()
|
||||||
{
|
{
|
||||||
var devices = DeviceList.Local.GetHidDevices(VENDOR_ID).ToList();
|
var devices = DeviceList.Local.GetHidDevices(VENDOR_ID).DistinctBy(d => d.ProductID).ToList();
|
||||||
_logger.Debug("Found {count} Logitech device(s)", devices.Count);
|
_logger.Debug("Found {count} Logitech device(s)", devices.Count);
|
||||||
foreach (var hidDevice in devices)
|
foreach (var hidDevice in devices)
|
||||||
_logger.Debug("Found Logitech device {name} with PID {pid}", hidDevice.GetFriendlyName(), hidDevice.ProductID);
|
_logger.Debug("Found Logitech device {name} with PID {pid}", hidDevice.GetFriendlyName(), hidDevice.ProductID);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "62a45c0c-884c-4868-9fd7-3c5987fe07ca",
|
"Guid": "62a45c0c-884c-4868-9fd7-3c5987fe07ca",
|
||||||
"Name": "Logitech Devices",
|
"Name": "Logitech Devices",
|
||||||
|
"Description": "Allows Artemis to control the lighting on Logitech mice and keyboards.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Logitech.dll"
|
"Main": "Artemis.Plugins.Devices.Logitech.dll"
|
||||||
}
|
}
|
||||||
@ -24,17 +24,5 @@ namespace Artemis.Plugins.Devices.Msi
|
|||||||
RGB.NET.Devices.Msi.MsiDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "MysticLight_SDK.dll"));
|
RGB.NET.Devices.Msi.MsiDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "MysticLight_SDK.dll"));
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// MsiDeviceProvider.Instance.ResetDevices();
|
|
||||||
// MsiDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "9177c320-1206-48a3-af52-b1749c758786",
|
"Guid": "9177c320-1206-48a3-af52-b1749c758786",
|
||||||
"Name": "Msi Devices",
|
"Name": "MSI Devices",
|
||||||
|
"Description": "Allows Artemis to control the lighting on MSI GPUs and motherboards.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Msi.dll"
|
"Main": "Artemis.Plugins.Devices.Msi.dll"
|
||||||
}
|
}
|
||||||
@ -28,6 +28,11 @@
|
|||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Sanford.Multimedia.Midi" Version="6.6.0">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
||||||
<Private>false</Private>
|
<Private>false</Private>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 563 KiB |
@ -0,0 +1,412 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<Name>Launchpad Mini</Name>
|
||||||
|
<Description>Launchpad Mini (8x8-Pad Grid)</Description>
|
||||||
|
<Type>LedMatrix</Type>
|
||||||
|
<Lighting>Key</Lighting>
|
||||||
|
<Vendor>Novation</Vendor>
|
||||||
|
<Model>Launchpad S</Model>
|
||||||
|
<Width>185</Width>
|
||||||
|
<Height>185</Height>
|
||||||
|
<LedUnitWidth>14</LedUnitWidth>
|
||||||
|
<LedUnitHeight>14</LedUnitHeight>
|
||||||
|
<ImageBasePath>Images\Novation\Launchpads</ImageBasePath>
|
||||||
|
<DeviceImage>LaunchpadMini.png</DeviceImage>
|
||||||
|
<Leds>
|
||||||
|
<Led Id="Custom1">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>16</X>
|
||||||
|
<Y>18</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom2">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom3">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom4">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom5">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom6">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom7">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom8">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+8</X>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix1">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix2">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix3">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix4">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix5">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix6">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix7">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix8">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix9">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix10">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix11">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix12">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix13">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix14">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix15">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix16">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix17">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix18">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix19">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix20">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix21">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix22">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix23">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix24">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix25">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix26">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix27">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix28">
|
||||||
|
<Shape>M0,0 L0,1 L0.75,1 L1,0.75 L1,0 Z</Shape>
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix29">
|
||||||
|
<Shape>M0,0 L0,0.75 L0.25,1 L1,1 L1,0 Z</Shape>
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix30">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix31">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix32">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix33">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix34">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix35">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix36">
|
||||||
|
<Shape>M0,0 L0,1 L1,1 L1,0.25 L0.75,0 Z</Shape>
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix37">
|
||||||
|
<Shape>M0,0.25 L0,1 L1,1 L1,0 L0.25,0 Z</Shape>
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix38">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix39">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix40">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix41">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix42">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix43">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix44">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix45">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix46">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix47">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix48">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix49">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix50">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix51">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix52">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix53">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix54">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix55">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix56">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix57">
|
||||||
|
<X>14</X>
|
||||||
|
<Y>+4</Y>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix58">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix59">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix60">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix61">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix62">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix63">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="LedMatrix64">
|
||||||
|
<X>+4</X>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom9">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>+4</X>
|
||||||
|
<Y>34</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom10">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom11">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom12">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom13">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom14">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom15">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
<Led Id="Custom16">
|
||||||
|
<Shape>Circle</Shape>
|
||||||
|
<X>~</X>
|
||||||
|
<Y>+8</Y>
|
||||||
|
<Width>10mm</Width>
|
||||||
|
<Height>10mm</Height>
|
||||||
|
</Led>
|
||||||
|
</Leds>
|
||||||
|
<LedImageLayouts>
|
||||||
|
<LedImageLayout Layout="Default">
|
||||||
|
<LedImages>
|
||||||
|
<LedImage Id="Custom1" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom2" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom3" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom4" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom5" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom6" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom7" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom8" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom9" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom10" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom11" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom12" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom13" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom14" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom15" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="Custom16" Image="Buttons\Round.png" />
|
||||||
|
<LedImage Id="LedMatrix1" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix2" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix3" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix4" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix5" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix6" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix7" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix8" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix9" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix10" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix11" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix12" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix13" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix14" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix15" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix16" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix17" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix18" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix19" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix20" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix21" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix22" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix23" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix24" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix25" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix26" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix27" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix28" Image="Buttons\GridCenter1.png" />
|
||||||
|
<LedImage Id="LedMatrix29" Image="Buttons\GridCenter2.png" />
|
||||||
|
<LedImage Id="LedMatrix30" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix31" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix32" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix33" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix34" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix35" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix36" Image="Buttons\GridCenter3.png" />
|
||||||
|
<LedImage Id="LedMatrix37" Image="Buttons\GridCenter4.png" />
|
||||||
|
<LedImage Id="LedMatrix38" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix39" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix40" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix41" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix42" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix43" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix44" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix45" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix46" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix47" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix48" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix49" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix50" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix51" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix52" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix53" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix54" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix55" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix56" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix57" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix58" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix59" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix60" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix61" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix62" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix63" Image="Buttons\Grid.png" />
|
||||||
|
<LedImage Id="LedMatrix64" Image="Buttons\Grid.png" />
|
||||||
|
</LedImages>
|
||||||
|
</LedImageLayout>
|
||||||
|
</LedImageLayouts>
|
||||||
|
</Device>
|
||||||
@ -21,17 +21,5 @@ namespace Artemis.Plugins.Devices.Novation
|
|||||||
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(NovationRGBDevice<>), sender, args);
|
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(NovationRGBDevice<>), sender, args);
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// NovationDeviceProvider.Instance.ResetDevices();
|
|
||||||
// NovationDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "a487332f-c4b3-43e7-b80f-f33adc6fff87",
|
"Guid": "a487332f-c4b3-43e7-b80f-f33adc6fff87",
|
||||||
"Name": "Novation Devices",
|
"Name": "Novation Devices",
|
||||||
|
"Description": "Allows Artemis to control the lighting on Novation launchpads.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Novation.dll"
|
"Main": "Artemis.Plugins.Devices.Novation.dll"
|
||||||
}
|
}
|
||||||
@ -24,17 +24,5 @@ namespace Artemis.Plugins.Devices.Razer
|
|||||||
RGB.NET.Devices.Razer.RazerDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "RzChromaSDK.dll"));
|
RGB.NET.Devices.Razer.RazerDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "RzChromaSDK.dll"));
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// RazerDeviceProvider.Instance.ResetDevices();
|
|
||||||
// RazerDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "58a3d80e-d5cb-4a40-9465-c0a5d54825d6",
|
"Guid": "58a3d80e-d5cb-4a40-9465-c0a5d54825d6",
|
||||||
"Name": "Razer Devices",
|
"Name": "Razer Devices",
|
||||||
|
"Description": "Allows Artemis to control lighting on all Synapse enabled Razer products",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Razer.dll"
|
"Main": "Artemis.Plugins.Devices.Razer.dll"
|
||||||
}
|
}
|
||||||
@ -25,17 +25,5 @@ namespace Artemis.Plugins.Devices.Roccat
|
|||||||
RGB.NET.Devices.Roccat.RoccatDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "RoccatTalkSDKWrapper.dll"));
|
RGB.NET.Devices.Roccat.RoccatDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "RoccatTalkSDKWrapper.dll"));
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// RoccatDeviceProvider.Instance.ResetDevices();
|
|
||||||
// RoccatDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "10049953-94c1-4102-988b-9e4f0b64c232",
|
"Guid": "10049953-94c1-4102-988b-9e4f0b64c232",
|
||||||
"Name": "Roccat Devices",
|
"Name": "Roccat Devices",
|
||||||
|
"Description": "Not yet implemented, sorry!",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Roccat.dll"
|
"Main": "Artemis.Plugins.Devices.Roccat.dll"
|
||||||
}
|
}
|
||||||
@ -20,6 +20,9 @@
|
|||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="HidSharp" Version="2.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
||||||
<Private>false</Private>
|
<Private>false</Private>
|
||||||
|
|||||||
@ -23,17 +23,5 @@ namespace Artemis.Plugins.Devices.SteelSeries
|
|||||||
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(SteelSeriesRGBDevice), sender, args);
|
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(SteelSeriesRGBDevice), sender, args);
|
||||||
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
_rgbService.AddDeviceProvider(RgbDeviceProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DisablePlugin()
|
|
||||||
{
|
|
||||||
// TODO: Remove the device provider from the surface
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose()
|
|
||||||
{
|
|
||||||
// TODO: This will probably not go well without first removing the device provider
|
|
||||||
// SteelSeriesDeviceProvider.Instance.ResetDevices();
|
|
||||||
// SteelSeriesDeviceProvider.Instance.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "27945704-6edd-48b4-bc0e-319cce9693fc",
|
"Guid": "27945704-6edd-48b4-bc0e-319cce9693fc",
|
||||||
"Name": "SteelSeries Devices",
|
"Name": "SteelSeries Devices",
|
||||||
|
"Description": "Allows Artemis to control lighting on select SteelSeries mice and keyboards",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.SteelSeries.dll"
|
"Main": "Artemis.Plugins.Devices.SteelSeries.dll"
|
||||||
}
|
}
|
||||||
@ -27,6 +27,9 @@ namespace Artemis.Plugins.Devices.WS281X
|
|||||||
public override void EnablePlugin()
|
public override void EnablePlugin()
|
||||||
{
|
{
|
||||||
var definitions = Settings.GetSetting<List<DeviceDefinition>>("DeviceDefinitions");
|
var definitions = Settings.GetSetting<List<DeviceDefinition>>("DeviceDefinitions");
|
||||||
|
if (definitions.Value == null)
|
||||||
|
definitions.Value = new List<DeviceDefinition>();
|
||||||
|
|
||||||
foreach (var deviceDefinition in definitions.Value)
|
foreach (var deviceDefinition in definitions.Value)
|
||||||
{
|
{
|
||||||
switch (deviceDefinition.Type)
|
switch (deviceDefinition.Type)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "ec86de32-1010-4bf7-97d7-1dcc46659ab6",
|
"Guid": "ec86de32-1010-4bf7-97d7-1dcc46659ab6",
|
||||||
"Name": "WS281X Devices",
|
"Name": "WS281X Devices",
|
||||||
|
"Description": "Allows Artemis to control WS281X lighting strips via an Arduino or BitWizard.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.WS281X.dll"
|
"Main": "Artemis.Plugins.Devices.WS281X.dll"
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "e70fd5ba-9881-480a-8ff6-078ed5f747fa",
|
"Guid": "e70fd5ba-9881-480a-8ff6-078ed5f747fa",
|
||||||
"Name": "Wooting Devices",
|
"Name": "Wooting Devices",
|
||||||
|
"Description": "Allows Artemis to control lighting on Wooting keyboards. Will eventually also expose analog key data.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Devices.Wooting.dll"
|
"Main": "Artemis.Plugins.Devices.Wooting.dll"
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ namespace Artemis.Plugins.LayerBrushes.Color
|
|||||||
GradientTypeProperty.ValueChanged += (sender, args) => CreateShader(_shaderBounds);
|
GradientTypeProperty.ValueChanged += (sender, args) => CreateShader(_shaderBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GradientTypePropertyOnValueChanged(object? sender, EventArgs e)
|
private void GradientTypePropertyOnValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "92a9d6ba-6f7a-4937-94d5-c1d715b4141a",
|
"Guid": "92a9d6ba-6f7a-4937-94d5-c1d715b4141a",
|
||||||
"Name": "Color layer brush",
|
"Name": "Color layer brush",
|
||||||
|
"Description": "A basic color layer-brush providing solid colors and several types of gradients.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.LayerBrushes.Color.dll"
|
"Main": "Artemis.Plugins.LayerBrushes.Color.dll"
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "61cbbf01-8d69-4ede-a972-f3f269da66d9",
|
"Guid": "61cbbf01-8d69-4ede-a972-f3f269da66d9",
|
||||||
"Name": "Noise layer brush",
|
"Name": "Noise layer brush",
|
||||||
|
"Description": "An OpenSimplex noise layer-brush providing configurable randomized and animated noise.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.LayerBrushes.Noise.dll"
|
"Main": "Artemis.Plugins.LayerBrushes.Noise.dll"
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Guid": "0de2991a-d7b8-4f61-ae4e-6623849215b5",
|
"Guid": "0de2991a-d7b8-4f61-ae4e-6623849215b5",
|
||||||
"Name": "General module",
|
"Name": "General module",
|
||||||
|
"Description": "A general profile-enabled module for every-day use.",
|
||||||
"Version": "1.0.0.0",
|
"Version": "1.0.0.0",
|
||||||
"Main": "Artemis.Plugins.Modules.General.dll"
|
"Main": "Artemis.Plugins.Modules.General.dll"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user