Plugins - Added optional configuration window
Plugins - Moved plugins to their own directory Device providers - Added all RGB.NET device providers
@ -25,8 +25,6 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
if (sender.GetType().IsGenericType(type))
|
||||
{
|
||||
Debug.WriteLine(e.RelativePart);
|
||||
Debug.WriteLine(e.FileName);
|
||||
// Start from the plugin directory
|
||||
if (e.RelativePart != null && e.FileName != null)
|
||||
e.FinalPath = Path.Combine(PluginInfo.Directory.FullName, e.RelativePart, e.FileName);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.Models.Surface;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using SkiaSharp;
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract
|
||||
@ -16,6 +17,12 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
|
||||
public PluginInfo PluginInfo { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether this plugin has a configuration view model.
|
||||
/// If set to true, <see cref="GetConfigurationViewModel" /> will be called when the plugin is configured from the UI.
|
||||
/// </summary>
|
||||
public bool HasConfigurationViewModel { get; protected set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Called when the plugin is unloaded, clean up any unmanaged resources here
|
||||
@ -31,5 +38,15 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
/// Called when the plugin is deactivated
|
||||
/// </summary>
|
||||
public abstract void DisablePlugin();
|
||||
|
||||
/// <summary>
|
||||
/// Called when the plugin's configuration window is opened from the UI. The UI will only attempt to open if
|
||||
/// <see cref="HasConfigurationViewModel" /> is set to True.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual PluginConfigurationViewModel GetConfigurationViewModel()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract
|
||||
namespace Artemis.Core.Plugins.Abstract.ViewModels
|
||||
{
|
||||
public abstract class ModuleViewModel : Screen
|
||||
{
|
||||
@ -0,0 +1,14 @@
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract.ViewModels
|
||||
{
|
||||
public abstract class PluginConfigurationViewModel : Screen
|
||||
{
|
||||
protected PluginConfigurationViewModel(Plugin plugin)
|
||||
{
|
||||
Plugin = plugin;
|
||||
}
|
||||
|
||||
public Plugin Plugin { get; set; }
|
||||
}
|
||||
}
|
||||
@ -25,6 +25,11 @@ namespace Artemis.Core.Plugins.Models
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
public string Name { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// A short description of the plugin
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The version of the plugin
|
||||
/// </summary>
|
||||
@ -62,7 +67,7 @@ namespace Artemis.Core.Plugins.Models
|
||||
internal PluginLoader PluginLoader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The assembly the plugin code lives in
|
||||
/// The assembly the plugin code lives in
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
internal Assembly Assembly { get; set; }
|
||||
|
||||
@ -28,7 +28,18 @@ namespace Artemis.Core.Services.Interfaces
|
||||
/// </summary>
|
||||
IReadOnlyCollection<IRGBDevice> LoadedDevices { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds the given device provider to the <see cref="Surface" />
|
||||
/// </summary>
|
||||
/// <param name="deviceProvider"></param>
|
||||
void AddDeviceProvider(IRGBDeviceProvider deviceProvider);
|
||||
|
||||
/// <summary>
|
||||
/// Removes the given device provider from the <see cref="Surface" /> by recreating it without the device provider
|
||||
/// </summary>
|
||||
/// <param name="deviceProvider"></param>
|
||||
void RemoveDeviceProvider(IRGBDeviceProvider deviceProvider);
|
||||
|
||||
void Dispose();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.RGB.NET;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
@ -16,13 +18,14 @@ namespace Artemis.Core.Services
|
||||
public class RgbService : IRgbService, IDisposable
|
||||
{
|
||||
private readonly List<IRGBDevice> _loadedDevices;
|
||||
private readonly List<IRGBDeviceProvider> _loadedDeviceProviders;
|
||||
private readonly ILogger _logger;
|
||||
private readonly PluginSetting<double> _renderScaleSetting;
|
||||
private readonly PluginSetting<int> _sampleSizeSetting;
|
||||
private readonly PluginSetting<int> _targetFrameRateSetting;
|
||||
private readonly TimerUpdateTrigger _updateTrigger;
|
||||
private ListLedGroup _surfaceLedGroup;
|
||||
|
||||
|
||||
internal RgbService(ILogger logger, ISettingsService settingsService)
|
||||
{
|
||||
_logger = logger;
|
||||
@ -37,6 +40,7 @@ namespace Artemis.Core.Services
|
||||
_renderScaleSetting.SettingChanged += RenderScaleSettingOnSettingChanged;
|
||||
_targetFrameRateSetting.SettingChanged += TargetFrameRateSettingOnSettingChanged;
|
||||
_loadedDevices = new List<IRGBDevice>();
|
||||
_loadedDeviceProviders = new List<IRGBDeviceProvider>();
|
||||
_updateTrigger = new TimerUpdateTrigger {UpdateFrequency = 1.0 / _targetFrameRateSetting.Value};
|
||||
Surface.RegisterUpdateTrigger(_updateTrigger);
|
||||
}
|
||||
@ -52,7 +56,11 @@ namespace Artemis.Core.Services
|
||||
|
||||
public void AddDeviceProvider(IRGBDeviceProvider deviceProvider)
|
||||
{
|
||||
if (_loadedDeviceProviders.Contains(deviceProvider))
|
||||
return;
|
||||
|
||||
Surface.LoadDevices(deviceProvider);
|
||||
_loadedDeviceProviders.Add(deviceProvider);
|
||||
|
||||
if (deviceProvider.Devices == null)
|
||||
{
|
||||
@ -72,6 +80,12 @@ namespace Artemis.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveDeviceProvider(IRGBDeviceProvider deviceProvider)
|
||||
{
|
||||
if (!_loadedDeviceProviders.Contains(deviceProvider))
|
||||
return;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Surface.UnregisterUpdateTrigger(_updateTrigger);
|
||||
|
||||
@ -15,9 +15,10 @@
|
||||
|
||||
<Separator Margin="0 15" />
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" FontWeight="Bold" Margin="22 0">Exception message</TextBlock>
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Text="{Binding Exception.Message}" TextWrapping="Wrap" Margin="22 5" />
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" HorizontalAlignment="Left" Text="{Binding Exception.Message}" TextWrapping="Wrap" Margin="22 5" MaxWidth="1000" />
|
||||
<Separator Margin="0 15" />
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Text="Stack trace" TextWrapping="Wrap" FontWeight="Bold" Margin="22 0" />
|
||||
|
||||
<avalonedit:TextEditor SyntaxHighlighting="C#"
|
||||
FontFamily="pack://application:,,,/Resources/Fonts/#Roboto Mono"
|
||||
FontSize="10pt"
|
||||
@ -25,6 +26,7 @@
|
||||
Document="{Binding Document}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
MaxWidth="1000"
|
||||
Margin="0 10" />
|
||||
|
||||
|
||||
|
||||
@ -34,6 +34,12 @@
|
||||
<Target Name="RemoveTranslationsAfterBuild" AfterTargets="AfterBuild">
|
||||
<RemoveDir Directories="@(FluentValidationExcludedCultures->'$(OutputPath)%(Filename)')" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<Compile Remove="publish\**" />
|
||||
<EmbeddedResource Remove="publish\**" />
|
||||
<None Remove="publish\**" />
|
||||
<Page Remove="publish\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core, Version=0.1.25.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\RGB.NET\bin\net45\RGB.NET.Core.dll</HintPath>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Margin="16">
|
||||
<materialDesign:PackIcon Kind="CodeNotEqual" Width="250" Height="250" HorizontalAlignment="Center" />
|
||||
<materialDesign:PackIcon Kind="Crane" Width="250" Height="250" HorizontalAlignment="Center" />
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline4TextBlock}" TextWrapping="Wrap" HorizontalAlignment="Center" Margin="0 25">
|
||||
News is not yet implemented
|
||||
</TextBlock>
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Start up with Windows</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" IsChecked="{Binding StartWithWindows}"/>
|
||||
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" IsChecked="{Binding StartWithWindows}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
@ -57,7 +57,7 @@
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Start up with Windows minimized</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" IsChecked="{Binding StartMinimized}" IsEnabled="{Binding StartWithWindows}"/>
|
||||
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" IsChecked="{Binding StartMinimized}" IsEnabled="{Binding StartWithWindows}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
@ -226,7 +226,7 @@
|
||||
</TabItem>
|
||||
<TabItem Header="PLUGINS" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
||||
<DockPanel Margin="15">
|
||||
<TextBlock DockPanel.Dock="Top">The list below shows all loaded plugins. You can't really edit it right now. If you're missing something, view your logs folder.</TextBlock>
|
||||
<TextBlock DockPanel.Dock="Top">The list below shows all loaded plugins. If you're missing something, view your logs folder.</TextBlock>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<DataGrid Margin="0 8 0 0"
|
||||
ItemsSource="{Binding Plugins}"
|
||||
@ -240,6 +240,15 @@
|
||||
<DataGridTextColumn Binding="{Binding Name}" Header="Name" IsReadOnly="True" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Description}" Header="Description" IsReadOnly="True" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Version}" Header="Version" IsReadOnly="True" />
|
||||
<DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<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}"
|
||||
|
||||
@ -189,7 +189,7 @@ namespace Artemis.UI.Screens.Settings
|
||||
// TODO: GetPluginsOfType isn't ideal here as it doesn't include disabled plugins
|
||||
Plugins.Clear();
|
||||
foreach (var plugin in _pluginService.GetPluginsOfType<Plugin>())
|
||||
Plugins.Add(new PluginSettingsViewModel(plugin));
|
||||
Plugins.Add(new PluginSettingsViewModel(plugin, _windowManager, _dialogService));
|
||||
|
||||
base.OnInitialActivate();
|
||||
}
|
||||
|
||||
@ -1,23 +1,46 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.UI.Shared.Services.Interfaces;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
{
|
||||
public class PluginSettingsViewModel : PropertyChangedBase
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
private readonly Plugin _plugin;
|
||||
private readonly IWindowManager _windowManager;
|
||||
|
||||
public PluginSettingsViewModel(Plugin plugin)
|
||||
public PluginSettingsViewModel(Plugin plugin, IWindowManager windowManager, IDialogService dialogService)
|
||||
{
|
||||
_plugin = plugin;
|
||||
_windowManager = windowManager;
|
||||
_dialogService = dialogService;
|
||||
IsEnabled = true;
|
||||
}
|
||||
|
||||
public string Type => _plugin.GetType().BaseType?.Name ?? _plugin.GetType().Name;
|
||||
public string Name => _plugin.PluginInfo.Name;
|
||||
public string Description => "N.Y.I.";
|
||||
public string Description => _plugin.PluginInfo.Description;
|
||||
public Version Version => _plugin.PluginInfo.Version;
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
public bool CanOpenSettings => IsEnabled && _plugin.HasConfigurationViewModel;
|
||||
|
||||
public async Task OpenSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
var configurationViewModel = _plugin.GetConfigurationViewModel();
|
||||
if (configurationViewModel != null)
|
||||
_windowManager.ShowDialog(new PluginSettingsWindowViewModel(configurationViewModel));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
await _dialogService.ShowExceptionDialog("An exception occured while trying to show the plugin's settings window", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
<controls:MaterialWindow x:Class="Artemis.UI.Screens.Settings.Tabs.Plugins.PluginSettingsWindowView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Tabs.Plugins"
|
||||
xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
mc:Ignorable="d"
|
||||
Title="{Binding Title}"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
|
||||
UseLayoutRounding="True"
|
||||
Width="800"
|
||||
Height="800"
|
||||
d:DesignHeight="800"
|
||||
d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance local:PluginSettingsWindowViewModel}"
|
||||
Icon="/Resources/Images/Logo/logo-512.png">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<ContentControl s:View.Model="{Binding ActiveItem}"/>
|
||||
</ScrollViewer>
|
||||
</controls:MaterialWindow>
|
||||
@ -0,0 +1,15 @@
|
||||
using Artemis.Core.Plugins.Abstract.ViewModels;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
{
|
||||
public class PluginSettingsWindowViewModel : Conductor<PluginConfigurationViewModel>
|
||||
{
|
||||
public PluginSettingsWindowViewModel(PluginConfigurationViewModel configurationViewModel)
|
||||
{
|
||||
ActiveItem = configurationViewModel;
|
||||
}
|
||||
|
||||
public string Title => "Plugin configuration - " + ActiveItem?.Plugin?.PluginInfo?.Name;
|
||||
}
|
||||
}
|
||||
118
src/Artemis.sln
@ -5,6 +5,9 @@ VisualStudioVersion = 16.0.28729.10
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.UI", "Artemis.UI\Artemis.UI.csproj", "{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1} = {AB80F106-5444-46AA-A255-F765DD2F04F1}
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374} = {8DC7960F-6DDF-4007-A155-17E124F39374}
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC} = {DCF7C321-95DC-4507-BB61-A7C5356E58EC}
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5} = {E592F239-FAA0-4840-9C85-46E5867D06D5}
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2} = {0F288A66-6EB0-4589-8595-E33A3A3EAEA2}
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF} = {7F4C7AB0-4C9B-452D-AFED-34544C903DEF}
|
||||
@ -19,19 +22,37 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Core", "Artemis.Cor
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{E830A02B-A7E5-4A6B-943F-76B0A542630C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Modules.General", "Artemis.Plugins.Modules.General\Artemis.Plugins.Modules.General.csproj", "{E592F239-FAA0-4840-9C85-46E5867D06D5}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Modules.General", "Plugins\Artemis.Plugins.Modules.General\Artemis.Plugins.Modules.General.csproj", "{E592F239-FAA0-4840-9C85-46E5867D06D5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.LayerBrushes.Color", "Artemis.Plugins.LayerBrushes.Color\Artemis.Plugins.LayerBrushes.Color.csproj", "{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.LayerBrushes.Color", "Plugins\Artemis.Plugins.LayerBrushes.Color\Artemis.Plugins.LayerBrushes.Color.csproj", "{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Corsair", "Artemis.Plugins.Devices.Corsair\Artemis.Plugins.Devices.Corsair.csproj", "{A779B2F8-C253-4C4B-8634-6EB8F594E96D}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Corsair", "Plugins\Artemis.Plugins.Devices.Corsair\Artemis.Plugins.Devices.Corsair.csproj", "{A779B2F8-C253-4C4B-8634-6EB8F594E96D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Logitech", "Artemis.Plugins.Devices.Logitech\Artemis.Plugins.Devices.Logitech.csproj", "{235A45C7-24AD-4F47-B9D4-CD67E610A04D}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Logitech", "Plugins\Artemis.Plugins.Devices.Logitech\Artemis.Plugins.Devices.Logitech.csproj", "{235A45C7-24AD-4F47-B9D4-CD67E610A04D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.LayerBrushes.Noise", "Artemis.Plugins.LayerBrushes.Noise\Artemis.Plugins.LayerBrushes.Noise.csproj", "{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.LayerBrushes.Noise", "Plugins\Artemis.Plugins.LayerBrushes.Noise\Artemis.Plugins.LayerBrushes.Noise.csproj", "{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.UI.Shared", "Artemis.UI.Shared\Artemis.UI.Shared.csproj", "{ADB357E6-151D-4D0D-87CB-68FD0BC29812}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Wooting", "Artemis.Plugins.Devices.Wooting\Artemis.Plugins.Devices.Wooting.csproj", "{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Wooting", "Plugins\Artemis.Plugins.Devices.Wooting\Artemis.Plugins.Devices.Wooting.csproj", "{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Asus", "Plugins\Artemis.Plugins.Devices.Asus\Artemis.Plugins.Devices.Asus.csproj", "{DCF7C321-95DC-4507-BB61-A7C5356E58EC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.CoolerMaster", "Plugins\Artemis.Plugins.Devices.CoolerMaster\Artemis.Plugins.Devices.CoolerMaster.csproj", "{8DC7960F-6DDF-4007-A155-17E124F39374}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.DMX", "Plugins\Artemis.Plugins.Devices.DMX\Artemis.Plugins.Devices.DMX.csproj", "{AB80F106-5444-46AA-A255-F765DD2F04F1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Msi", "Plugins\Artemis.Plugins.Devices.Msi\Artemis.Plugins.Devices.Msi.csproj", "{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Novation", "Plugins\Artemis.Plugins.Devices.Novation\Artemis.Plugins.Devices.Novation.csproj", "{D004FEC9-0CF8-4828-B620-95DBA73201A3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Razer", "Plugins\Artemis.Plugins.Devices.Razer\Artemis.Plugins.Devices.Razer.csproj", "{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.Roccat", "Plugins\Artemis.Plugins.Devices.Roccat\Artemis.Plugins.Devices.Roccat.csproj", "{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.SteelSeries", "Plugins\Artemis.Plugins.Devices.SteelSeries\Artemis.Plugins.Devices.SteelSeries.csproj", "{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Plugins.Devices.WS281X", "Plugins\Artemis.Plugins.Devices.WS281X\Artemis.Plugins.Devices.WS281X.csproj", "{A46F278A-FC2C-4342-8455-994D957DDA03}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -51,8 +72,8 @@ Global
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|x64.Build.0 = Debug|x64
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|x64.ActiveCfg = Release|x64
|
||||
@ -121,6 +142,78 @@ Global
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1}.Release|x64.Build.0 = Release|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3}.Release|x64.Build.0 = Release|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -132,6 +225,15 @@ Global
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{DCF7C321-95DC-4507-BB61-A7C5356E58EC} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{8DC7960F-6DDF-4007-A155-17E124F39374} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{AB80F106-5444-46AA-A255-F765DD2F04F1} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{07678400-2FE1-4C6E-A8D4-4F9F3C0630EA} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{D004FEC9-0CF8-4828-B620-95DBA73201A3} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{36C10640-A31F-4DEE-9F0E-9B9E3F12753D} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{26902C94-3EBC-4132-B7F0-FFCAB8E150DA} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{FA5815D3-EA87-4A64-AD6C-A5AE96C61F29} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
{A46F278A-FC2C-4342-8455-994D957DDA03} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C203080A-4473-4CC2-844B-F552EA43D66A}
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyTitle>Artemis.Plugins.Devices.Wooting</AssemblyTitle>
|
||||
<Product>Artemis.Plugins.Devices.Wooting</Product>
|
||||
<Copyright>Copyright © 2019</Copyright>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="x64\**" />
|
||||
<Compile Remove="x86\**" />
|
||||
<EmbeddedResource Remove="x64\**" />
|
||||
<EmbeddedResource Remove="x86\**" />
|
||||
<None Remove="x64\**" />
|
||||
<None Remove="x86\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="plugin.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Devices.Asus">
|
||||
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Devices.Asus.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Images\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Layouts\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true'">
|
||||
<Exec Command="echo Copying resources to plugin output directory
XCOPY "$(ProjectDir)Images" "$(TargetDir)Images" /s /q /i /y
XCOPY "$(ProjectDir)Layouts" "$(TargetDir)Layouts" /s /q /i /y
echo Copying plugin to Artemis.UI output directory
XCOPY "$(TargetDir.TrimEnd('\'))" "$(SolutionDir)\Artemis.UI\$(OutDir)Plugins\$(ProjectName)" /s /q /i /y" />
|
||||
</Target>
|
||||
</Project>
|
||||
@ -0,0 +1,37 @@
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.Asus;
|
||||
|
||||
namespace Artemis.Plugins.Devices.Asus
|
||||
{
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public class AsusDeviceProvider : DeviceProvider
|
||||
{
|
||||
private readonly IRgbService _rgbService;
|
||||
|
||||
public AsusDeviceProvider(PluginInfo pluginInfo, IRgbService rgbService) : base(pluginInfo, RGB.NET.Devices.Asus.AsusDeviceProvider.Instance)
|
||||
{
|
||||
_rgbService = rgbService;
|
||||
}
|
||||
|
||||
public override void EnablePlugin()
|
||||
{
|
||||
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(AsusRGBDevice<>), sender, args);
|
||||
_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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 773 KiB |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Name>Asus Prime X370-PRO</Name>
|
||||
<Description>Asus Prime X370-PRO Mainboard</Description>
|
||||
<Author>Darth Affe</Author>
|
||||
<Type>Mainboard</Type>
|
||||
<Lighting>Key</Lighting>
|
||||
<Vendor>Asus</Vendor>
|
||||
<Model>Prime X370-PRO</Model>
|
||||
<Width>252</Width>
|
||||
<Height>305</Height>
|
||||
<ImageBasePath>Images\Asus\Mainboards</ImageBasePath>
|
||||
<DeviceImage>PRIMEX370-PRO.png</DeviceImage>
|
||||
<Leds>
|
||||
<Led Id="Mainboard1">
|
||||
<X>0</X>
|
||||
<Y>131</Y>
|
||||
<Width>35mm</Width>
|
||||
<Height>57mm</Height>
|
||||
<Shape>M 0,0 L 0,1 L 0.325,1 L 0.325,0 Z M 0.862,0 L 0.822,0.06 L 0.904,0.11 L 0.91,0.505 L 0.86,0.532 L 0.74,0.532 L 0.6575,0.485 L 0.54,0.485 L 0.425,0.55 L 0.425,0.64 L0.44,0.66 L0.44,0.755 L 0.4,0.78 L 0.4,1 L 0.5,1 L 0.5,0.805 L 0.53,0.785 L 0.53,0.6325 L 0.515,0.6225 L 0.515,0.575 L 0.575,0.543 L 0.6225,0.543 L 0.705,0.59 L 0.9,0.59 L 1,0.525 L 1,0.08 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Mainboard2">
|
||||
<X>0</X>
|
||||
<Y>+</Y>
|
||||
<Width>17mm</Width>
|
||||
<Height>40mm</Height>
|
||||
<Shape>M 0.83,0 L 0.83,1 L1,1 L 1,0 Z M 0,0 L 0,1 L 0.6691,1 L 0.6691,0 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Mainboard3">
|
||||
<X>0</X>
|
||||
<Y>+</Y>
|
||||
<Width>44mm</Width>
|
||||
<Height>41mm</Height>
|
||||
<Shape>
|
||||
M 0,0 L 0,1 L 0.26,1 L 0.26,0 Z M 0.32,0 L 0.32,0.29 L 0.365,0.325 L 0.395,0.325 L 0.395,0.36 L 0.455,0.41 L 0.49,0.345 L 0.4675,0.32 L 0.455,0.2475 L 0.4675,0.26 L 0.395,0.2475 L 0.395,0 Z
|
||||
M 0.935,0.715 L 0.935,0.84 L 0.865,0.915 L 0.865,1 L 0.9375,1 L 0.9375,0.95 L 1,0.88 L 1,0.715 Z
|
||||
</Shape>
|
||||
</Led>
|
||||
<Led Id="Mainboard4">
|
||||
<X>0</X>
|
||||
<Y>+</Y>
|
||||
<Width>68mm</Width>
|
||||
<Height>35mm</Height>
|
||||
<Shape>M 0,0 L 0,1 L 0.94,1 L 0.94,0.95 L 0.206,0.95 Q 0.168,0.95 0.165,0.875 L 0.165,0 Z M 0.55,0.019 L 0.55,0.132 L 0.578,0.19 L 0.578,0.2078 L 0.612,0.271 L 0.612,0.6625 L 0.635,0.7125 L0.735,0.7125 L0.755,0.75 L 0.915,0.75 L 0.92,0.76 L 0.942,0.76 L 0.94,1 L 0.99,1 L 0.99,0.72 L 0.965,0.67 L 0.935,0.67 L 0.93,0.66 L 0.772,0.66 L 0.752,0.62 L 0.66,0.62 L 0.66,0.237 L 0.622,0.16 L 0.622,0.145 L 0.5975,0.095 L 0.5975,0.019 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Mainboard5">
|
||||
<X>80</X>
|
||||
<Y>132</Y>
|
||||
<Width>5mm</Width>
|
||||
<Height>13mm</Height>
|
||||
</Led>
|
||||
</Leds>
|
||||
</Device>
|
||||
6
src/Plugins/Artemis.Plugins.Devices.Asus/plugin.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Guid": "c20e876f-7cb0-4fa1-b0cc-ae1afb5865d1",
|
||||
"Name": "Asus Devices",
|
||||
"Version": "1.0.0.0",
|
||||
"Main": "Artemis.Plugins.Devices.Asus.dll"
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyTitle>Artemis.Plugins.Devices.Wooting</AssemblyTitle>
|
||||
<Product>Artemis.Plugins.Devices.Wooting</Product>
|
||||
<Copyright>Copyright © 2019</Copyright>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="plugin.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Devices.CoolerMaster">
|
||||
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Images\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Layouts\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true'">
|
||||
<Exec Command="echo Copying resources to plugin output directory
XCOPY "$(ProjectDir)Images" "$(TargetDir)Images" /s /q /i /y
XCOPY "$(ProjectDir)Layouts" "$(TargetDir)Layouts" /s /q /i /y
echo Copying plugin to Artemis.UI output directory
XCOPY "$(TargetDir.TrimEnd('\'))" "$(SolutionDir)\Artemis.UI\$(OutDir)Plugins\$(ProjectName)" /s /q /i /y" />
|
||||
</Target>
|
||||
</Project>
|
||||
@ -0,0 +1,40 @@
|
||||
using System.IO;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Devices.CoolerMaster;
|
||||
|
||||
namespace Artemis.Plugins.Devices.CoolerMaster
|
||||
{
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public class CoolerMasterDeviceProvider : DeviceProvider
|
||||
{
|
||||
private readonly IRgbService _rgbService;
|
||||
|
||||
public CoolerMasterDeviceProvider(PluginInfo pluginInfo, IRgbService rgbService) : base(pluginInfo, RGB.NET.Devices.CoolerMaster.CoolerMasterDeviceProvider.Instance)
|
||||
{
|
||||
_rgbService = rgbService;
|
||||
}
|
||||
|
||||
public override void EnablePlugin()
|
||||
{
|
||||
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(CoolerMasterRGBDevice<>), sender, args);
|
||||
RGB.NET.Devices.CoolerMaster.CoolerMasterDeviceProvider.PossibleX64NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x64", "CMSDK.dll"));
|
||||
RGB.NET.Devices.CoolerMaster.CoolerMasterDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CMSDK.dll"));
|
||||
_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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("c6bdb6d9-062d-4c28-a280-f3bd6197f07f")]
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Guid": "b78f644b-827f-4bb4-bf03-2adaa365b58b",
|
||||
"Name": "CoolerMaster Devices",
|
||||
"Version": "1.0.0.0",
|
||||
"Main": "Artemis.Plugins.Devices.CoolerMaster.dll"
|
||||
}
|
||||
BIN
src/Plugins/Artemis.Plugins.Devices.CoolerMaster/x64/CMSDK.dll
Normal file
BIN
src/Plugins/Artemis.Plugins.Devices.CoolerMaster/x86/CMSDK.dll
Normal file
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyTitle>Artemis.Plugins.Devices.CorsairDevice</AssemblyTitle>
|
||||
@ -7,6 +7,7 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugType>full</DebugType>
|
||||
@ -18,16 +19,7 @@
|
||||
<PreBuildEvent />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
<HintPath>..\..\..\RGB.NET\bin\net45\RGB.NET.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Devices.Corsair, Version=0.1.25.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\RGB.NET\bin\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
|
||||
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
@ -44,6 +36,14 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RGB.NET.Devices.Corsair">
|
||||
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Devices.Corsair.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Images\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
@ -27,7 +27,7 @@ namespace Artemis.Plugins.Devices.Corsair
|
||||
|
||||
public override void DisablePlugin()
|
||||
{
|
||||
// TODO: Remove the device provider from the surface
|
||||
_rgbService.RemoveDeviceProvider(RgbDeviceProvider);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 460 KiB After Width: | Height: | Size: 460 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 386 KiB |
|
Before Width: | Height: | Size: 451 KiB After Width: | Height: | Size: 451 KiB |
|
Before Width: | Height: | Size: 587 KiB After Width: | Height: | Size: 587 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |