1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-01 02:03:32 +00:00

Removed the rest of CS Script and removed old plugin projects

This commit is contained in:
Robert Beekman 2019-04-10 16:05:19 +02:00
parent 4e565f9d76
commit 571a3fe168
47 changed files with 550 additions and 846 deletions

View File

@ -1,5 +1,4 @@
using System.Linq; using Artemis.Core.Services.Interfaces;
using Artemis.Core.Services.Interfaces;
using Ninject.Extensions.Conventions; using Ninject.Extensions.Conventions;
using Ninject.Modules; using Ninject.Modules;

View File

@ -3,6 +3,7 @@ using System.Drawing;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.ProfileElements; using Artemis.Core.ProfileElements;
using RGB.NET.Core; using RGB.NET.Core;
using Stylet;
namespace Artemis.Core.Plugins.Abstract namespace Artemis.Core.Plugins.Abstract
{ {
@ -10,9 +11,6 @@ namespace Artemis.Core.Plugins.Abstract
{ {
public Profile ActiveProfile { get; private set; } public Profile ActiveProfile { get; private set; }
/// <inheritdoc />
public abstract Type ViewModelType { get; }
/// <inheritdoc /> /// <inheritdoc />
public abstract bool ExpandsMainDataModel { get; } public abstract bool ExpandsMainDataModel { get; }
@ -22,20 +20,6 @@ namespace Artemis.Core.Plugins.Abstract
// Load and activate the last active profile // Load and activate the last active profile
} }
public void ChangeActiveProfile(Profile profile)
{
lock (this)
{
if (profile == null)
throw new ArgumentNullException(nameof(profile));
ActiveProfile?.Deactivate();
ActiveProfile = profile;
ActiveProfile.Activate();
}
}
/// <inheritdoc /> /// <inheritdoc />
public virtual void Update(double deltaTime) public virtual void Update(double deltaTime)
{ {
@ -56,9 +40,26 @@ namespace Artemis.Core.Plugins.Abstract
} }
} }
/// <inheritdoc />
public abstract IScreen GetMainViewModel();
/// <inheritdoc /> /// <inheritdoc />
public void Dispose() public void Dispose()
{ {
} }
public void ChangeActiveProfile(Profile profile)
{
lock (this)
{
if (profile == null)
throw new ArgumentNullException(nameof(profile));
ActiveProfile?.Deactivate();
ActiveProfile = profile;
ActiveProfile.Activate();
}
}
} }
} }

View File

@ -20,6 +20,14 @@ namespace Artemis.Core.Plugins.Exceptions
PluginInfo = pluginInfo; PluginInfo = pluginInfo;
} }
public ArtemisPluginException(string message) : base(message)
{
}
public ArtemisPluginException(string message, Exception inner) : base(message, inner)
{
}
public PluginInfo PluginInfo { get; } public PluginInfo PluginInfo { get; }
} }
} }

View File

@ -2,6 +2,5 @@
{ {
public interface ILayerTypeConfiguration public interface ILayerTypeConfiguration
{ {
} }
} }

View File

@ -1,6 +1,6 @@
using System; using System.Drawing;
using System.Drawing;
using RGB.NET.Core; using RGB.NET.Core;
using Stylet;
namespace Artemis.Core.Plugins.Interfaces namespace Artemis.Core.Plugins.Interfaces
{ {
@ -10,11 +10,6 @@ namespace Artemis.Core.Plugins.Interfaces
/// </summary> /// </summary>
public interface IModule : IPlugin public interface IModule : IPlugin
{ {
/// <summary>
/// The type of this module's view model
/// </summary>
Type ViewModelType { get; }
/// <summary> /// <summary>
/// Wether or not this module expands upon the main data model. If set to true any data in main data model can be /// Wether or not this module expands upon the main data model. If set to true any data in main data model can be
/// accessed by profiles in this module /// accessed by profiles in this module
@ -34,5 +29,11 @@ namespace Artemis.Core.Plugins.Interfaces
/// <param name="surface">The RGB Surface to render to</param> /// <param name="surface">The RGB Surface to render to</param>
/// <param name="graphics"></param> /// <param name="graphics"></param>
void Render(double deltaTime, RGBSurface surface, Graphics graphics); void Render(double deltaTime, RGBSurface surface, Graphics graphics);
/// <summary>
/// Called when the module's main view is being shown
/// </summary>
/// <returns></returns>
IScreen GetMainViewModel();
} }
} }

View File

@ -1,21 +1,14 @@
using System; using System;
using System.IO; using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Artemis.Core.Plugins.Exceptions;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
using Newtonsoft.Json; using Newtonsoft.Json;
using Ninject;
namespace Artemis.Core.Plugins.Models namespace Artemis.Core.Plugins.Models
{ {
public class PluginInfo public class PluginInfo
{ {
private static AppDomain _appDomain;
/// <summary> /// <summary>
/// The plugin's GUID /// The plugins GUID
/// </summary> /// </summary>
public Guid Guid { get; set; } public Guid Guid { get; set; }
@ -28,42 +21,23 @@ namespace Artemis.Core.Plugins.Models
/// The version of the plugin /// The version of the plugin
/// </summary> /// </summary>
public string Version { get; set; } public string Version { get; set; }
/// <summary> /// <summary>
/// The instantiated plugin, available after successful load /// The main entry DLL, should contain a class implementing IPlugin
/// </summary> /// </summary>
[JsonIgnore] public string Main { get; set; }
public IPlugin Plugin { get; set; }
/// <summary> /// <summary>
/// Full path to the plugin's current folder /// Full path to the plugin's current folder
/// </summary> /// </summary>
[JsonIgnore] [JsonIgnore]
public string Folder { get; set; } public string Folder { get; set; }
/// <summary> /// <summary>
/// Gets the view model of the module accompanying the provided plugin info /// A references to the types implementing IPlugin, available after successful load
/// </summary> /// </summary>
/// <param name="kernel">The Ninject kernel to use for DI</param> [JsonIgnore]
/// <returns></returns> public List<IPlugin> Instances { get; set; }
public IModuleViewModel GetModuleViewModel(IKernel kernel)
{
// Don't attempt to locate VMs for something other than a module
if (Plugin == null)
throw new ArtemisPluginException(this, "Cannot locate a view model for this plugin because it's not compiled.");
if (!(Plugin is IModule module))
throw new ArtemisPluginException(this, "Cannot locate a view model for this plugin as it's not a module.");
// Get the type from the module
var vmType = module.ViewModelType;
if (!typeof(IModuleViewModel).IsAssignableFrom(vmType))
throw new ArtemisPluginException(this, "ViewModel must implement IModuleViewModel.");
// Instantiate the ViewModel with Ninject
var vm = (IModuleViewModel) kernel.Get(vmType);
vm.PluginInfo = this;
return vm;
}
public override string ToString() public override string ToString()
{ {

View File

@ -61,10 +61,12 @@ namespace Artemis.Core.ProfileElements
public void UpdateLayerType(ILayerType layerType) public void UpdateLayerType(ILayerType layerType)
{ {
if (LayerType != null) if (LayerType != null)
{
lock (LayerType) lock (LayerType)
{ {
LayerType.Dispose(); LayerType.Dispose();
} }
}
LayerType = layerType; LayerType = layerType;
} }

View File

@ -7,39 +7,22 @@ namespace Artemis.Core.RGB.NET
{ {
public class DirectBitmap : IDisposable public class DirectBitmap : IDisposable
{ {
public Bitmap Bitmap { get; private set; }
public Int32[] Bits { get; private set; }
public bool Disposed { get; private set; }
public int Height { get; private set; }
public int Width { get; private set; }
protected GCHandle BitsHandle { get; private set; }
public DirectBitmap(int width, int height) public DirectBitmap(int width, int height)
{ {
Width = width; Width = width;
Height = height; Height = height;
Bits = new Int32[width * height]; Bits = new int[width * height];
BitsHandle = GCHandle.Alloc(Bits, GCHandleType.Pinned); BitsHandle = GCHandle.Alloc(Bits, GCHandleType.Pinned);
Bitmap = new Bitmap(width, height, width * 4, PixelFormat.Format32bppPArgb, BitsHandle.AddrOfPinnedObject()); Bitmap = new Bitmap(width, height, width * 4, PixelFormat.Format32bppPArgb, BitsHandle.AddrOfPinnedObject());
} }
public void SetPixel(int x, int y, Color colour) public Bitmap Bitmap { get; }
{ public int[] Bits { get; }
int index = x + (y * Width); public bool Disposed { get; private set; }
int col = colour.ToArgb(); public int Height { get; }
public int Width { get; }
Bits[index] = col; protected GCHandle BitsHandle { get; }
}
public Color GetPixel(int x, int y)
{
int index = x + (y * Width);
int col = Bits[index];
Color result = Color.FromArgb(col);
return result;
}
public void Dispose() public void Dispose()
{ {
@ -48,5 +31,22 @@ namespace Artemis.Core.RGB.NET
Bitmap.Dispose(); Bitmap.Dispose();
BitsHandle.Free(); BitsHandle.Free();
} }
public void SetPixel(int x, int y, Color colour)
{
var index = x + y * Width;
var col = colour.ToArgb();
Bits[index] = col;
}
public Color GetPixel(int x, int y)
{
var index = x + y * Width;
var col = Bits[index];
var result = Color.FromArgb(col);
return result;
}
} }
} }

View File

@ -1,5 +1,4 @@
using System.Drawing; using System.Drawing;
using System.Linq;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Groups; using RGB.NET.Groups;
using Color = RGB.NET.Core.Color; using Color = RGB.NET.Core.Color;
@ -17,7 +16,7 @@ namespace Artemis.Core.RGB.NET
// var height = ledGroup.GetLeds().Max(l => l.LedRectangle.Y + l.LedRectangle.Height); // var height = ledGroup.GetLeds().Max(l => l.LedRectangle.Y + l.LedRectangle.Height);
var width = 500; var width = 500;
var height = 500; var height = 500;
_bitmap = new DirectBitmap((int) width, (int) height); _bitmap = new DirectBitmap(width, height);
} }
public Color ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, Color color) public Color ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, Color color)

View File

@ -48,8 +48,10 @@ namespace Artemis.Core.Services
{ {
try try
{ {
var modules = _pluginService.Plugins.SelectMany(p => p.Instances).OfType<IModule>().ToList();
// Update all active modules // Update all active modules
foreach (var module in _pluginService.Plugins.Select(p => p.Plugin).OfType<IModule>()) foreach (var module in modules)
module.Update(args.DeltaTime); module.Update(args.DeltaTime);
if (_rgbService.GraphicsDecorator == null) if (_rgbService.GraphicsDecorator == null)
@ -60,7 +62,7 @@ namespace Artemis.Core.Services
{ {
g.Clear(Color.Red); g.Clear(Color.Red);
foreach (var module in _pluginService.Plugins.Select(p => p.Plugin).OfType<IModule>()) foreach (var module in modules)
module.Render(args.DeltaTime, _rgbService.Surface, g); module.Render(args.DeltaTime, _rgbService.Surface, g);
} }
} }

View File

@ -4,7 +4,6 @@ using System.Threading.Tasks;
using Artemis.Core.Events; using Artemis.Core.Events;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.Plugins.Models; using Artemis.Core.Plugins.Models;
using Artemis.Core.ProfileElements;
namespace Artemis.Core.Services.Interfaces namespace Artemis.Core.Services.Interfaces
{ {
@ -25,18 +24,11 @@ namespace Artemis.Core.Services.Interfaces
/// </summary> /// </summary>
Task LoadPlugins(); Task LoadPlugins();
/// <summary>
/// Gets the view model of the module accompanying the provided plugin info
/// </summary>
/// <param name="pluginInfo">The plugin info containing the module for which to load the view model</param>
Task<IModuleViewModel> GetModuleViewModel(PluginInfo pluginInfo);
/// <summary> /// <summary>
/// Occurs when a single plugin has loaded /// Occurs when a single plugin has loaded
/// </summary> /// </summary>
event EventHandler<PluginEventArgs> PluginLoaded; event EventHandler<PluginEventArgs> PluginLoaded;
/// <summary> /// <summary>
/// Occurs when loading all plugins has started /// Occurs when loading all plugins has started
/// </summary> /// </summary>

View File

@ -10,8 +10,8 @@ using Artemis.Core.Exceptions;
using Artemis.Core.Plugins.Exceptions; using Artemis.Core.Plugins.Exceptions;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.Plugins.Models; using Artemis.Core.Plugins.Models;
using Artemis.Core.ProfileElements;
using Artemis.Core.Services.Interfaces; using Artemis.Core.Services.Interfaces;
using Newtonsoft.Json;
using Ninject; using Ninject;
using Ninject.Extensions.ChildKernel; using Ninject.Extensions.ChildKernel;
@ -20,9 +20,8 @@ namespace Artemis.Core.Services
public class PluginService : IPluginService public class PluginService : IPluginService
{ {
private readonly IKernel _kernel; private readonly IKernel _kernel;
private IKernel _childKernel;
private AppDomain _appDomain;
private readonly List<PluginInfo> _plugins; private readonly List<PluginInfo> _plugins;
private IKernel _childKernel;
public PluginService(IKernel kernel) public PluginService(IKernel kernel)
{ {
@ -44,23 +43,70 @@ namespace Artemis.Core.Services
OnStartedLoadingPlugins(); OnStartedLoadingPlugins();
UnloadPlugins(); await Task.Run(() =>
// Create a child kernel and app domain that will only contain the plugins
_childKernel = new ChildKernel(_kernel);
_appDomain = AppDomain.CreateDomain("PluginAppDomain");
// Load the plugin assemblies into the app domain
var directory = new DirectoryInfo(Constants.DataFolder + "plugins");
foreach (var subDirectory in directory.EnumerateDirectories())
{ {
// _appDomain.Load() UnloadPlugins();
// _plugins.Add(new PluginInfo(subDirectory.FullName));
} // Create a child kernel and app domain that will only contain the plugins
_childKernel = new ChildKernel(_kernel);
// Load the plugin assemblies into the plugin context
var directory = new DirectoryInfo(Path.Combine(Constants.DataFolder, "plugins"));
foreach (var subDirectory in directory.EnumerateDirectories())
{
try
{
// Load the metadata
var metadataFile = Path.Combine(subDirectory.FullName, "plugin.json");
if (!File.Exists(metadataFile))
throw new ArtemisPluginException("Couldn't find the plugins metadata file at " + metadataFile);
// Locate the main entry
var pluginInfo = JsonConvert.DeserializeObject<PluginInfo>(File.ReadAllText(metadataFile));
var mainFile = Path.Combine(subDirectory.FullName, pluginInfo.Main);
if (!File.Exists(mainFile))
throw new ArtemisPluginException(pluginInfo, "Couldn't find the plugins main entry at " + mainFile);
// Load the plugin, all types implementing IPlugin and register them with DI
var assembly = Assembly.LoadFile(mainFile);
var pluginTypes = assembly.GetTypes().Where(t => typeof(IPlugin).IsAssignableFrom(t)).ToArray();
foreach (var pluginType in pluginTypes)
{
_childKernel.Bind(pluginType).To<IPlugin>().InSingletonScope();
pluginInfo.Instances.Add((IPlugin) _childKernel.Get(pluginType));
}
_plugins.Add(pluginInfo);
}
catch (Exception e)
{
throw new ArtemisPluginException("Failed to load plugin", e);
}
}
});
OnFinishedLoadedPlugins(); OnFinishedLoadedPlugins();
} }
/// <inheritdoc />
public ILayerType GetLayerTypeByGuid(Guid layerTypeGuid)
{
var pluginInfo = _plugins.FirstOrDefault(p => p.Guid == layerTypeGuid);
if (pluginInfo == null)
return null;
var layerType = pluginInfo.Instances.SingleOrDefault(p => p is ILayerType);
if (layerType == null)
throw new ArtemisPluginException(pluginInfo, "Plugin is expected to implement exactly one ILayerType");
return (ILayerType) layerType;
}
public void Dispose()
{
UnloadPlugins();
}
private void UnloadPlugins() private void UnloadPlugins()
{ {
_plugins.Clear(); _plugins.Clear();
@ -70,38 +116,6 @@ namespace Artemis.Core.Services
_childKernel.Dispose(); _childKernel.Dispose();
_childKernel = null; _childKernel = null;
} }
if (_appDomain != null)
{
AppDomain.Unload(_appDomain);
_appDomain = null;
}
}
/// <inheritdoc />
public async Task<IModuleViewModel> GetModuleViewModel(PluginInfo pluginInfo)
{
return await Task.Run(() => pluginInfo.GetModuleViewModel(_kernel));
}
/// <inheritdoc />
public ILayerType GetLayerTypeByGuid(Guid layerTypeGuid)
{
var pluginInfo = _plugins.FirstOrDefault(p => p.Guid == layerTypeGuid);
if (pluginInfo == null)
return null;
// Layer types are instantiated per layer so lets compile and return a new instance
if (!(pluginInfo.Plugin is ILayerType))
{
throw new ArtemisPluginException(pluginInfo, "Plugin is expected to implement ILayerType");
}
return (ILayerType) pluginInfo.Plugin;
}
public void Dispose()
{
UnloadPlugins();
} }
#region Events #region Events
@ -114,7 +128,7 @@ namespace Artemis.Core.Services
{ {
PluginLoaded?.Invoke(this, e); PluginLoaded?.Invoke(this, e);
} }
private void OnStartedLoadingPlugins() private void OnStartedLoadingPlugins()
{ {
LoadingPlugins = true; LoadingPlugins = true;

View File

@ -14,7 +14,7 @@ namespace Artemis.Core.Services
public class RgbService : IRgbService, IDisposable public class RgbService : IRgbService, IDisposable
{ {
private readonly TimerUpdateTrigger _updateTrigger; private readonly TimerUpdateTrigger _updateTrigger;
private List<IRGBDevice> _loadedDevices; private readonly List<IRGBDevice> _loadedDevices;
public RgbService() public RgbService()
{ {
@ -44,7 +44,6 @@ namespace Artemis.Core.Services
await Task.Run(() => await Task.Run(() =>
{ {
// TODO SpoinkyNL 8-1-18: Keep settings into account // TODO SpoinkyNL 8-1-18: Keep settings into account
// This one doesn't work well without ASUS devices installed // This one doesn't work well without ASUS devices installed
// Surface.LoadDevices(AsusDeviceProvider.Instance); // Surface.LoadDevices(AsusDeviceProvider.Instance);

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@ -27,7 +28,8 @@
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -51,7 +53,8 @@
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -67,7 +70,8 @@
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" /> <bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /> <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -83,7 +87,8 @@
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" /> <bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -91,7 +96,8 @@
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" /> <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" /> <bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -104,4 +110,7 @@
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="4.4.0" targetFramework="net461" /> <package id="Castle.Core" version="4.4.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" /> <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" />

View File

@ -1,8 +0,0 @@
<UserControl 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"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid />
</UserControl>

View File

@ -1,5 +0,0 @@
{
"Name": "Default",
"Version": "1.0.0",
"Main": "GeneralModule.dll"
}

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.FileVersionInfo" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Remotion.Linq" publicKeyToken="fee00910d6e5f53b" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RGB.NET.Brushes" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Core" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Decorators" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Groups" version="0.1.22" targetFramework="net461" />
<package id="Stylet" version="1.1.22" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Artemis.Plugins.LayerTypes.Brush</RootNamespace>
<AssemblyName>Artemis.Plugins.LayerTypes.Brush</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="RGB.NET.Core, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Core.0.1.22\lib\net45\RGB.NET.Core.dll</HintPath>
</Reference>
<Reference Include="Stylet, Version=1.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Stylet.1.1.22\lib\net45\Stylet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="BrushConfiguration.cs" />
<Compile Include="BrushLayerType.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
<Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project>
<Name>Artemis.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,6 +1,6 @@
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
namespace Artemis.Plugins.BuiltIn.LayerTypes.Brush namespace Artemis.Plugins.LayerTypes.Brush
{ {
public class BrushConfiguration : ILayerTypeConfiguration public class BrushConfiguration : ILayerTypeConfiguration
{ {

View File

@ -4,7 +4,7 @@ using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.ProfileElements; using Artemis.Core.ProfileElements;
using RGB.NET.Core; using RGB.NET.Core;
namespace Artemis.Plugins.BuiltIn.LayerTypes.Brush namespace Artemis.Plugins.LayerTypes.Brush
{ {
public class BrushLayerType : ILayerType public class BrushLayerType : ILayerType
{ {

View File

@ -4,12 +4,12 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Artemis.Plugins.BuiltIn")] [assembly: AssemblyTitle("Artemis.Plugins.LayerTypes.Brush")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("HP Inc.")]
[assembly: AssemblyProduct("Artemis.Plugins.BuiltIn")] [assembly: AssemblyProduct("Artemis.Plugins.LayerTypes.Brush")]
[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyCopyright("Copyright © HP Inc. 2019")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -19,7 +19,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("106f08ae-5fe8-433e-aa65-64e5219b5fc7")] [assembly: Guid("0f288a66-6eb0-4589-8595-e33a3a3eaea2")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RGB.NET.Core" version="0.1.22" targetFramework="net461" />
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
</packages>

View File

@ -4,15 +4,14 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{106F08AE-5FE8-433E-AA65-64E5219B5FC7}</ProjectGuid> <ProjectGuid>{E592F239-FAA0-4840-9C85-46E5867D06D5}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Artemis.Plugins.BuiltIn</RootNamespace> <RootNamespace>Artemis.Plugins.Modules.General</RootNamespace>
<AssemblyName>Artemis.Plugins.BuiltIn</AssemblyName> <AssemblyName>Artemis.Plugins.Modules.General</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp> <Deterministic>true</Deterministic>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -22,7 +21,6 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<LangVersion>5</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -32,82 +30,52 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>5</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="RGB.NET.Brushes, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Brushes.0.1.22\lib\net45\RGB.NET.Brushes.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Core, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="RGB.NET.Core, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Core.0.1.22\lib\net45\RGB.NET.Core.dll</HintPath> <HintPath>..\packages\RGB.NET.Core.0.1.22\lib\net45\RGB.NET.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="RGB.NET.Decorators, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Decorators.0.1.22\lib\net45\RGB.NET.Decorators.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Groups, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Groups.0.1.22\lib\net45\RGB.NET.Groups.dll</HintPath>
</Reference>
<Reference Include="Stylet, Version=1.1.22.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Stylet, Version=1.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Stylet.1.1.22\lib\net45\Stylet.dll</HintPath> <HintPath>..\packages\Stylet.1.1.22\lib\net45\Stylet.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath> <HintPath>..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xaml" /> <Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="LayerTypes\Brush\BrushConfiguration.cs" /> <Compile Include="GeneralDataModel.cs" />
<Compile Include="LayerTypes\Brush\BrushLayerType.cs" /> <Compile Include="GeneralModule.cs" />
<Compile Include="Modules\General\GeneralModule.cs" /> <Compile Include="ViewModels\GeneralViewModel.cs" />
<Compile Include="Modules\General\GeneralViewModel.cs" />
<Compile Include="Modules\General\GeneralDataModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Page Include="Modules\General\GeneralView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <None Include="app.config" />
<None Include="Modules\General\plugin.json" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="plugin.json" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj"> <ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
<Project>{9B811F9B-86B9-4771-87AF-72BAE7078A36}</Project> <Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project>
<Name>Artemis.Core</Name> <Name>Artemis.Core</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Page Include="Views\GeneralView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
</Target>
</Project> </Project>

View File

@ -1,7 +1,7 @@
using Artemis.Core.Attributes; using Artemis.Core.Attributes;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
namespace Artemis.Plugins.BuiltIn.Modules.General namespace Artemis.Plugins.Modules.General
{ {
public class GeneralDataModel : IModuleDataModel public class GeneralDataModel : IModuleDataModel
{ {

View File

@ -1,14 +1,15 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using Artemis.Core; using Artemis.Core;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.Services.Interfaces; using Artemis.Core.Services.Interfaces;
using Artemis.Plugins.Modules.General.ViewModels;
using RGB.NET.Core; using RGB.NET.Core;
using Stylet;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
using Rectangle = System.Drawing.Rectangle; using Rectangle = System.Drawing.Rectangle;
namespace Artemis.Plugins.BuiltIn.Modules.General namespace Artemis.Plugins.Modules.General
{ {
public class GeneralModule : IModule public class GeneralModule : IModule
{ {
@ -16,6 +17,10 @@ namespace Artemis.Plugins.BuiltIn.Modules.General
private readonly RGBSurface _surface; private readonly RGBSurface _surface;
private Dictionary<Led, Color> _colors; private Dictionary<Led, Color> _colors;
public GeneralModule()
{
}
public GeneralModule(IRgbService rgbService) public GeneralModule(IRgbService rgbService)
{ {
_rgbService = rgbService; _rgbService = rgbService;
@ -25,16 +30,8 @@ namespace Artemis.Plugins.BuiltIn.Modules.General
_rgbService.FinishedLoadedDevices += (sender, args) => PopulateColors(); _rgbService.FinishedLoadedDevices += (sender, args) => PopulateColors();
} }
public Type ViewModelType
{
get { return typeof(GeneralViewModel); }
}
// True since the main data model is all this module shows // True since the main data model is all this module shows
public bool ExpandsMainDataModel public bool ExpandsMainDataModel => true;
{
get { return true; }
}
public void Update(double deltaTime) public void Update(double deltaTime)
{ {
@ -59,6 +56,11 @@ namespace Artemis.Plugins.BuiltIn.Modules.General
} }
} }
public IScreen GetMainViewModel()
{
return new GeneralViewModel();
}
public void Dispose() public void Dispose()
{ {
_colors = null; _colors = null;

View File

@ -4,12 +4,12 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Artemis.Plugins")] [assembly: AssemblyTitle("Artemis.Plugins.Modules.General")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("HP Inc.")]
[assembly: AssemblyProduct("Artemis.Plugins")] [assembly: AssemblyProduct("Artemis.Plugins.Modules.General")]
[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyCopyright("Copyright © HP Inc. 2019")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -19,7 +19,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cd23bc5e-57f0-46ce-a007-24d031146219")] [assembly: Guid("e592f239-faa0-4840-9c85-46e5867d06d5")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //

View File

@ -2,7 +2,7 @@
using Artemis.Core.Plugins.Models; using Artemis.Core.Plugins.Models;
using Stylet; using Stylet;
namespace Artemis.Plugins.BuiltIn.Modules.General namespace Artemis.Plugins.Modules.General.ViewModels
{ {
public class GeneralViewModel : Screen, IModuleViewModel public class GeneralViewModel : Screen, IModuleViewModel
{ {

View File

@ -0,0 +1,10 @@
<UserControl x:Class="Artemis.Plugins.Modules.General.Views.GeneralView"
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:local="clr-namespace:Artemis.Plugins.Modules.General.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid />
</UserControl>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RGB.NET.Core" version="0.1.22" targetFramework="net461" />
<package id="Stylet" version="1.1.22" targetFramework="net461" />
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,5 @@
{
"Name": "General module",
"Version": "1.0.0",
"Main": "Artemis.Plugins.Modules.General.dll"
}

View File

@ -1,157 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CD23BC5E-57F0-46CE-A007-24D031146219}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Artemis.Plugins</RootNamespace>
<AssemblyName>Artemis.Plugins</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CSScriptLibrary, Version=3.28.0.0, Culture=neutral, PublicKeyToken=70fcc3d18c749033, processorArchitecture=MSIL">
<HintPath>..\packages\CS-Script.bin.3.28.0.1\lib\net46\CSScriptLibrary.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeAnalysis, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.CSharp.Scripting, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.Scripting.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Scripting.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.Scripting, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeAnalysis.Scripting.Common.2.6.1\lib\netstandard1.3\Microsoft.CodeAnalysis.Scripting.dll</HintPath>
</Reference>
<Reference Include="Mono.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\CS-Script.bin.3.28.0.1\lib\net46\Mono.CSharp.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<HintPath>..\packages\Ninject.3.3.4\lib\net45\Ninject.dll</HintPath>
</Reference>
<Reference Include="Stylet, Version=1.1.21.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Stylet.1.1.21\lib\net45\Stylet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.FileVersionInfo, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.FileVersionInfo.4.3.0\lib\net46\System.Diagnostics.FileVersionInfo.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.StackTrace, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
</Reference>
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net46\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
</Reference>
<Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath>
</Reference>
<Reference Include="System.Xml.XPath, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.XPath.4.3.0\lib\net46\System.Xml.XPath.dll</HintPath>
</Reference>
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<Folder Include="Abstract\" />
<Folder Include="Exceptions\" />
<Folder Include="Interfaces\" />
<Folder Include="Models\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.FileVersionInfo" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CS-Script.bin" version="3.28.0.1" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.Common" version="2.6.1" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.CSharp" version="2.6.1" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.CSharp.Scripting" version="2.6.1" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.Scripting" version="2.6.1" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.Scripting.Common" version="2.6.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net46" />
<package id="Ninject" version="3.3.4" targetFramework="net46" />
<package id="Stylet" version="1.1.21" targetFramework="net46" />
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
<package id="System.Console" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net46" />
<package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="net46" />
<package id="System.Globalization" version="4.3.0" targetFramework="net46" />
<package id="System.IO" version="4.3.0" targetFramework="net46" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net46" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net46" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net46" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" requireReinstallation="true" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
<package id="System.Text.Encoding.CodePages" version="4.3.0" targetFramework="net46" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net46" />
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net46" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net46" />
<package id="System.Xml.XPath" version="4.3.0" targetFramework="net46" />
<package id="System.Xml.XPath.XDocument" version="4.3.0" targetFramework="net46" />
</packages>

View File

@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore.Migrations; using System;
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
namespace Artemis.Storage.Migrations namespace Artemis.Storage.Migrations
{ {
@ -9,8 +8,8 @@ namespace Artemis.Storage.Migrations
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Folders", "Folders",
columns: table => new table => new
{ {
Guid = table.Column<string>(nullable: false), Guid = table.Column<string>(nullable: false),
FolderEntityGuid = table.Column<string>(nullable: true), FolderEntityGuid = table.Column<string>(nullable: true),
@ -21,28 +20,25 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Folders", x => x.Guid); table.PrimaryKey("PK_Folders", x => x.Guid);
table.ForeignKey( table.ForeignKey(
name: "FK_Folders_Folders_FolderEntityGuid", "FK_Folders_Folders_FolderEntityGuid",
column: x => x.FolderEntityGuid, x => x.FolderEntityGuid,
principalTable: "Folders", "Folders",
principalColumn: "Guid", "Guid",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Settings", "Settings",
columns: table => new table => new
{ {
Name = table.Column<string>(nullable: false), Name = table.Column<string>(nullable: false),
Value = table.Column<string>(nullable: true) Value = table.Column<string>(nullable: true)
}, },
constraints: table => constraints: table => { table.PrimaryKey("PK_Settings", x => x.Name); });
{
table.PrimaryKey("PK_Settings", x => x.Name);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Layers", "Layers",
columns: table => new table => new
{ {
Guid = table.Column<string>(nullable: false), Guid = table.Column<string>(nullable: false),
FolderEntityGuid = table.Column<string>(nullable: true), FolderEntityGuid = table.Column<string>(nullable: true),
@ -53,16 +49,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Layers", x => x.Guid); table.PrimaryKey("PK_Layers", x => x.Guid);
table.ForeignKey( table.ForeignKey(
name: "FK_Layers_Folders_FolderEntityGuid", "FK_Layers_Folders_FolderEntityGuid",
column: x => x.FolderEntityGuid, x => x.FolderEntityGuid,
principalTable: "Folders", "Folders",
principalColumn: "Guid", "Guid",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Profiles", "Profiles",
columns: table => new table => new
{ {
Guid = table.Column<string>(nullable: false), Guid = table.Column<string>(nullable: false),
Name = table.Column<string>(nullable: true), Name = table.Column<string>(nullable: true),
@ -74,16 +70,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Profiles", x => x.Guid); table.PrimaryKey("PK_Profiles", x => x.Guid);
table.ForeignKey( table.ForeignKey(
name: "FK_Profiles_Folders_RootFolderGuid", "FK_Profiles_Folders_RootFolderGuid",
column: x => x.RootFolderGuid, x => x.RootFolderGuid,
principalTable: "Folders", "Folders",
principalColumn: "Guid", "Guid",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "LayerSettings", "LayerSettings",
columns: table => new table => new
{ {
Guid = table.Column<string>(nullable: false), Guid = table.Column<string>(nullable: false),
LayerEntityGuid = table.Column<string>(nullable: true), LayerEntityGuid = table.Column<string>(nullable: true),
@ -94,16 +90,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_LayerSettings", x => x.Guid); table.PrimaryKey("PK_LayerSettings", x => x.Guid);
table.ForeignKey( table.ForeignKey(
name: "FK_LayerSettings_Layers_LayerEntityGuid", "FK_LayerSettings_Layers_LayerEntityGuid",
column: x => x.LayerEntityGuid, x => x.LayerEntityGuid,
principalTable: "Layers", "Layers",
principalColumn: "Guid", "Guid",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Leds", "Leds",
columns: table => new table => new
{ {
Guid = table.Column<string>(nullable: false), Guid = table.Column<string>(nullable: false),
LayerGuid = table.Column<string>(nullable: true), LayerGuid = table.Column<string>(nullable: true),
@ -115,16 +111,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Leds", x => x.Guid); table.PrimaryKey("PK_Leds", x => x.Guid);
table.ForeignKey( table.ForeignKey(
name: "FK_Leds_Layers_LayerGuid", "FK_Leds_Layers_LayerGuid",
column: x => x.LayerGuid, x => x.LayerGuid,
principalTable: "Layers", "Layers",
principalColumn: "Guid", "Guid",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Keypoints", "Keypoints",
columns: table => new table => new
{ {
Guid = table.Column<string>(nullable: false), Guid = table.Column<string>(nullable: false),
LayerSettingEntityGuid = table.Column<string>(nullable: true), LayerSettingEntityGuid = table.Column<string>(nullable: true),
@ -135,66 +131,66 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Keypoints", x => x.Guid); table.PrimaryKey("PK_Keypoints", x => x.Guid);
table.ForeignKey( table.ForeignKey(
name: "FK_Keypoints_LayerSettings_LayerSettingEntityGuid", "FK_Keypoints_LayerSettings_LayerSettingEntityGuid",
column: x => x.LayerSettingEntityGuid, x => x.LayerSettingEntityGuid,
principalTable: "LayerSettings", "LayerSettings",
principalColumn: "Guid", "Guid",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Folders_FolderEntityGuid", "IX_Folders_FolderEntityGuid",
table: "Folders", "Folders",
column: "FolderEntityGuid"); "FolderEntityGuid");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Keypoints_LayerSettingEntityGuid", "IX_Keypoints_LayerSettingEntityGuid",
table: "Keypoints", "Keypoints",
column: "LayerSettingEntityGuid"); "LayerSettingEntityGuid");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Layers_FolderEntityGuid", "IX_Layers_FolderEntityGuid",
table: "Layers", "Layers",
column: "FolderEntityGuid"); "FolderEntityGuid");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_LayerSettings_LayerEntityGuid", "IX_LayerSettings_LayerEntityGuid",
table: "LayerSettings", "LayerSettings",
column: "LayerEntityGuid"); "LayerEntityGuid");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Leds_LayerGuid", "IX_Leds_LayerGuid",
table: "Leds", "Leds",
column: "LayerGuid"); "LayerGuid");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Profiles_RootFolderGuid", "IX_Profiles_RootFolderGuid",
table: "Profiles", "Profiles",
column: "RootFolderGuid"); "RootFolderGuid");
} }
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Keypoints"); "Keypoints");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Leds"); "Leds");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Profiles"); "Profiles");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Settings"); "Settings");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "LayerSettings"); "LayerSettings");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Layers"); "Layers");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Folders"); "Folders");
} }
} }
} }

View File

@ -1,17 +1,13 @@
// <auto-generated /> // <auto-generated />
using Artemis.Storage;
using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Internal;
using System;
namespace Artemis.Storage.Migrations namespace Artemis.Storage.Migrations
{ {
[DbContext(typeof(StorageContext))] [DbContext(typeof(StorageContext))]
partial class StorageContextModelSnapshot : ModelSnapshot internal class StorageContextModelSnapshot : ModelSnapshot
{ {
protected override void BuildModel(ModelBuilder modelBuilder) protected override void BuildModel(ModelBuilder modelBuilder)
{ {
@ -20,171 +16,171 @@ namespace Artemis.Storage.Migrations
.HasAnnotation("ProductVersion", "2.0.2-rtm-10011"); .HasAnnotation("ProductVersion", "2.0.2-rtm-10011");
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
{ {
b.Property<string>("Guid") b.Property<string>("Guid")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("FolderEntityGuid"); b.Property<string>("FolderEntityGuid");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<int>("Order"); b.Property<int>("Order");
b.HasKey("Guid"); b.HasKey("Guid");
b.HasIndex("FolderEntityGuid"); b.HasIndex("FolderEntityGuid");
b.ToTable("Folders"); b.ToTable("Folders");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
{ {
b.Property<string>("Guid") b.Property<string>("Guid")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("LayerSettingEntityGuid"); b.Property<string>("LayerSettingEntityGuid");
b.Property<int>("Time"); b.Property<int>("Time");
b.Property<string>("Value"); b.Property<string>("Value");
b.HasKey("Guid"); b.HasKey("Guid");
b.HasIndex("LayerSettingEntityGuid"); b.HasIndex("LayerSettingEntityGuid");
b.ToTable("Keypoints"); b.ToTable("Keypoints");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
{ {
b.Property<string>("Guid") b.Property<string>("Guid")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("FolderEntityGuid"); b.Property<string>("FolderEntityGuid");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<int>("Order"); b.Property<int>("Order");
b.HasKey("Guid"); b.HasKey("Guid");
b.HasIndex("FolderEntityGuid"); b.HasIndex("FolderEntityGuid");
b.ToTable("Layers"); b.ToTable("Layers");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
{ {
b.Property<string>("Guid") b.Property<string>("Guid")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("LayerEntityGuid"); b.Property<string>("LayerEntityGuid");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<string>("Value"); b.Property<string>("Value");
b.HasKey("Guid"); b.HasKey("Guid");
b.HasIndex("LayerEntityGuid"); b.HasIndex("LayerEntityGuid");
b.ToTable("LayerSettings"); b.ToTable("LayerSettings");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
{ {
b.Property<string>("Guid") b.Property<string>("Guid")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("LayerGuid"); b.Property<string>("LayerGuid");
b.Property<int>("LayerId"); b.Property<int>("LayerId");
b.Property<string>("LedName"); b.Property<string>("LedName");
b.Property<string>("LimitedToDevice"); b.Property<string>("LimitedToDevice");
b.HasKey("Guid"); b.HasKey("Guid");
b.HasIndex("LayerGuid"); b.HasIndex("LayerGuid");
b.ToTable("Leds"); b.ToTable("Leds");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
{ {
b.Property<string>("Guid") b.Property<string>("Guid")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<Guid>("PluginGuid"); b.Property<Guid>("PluginGuid");
b.Property<string>("RootFolderGuid"); b.Property<string>("RootFolderGuid");
b.Property<int>("RootFolderId"); b.Property<int>("RootFolderId");
b.HasKey("Guid"); b.HasKey("Guid");
b.HasIndex("RootFolderGuid"); b.HasIndex("RootFolderGuid");
b.ToTable("Profiles"); b.ToTable("Profiles");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.SettingEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.SettingEntity", b =>
{ {
b.Property<string>("Name") b.Property<string>("Name")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("Value"); b.Property<string>("Value");
b.HasKey("Name"); b.HasKey("Name");
b.ToTable("Settings"); b.ToTable("Settings");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
{ {
b.HasOne("Artemis.Storage.Entities.FolderEntity") b.HasOne("Artemis.Storage.Entities.FolderEntity")
.WithMany("Folders") .WithMany("Folders")
.HasForeignKey("FolderEntityGuid"); .HasForeignKey("FolderEntityGuid");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
{ {
b.HasOne("Artemis.Storage.Entities.LayerSettingEntity") b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
.WithMany("Keypoints") .WithMany("Keypoints")
.HasForeignKey("LayerSettingEntityGuid"); .HasForeignKey("LayerSettingEntityGuid");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
{ {
b.HasOne("Artemis.Storage.Entities.FolderEntity") b.HasOne("Artemis.Storage.Entities.FolderEntity")
.WithMany("Layers") .WithMany("Layers")
.HasForeignKey("FolderEntityGuid"); .HasForeignKey("FolderEntityGuid");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
{ {
b.HasOne("Artemis.Storage.Entities.LayerEntity") b.HasOne("Artemis.Storage.Entities.LayerEntity")
.WithMany("Settings") .WithMany("Settings")
.HasForeignKey("LayerEntityGuid"); .HasForeignKey("LayerEntityGuid");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
{ {
b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer") b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
.WithMany("Leds") .WithMany("Leds")
.HasForeignKey("LayerGuid"); .HasForeignKey("LayerGuid");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
{ {
b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder") b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
.WithMany() .WithMany()
.HasForeignKey("RootFolderGuid"); .HasForeignKey("RootFolderGuid");
}); });
#pragma warning restore 612, 618 #pragma warning restore 612, 618
} }
} }
} }

View File

@ -31,7 +31,8 @@
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -55,7 +56,8 @@
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -71,7 +73,8 @@
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" /> <bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /> <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -87,7 +90,8 @@
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" /> <bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -95,7 +99,8 @@
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" /> <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" /> <bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>

View File

@ -216,10 +216,6 @@
<Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project> <Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project>
<Name>Artemis.Core</Name> <Name>Artemis.Core</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Artemis.Plugins.BuiltIn\Artemis.Plugins.BuiltIn.csproj">
<Project>{106f08ae-5fe8-433e-aa65-64e5219b5fc7}</Project>
<Name>Artemis.Plugins.BuiltIn</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\logo-512.png" /> <Resource Include="Resources\logo-512.png" />
@ -236,9 +232,8 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>echo Copying built-in plugins... <PostBuildEvent>
mkdir %25ProgramData%25\Artemis\plugins </PostBuildEvent>
xcopy /s /y /q $(SolutionDir)Artemis.Plugins.BuiltIn\Modules %25ProgramData%25\Artemis\plugins</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="..\packages\Fody.4.2.1\build\Fody.targets" Condition="Exists('..\packages\Fody.4.2.1\build\Fody.targets')" /> <Import Project="..\packages\Fody.4.2.1\build\Fody.targets" Condition="Exists('..\packages\Fody.4.2.1\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@ -246,8 +241,8 @@ xcopy /s /y /q $(SolutionDir)Artemis.Plugins.BuiltIn\Modules %25ProgramData%25\A
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.4.2.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.2.1\build\Fody.targets'))" /> <Error Condition="!Exists('..\packages\Fody.4.2.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.2.1\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props'))" />
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets'))" /> <Error Condition="!Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets'))" />
<Error Condition="!Exists('..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props'))" />
</Target> </Target>
<Import Project="..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" /> <Import Project="..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" />
</Project> </Project>

View File

@ -70,8 +70,10 @@ namespace Artemis.UI.Controls.Visualizers
private void RGBSurfaceOnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs args) private void RGBSurfaceOnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs args)
{ {
if (args.DeviceAdded) if (args.DeviceAdded)
{
foreach (var device in args.Devices) foreach (var device in args.Devices)
_newDevices.Add(device); _newDevices.Add(device);
}
UpdateSurface(); UpdateSurface();
} }

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged /> <PropertyChanged />
</Weavers> </Weavers>

View File

@ -5,7 +5,6 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Controls; using System.Windows.Controls;
using Artemis.Core.Plugins.Interfaces; using Artemis.Core.Plugins.Interfaces;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces; using Artemis.Core.Services.Interfaces;
using Artemis.UI.ViewModels.Interfaces; using Artemis.UI.ViewModels.Interfaces;
using Artemis.UI.ViewModels.Settings; using Artemis.UI.ViewModels.Settings;
@ -29,25 +28,25 @@ namespace Artemis.UI.ViewModels
ActiveItem = _artemisViewModels.First(v => v.GetType() == typeof(HomeViewModel)); ActiveItem = _artemisViewModels.First(v => v.GetType() == typeof(HomeViewModel));
// Sync up with the plugin service // Sync up with the plugin service
Modules = new BindableCollection<PluginInfo>(); Modules = new BindableCollection<IModule>();
LoadingPlugins = _pluginService.LoadingPlugins; LoadingPlugins = _pluginService.LoadingPlugins;
_pluginService.StartedLoadingPlugins += PluginServiceOnStartedLoadingPlugins; _pluginService.StartedLoadingPlugins += PluginServiceOnStartedLoadingPlugins;
_pluginService.FinishedLoadedPlugins += PluginServiceOnFinishedLoadedPlugins; _pluginService.FinishedLoadedPlugins += PluginServiceOnFinishedLoadedPlugins;
if (!LoadingPlugins) if (!LoadingPlugins)
Modules.AddRange(_pluginService.Plugins.Where(p => p.Plugin is IModule)); Modules.AddRange(_pluginService.Plugins.SelectMany(p => p.Instances.Where(i => i is IModule).Cast<IModule>()));
PropertyChanged += OnSelectedModuleChanged; PropertyChanged += OnSelectedModuleChanged;
PropertyChanged += OnSelectedPageChanged; PropertyChanged += OnSelectedPageChanged;
} }
public IObservableCollection<PluginInfo> Modules { get; set; } public IObservableCollection<IModule> Modules { get; set; }
public bool MenuOpen { get; set; } public bool MenuOpen { get; set; }
public bool LoadingPlugins { get; set; } public bool LoadingPlugins { get; set; }
public ListBoxItem SelectedPage { get; set; } public ListBoxItem SelectedPage { get; set; }
public PluginInfo SelectedModule { get; set; } public IModule SelectedModule { get; set; }
private void PluginServiceOnStartedLoadingPlugins(object sender, EventArgs eventArgs) private void PluginServiceOnStartedLoadingPlugins(object sender, EventArgs eventArgs)
{ {
@ -59,7 +58,7 @@ namespace Artemis.UI.ViewModels
private void PluginServiceOnFinishedLoadedPlugins(object sender, EventArgs eventArgs) private void PluginServiceOnFinishedLoadedPlugins(object sender, EventArgs eventArgs)
{ {
Modules.AddRange(_pluginService.Plugins.Where(p => p.Plugin is IModule)); Modules.AddRange(_pluginService.Plugins.SelectMany(p => p.Instances.Where(i => i is IModule).Cast<IModule>()));
SelectedModule = null; SelectedModule = null;
LoadingPlugins = false; LoadingPlugins = false;
@ -71,7 +70,7 @@ namespace Artemis.UI.ViewModels
return; return;
// Create a view model for the given plugin info (which will be a module) // Create a view model for the given plugin info (which will be a module)
var viewModel = await _pluginService.GetModuleViewModel(SelectedModule); var viewModel = await Task.Run(() => SelectedModule.GetMainViewModel());
// Tell Stylet to active the view model, the view manager will compile and show the XAML // Tell Stylet to active the view model, the view manager will compile and show the XAML
ActivateItem(viewModel); ActivateItem(viewModel);

View File

@ -8,8 +8,6 @@ namespace Artemis.UI.ViewModels.Settings
{ {
public class SettingsViewModel : Screen, ISettingsViewModel public class SettingsViewModel : Screen, ISettingsViewModel
{ {
public string Title => "Settings";
public SettingsViewModel(IRgbService rgbService) public SettingsViewModel(IRgbService rgbService)
{ {
DeviceSettingsViewModels = new List<DeviceSettingsViewModel>(); DeviceSettingsViewModels = new List<DeviceSettingsViewModel>();
@ -20,10 +18,11 @@ namespace Artemis.UI.ViewModels.Settings
} }
public List<DeviceSettingsViewModel> DeviceSettingsViewModels { get; set; } public List<DeviceSettingsViewModel> DeviceSettingsViewModels { get; set; }
public string Title => "Settings";
private void UpdateDevices(object sender, DeviceEventArgs deviceEventArgs) private void UpdateDevices(object sender, DeviceEventArgs deviceEventArgs)
{ {
DeviceSettingsViewModels.Add(new DeviceSettingsViewModel(deviceEventArgs.Device)); DeviceSettingsViewModels.Add(new DeviceSettingsViewModel(deviceEventArgs.Device));
} }
} }
} }

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="4.4.0" targetFramework="net461" /> <package id="Castle.Core" version="4.4.0" targetFramework="net461" />
<package id="ControlzEx" version="3.0.2.4" targetFramework="net461" /> <package id="ControlzEx" version="3.0.2.4" targetFramework="net461" />
@ -11,7 +12,7 @@
<package id="Ninject" version="3.3.4" targetFramework="net461" /> <package id="Ninject" version="3.3.4" targetFramework="net461" />
<package id="Ninject.Extensions.Conventions" version="3.3.0" targetFramework="net461" /> <package id="Ninject.Extensions.Conventions" version="3.3.0" targetFramework="net461" />
<package id="Ninject.Extensions.Factory" version="3.3.2" targetFramework="net461" /> <package id="Ninject.Extensions.Factory" version="3.3.2" targetFramework="net461" />
<package id="PropertyChanged.Fody" version="2.6.1" targetFramework="net461" developmentDependency="true" /> <package id="PropertyChanged.Fody" version="2.6.1" targetFramework="net461" />
<package id="RGB.NET.Brushes" version="0.1.22" targetFramework="net461" /> <package id="RGB.NET.Brushes" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Core" version="0.1.22" targetFramework="net461" /> <package id="RGB.NET.Core" version="0.1.22" targetFramework="net461" />
<package id="RGB.NET.Decorators" version="0.1.22" targetFramework="net461" /> <package id="RGB.NET.Decorators" version="0.1.22" targetFramework="net461" />

View File

@ -9,7 +9,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Artemis.Storage", "Artemis.
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Core", "Artemis.Core\Artemis.Core.csproj", "{9B811F9B-86B9-4771-87AF-72BAE7078A36}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Core", "Artemis.Core\Artemis.Core.csproj", "{9B811F9B-86B9-4771-87AF-72BAE7078A36}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.BuiltIn", "Artemis.Plugins.BuiltIn\Artemis.Plugins.BuiltIn.csproj", "{106F08AE-5FE8-433E-AA65-64E5219B5FC7}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{E830A02B-A7E5-4A6B-943F-76B0A542630C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.Modules.General", "Artemis.Plugins.Modules.General\Artemis.Plugins.Modules.General.csproj", "{E592F239-FAA0-4840-9C85-46E5867D06D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.LayerTypes.Brush", "Artemis.Plugins.LayerTypes.Brush\Artemis.Plugins.LayerTypes.Brush.csproj", "{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -43,18 +47,30 @@ Global
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|Any CPU.Build.0 = Release|Any CPU {9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|Any CPU.Build.0 = Release|Any CPU
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|x64.ActiveCfg = Release|x64 {9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|x64.ActiveCfg = Release|x64
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|x64.Build.0 = Release|x64 {9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|x64.Build.0 = Release|x64
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU {E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Debug|x64.ActiveCfg = Debug|x64 {E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|x64.ActiveCfg = Debug|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Debug|x64.Build.0 = Debug|x64 {E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|x64.Build.0 = Debug|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU {E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Release|Any CPU.Build.0 = Release|Any CPU {E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|Any CPU.Build.0 = Release|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Release|x64.ActiveCfg = Release|x64 {E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|x64.ActiveCfg = Release|Any CPU
{106F08AE-5FE8-433E-AA65-64E5219B5FC7}.Release|x64.Build.0 = Release|x64 {E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|x64.Build.0 = Release|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|x64.ActiveCfg = Debug|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|x64.Build.0 = Debug|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|Any CPU.Build.0 = Release|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|x64.ActiveCfg = Release|Any CPU
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E592F239-FAA0-4840-9C85-46E5867D06D5} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2} = {E830A02B-A7E5-4A6B-943F-76B0A542630C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C203080A-4473-4CC2-844B-F552EA43D66A} SolutionGuid = {C203080A-4473-4CC2-844B-F552EA43D66A}
EndGlobalSection EndGlobalSection