diff --git a/src/Artemis.Core/Extensions/TypeExtensions.cs b/src/Artemis.Core/Extensions/TypeExtensions.cs
index 7cee6a795..737a9be6c 100644
--- a/src/Artemis.Core/Extensions/TypeExtensions.cs
+++ b/src/Artemis.Core/Extensions/TypeExtensions.cs
@@ -8,7 +8,7 @@ namespace Artemis.Core.Extensions
{
if (type == null)
return false;
-
+
return type.BaseType?.GetGenericTypeDefinition() == genericType;
}
}
diff --git a/src/Artemis.Core/Models/Profile/Folder.cs b/src/Artemis.Core/Models/Profile/Folder.cs
index 121924fe7..8198b11c5 100644
--- a/src/Artemis.Core/Models/Profile/Folder.cs
+++ b/src/Artemis.Core/Models/Profile/Folder.cs
@@ -3,7 +3,6 @@ using System.Drawing;
using Artemis.Core.Models.Profile.Interfaces;
using Artemis.Core.Services.Interfaces;
using Artemis.Storage.Entities;
-using RGB.NET.Core;
namespace Artemis.Core.Models.Profile
{
diff --git a/src/Artemis.Core/Models/Profile/Interfaces/IProfileElement.cs b/src/Artemis.Core/Models/Profile/Interfaces/IProfileElement.cs
index 2cc72c88b..95f79832c 100644
--- a/src/Artemis.Core/Models/Profile/Interfaces/IProfileElement.cs
+++ b/src/Artemis.Core/Models/Profile/Interfaces/IProfileElement.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Drawing;
-using RGB.NET.Core;
namespace Artemis.Core.Models.Profile.Interfaces
{
diff --git a/src/Artemis.Core/Models/Profile/Profile.cs b/src/Artemis.Core/Models/Profile/Profile.cs
index 9f9bdfae5..f8a76cdf1 100644
--- a/src/Artemis.Core/Models/Profile/Profile.cs
+++ b/src/Artemis.Core/Models/Profile/Profile.cs
@@ -6,7 +6,6 @@ using Artemis.Core.Models.Profile.Interfaces;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces;
using Artemis.Storage.Entities;
-using RGB.NET.Core;
namespace Artemis.Core.Models.Profile
{
diff --git a/src/Artemis.Core/Models/Surface/Device.cs b/src/Artemis.Core/Models/Surface/Device.cs
index 85c287cd1..8bd82320d 100644
--- a/src/Artemis.Core/Models/Surface/Device.cs
+++ b/src/Artemis.Core/Models/Surface/Device.cs
@@ -1,13 +1,11 @@
using System;
using System.Collections.ObjectModel;
-using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using Artemis.Core.Extensions;
using Artemis.Core.Plugins.Abstract;
using Artemis.Storage.Entities;
using RGB.NET.Core;
-using Point = RGB.NET.Core.Point;
using Rectangle = System.Drawing.Rectangle;
namespace Artemis.Core.Models.Surface
@@ -104,12 +102,12 @@ namespace Artemis.Core.Models.Surface
foreach (var led in Leds)
led.CalculateRenderRectangle();
-
+
var path = new GraphicsPath();
path.AddRectangles(Leds.Select(l => l.AbsoluteRenderRectangle).ToArray());
RenderPath = path;
}
-
+
internal void Destroy()
{
Configuration = null;
diff --git a/src/Artemis.Core/Models/Surface/Surface.cs b/src/Artemis.Core/Models/Surface/Surface.cs
index be8d9a37c..9054aba71 100644
--- a/src/Artemis.Core/Models/Surface/Surface.cs
+++ b/src/Artemis.Core/Models/Surface/Surface.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using Artemis.Core.Extensions;
using Artemis.Storage.Entities;
using RGB.NET.Core;
diff --git a/src/Artemis.Core/Ninject/CoreModule.cs b/src/Artemis.Core/Ninject/CoreModule.cs
index 7a84505d9..fcdbf289c 100644
--- a/src/Artemis.Core/Ninject/CoreModule.cs
+++ b/src/Artemis.Core/Ninject/CoreModule.cs
@@ -1,9 +1,6 @@
-using System;
-using System.IO;
-using System.Linq;
+using System.IO;
using Artemis.Core.Exceptions;
using Artemis.Core.Plugins.Models;
-using Artemis.Core.Services;
using Artemis.Core.Services.Interfaces;
using Artemis.Storage.Repositories.Interfaces;
using Ninject.Activation;
diff --git a/src/Artemis.Core/Ninject/LoggerProvider.cs b/src/Artemis.Core/Ninject/LoggerProvider.cs
index beb334ed9..f279ec5e3 100644
--- a/src/Artemis.Core/Ninject/LoggerProvider.cs
+++ b/src/Artemis.Core/Ninject/LoggerProvider.cs
@@ -8,8 +8,8 @@ namespace Artemis.Core.Ninject
private static readonly ILogger _logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.Enrich.WithDemystifiedStackTraces()
- .WriteTo.File("Logs/Artemis log-.txt",
- rollingInterval: RollingInterval.Day,
+ .WriteTo.File("Logs/Artemis log-.txt",
+ rollingInterval: RollingInterval.Day,
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext:l}] {Message:lj}{NewLine}{Exception}")
.CreateLogger();
@@ -19,7 +19,6 @@ namespace Artemis.Core.Ninject
if (requestingType != null)
return _logger.ForContext(requestingType);
return _logger;
-
}
}
}
\ No newline at end of file
diff --git a/src/Artemis.Core/Ninject/SettingsServiceProvider.cs b/src/Artemis.Core/Ninject/SettingsServiceProvider.cs
index f622e9bdc..49f97654e 100644
--- a/src/Artemis.Core/Ninject/SettingsServiceProvider.cs
+++ b/src/Artemis.Core/Ninject/SettingsServiceProvider.cs
@@ -25,6 +25,5 @@ namespace Artemis.Core.Ninject
return _instance;
}
-
}
}
\ No newline at end of file
diff --git a/src/Artemis.Core/Plugins/Abstract/Device.cs b/src/Artemis.Core/Plugins/Abstract/Device.cs
index 0f2f02f59..d417b3c5d 100644
--- a/src/Artemis.Core/Plugins/Abstract/Device.cs
+++ b/src/Artemis.Core/Plugins/Abstract/Device.cs
@@ -12,13 +12,13 @@ namespace Artemis.Core.Plugins.Abstract
///
public abstract class Device : Plugin
{
- public IRGBDeviceProvider DeviceProvider { get; }
-
protected Device(PluginInfo pluginInfo, IRGBDeviceProvider deviceProvider) : base(pluginInfo)
{
DeviceProvider = deviceProvider ?? throw new ArgumentNullException(nameof(deviceProvider));
}
+ public IRGBDeviceProvider DeviceProvider { get; }
+
protected void ResolveAbsolutePath(Type type, object sender, ResolvePathEventArgs e)
{
diff --git a/src/Artemis.Core/Plugins/Abstract/LayerType.cs b/src/Artemis.Core/Plugins/Abstract/LayerType.cs
index 676d43387..a952dcdef 100644
--- a/src/Artemis.Core/Plugins/Abstract/LayerType.cs
+++ b/src/Artemis.Core/Plugins/Abstract/LayerType.cs
@@ -2,7 +2,6 @@
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Models;
-using RGB.NET.Core;
namespace Artemis.Core.Plugins.Abstract
{
diff --git a/src/Artemis.Core/Plugins/Abstract/Module.cs b/src/Artemis.Core/Plugins/Abstract/Module.cs
index e710c3bb6..94b49f3ee 100644
--- a/src/Artemis.Core/Plugins/Abstract/Module.cs
+++ b/src/Artemis.Core/Plugins/Abstract/Module.cs
@@ -2,8 +2,6 @@
using System.Drawing;
using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Models;
-using RGB.NET.Core;
-using Stylet;
namespace Artemis.Core.Plugins.Abstract
{
diff --git a/src/Artemis.Core/Plugins/Abstract/Plugin.cs b/src/Artemis.Core/Plugins/Abstract/Plugin.cs
index 1f1146c96..3e34fcccb 100644
--- a/src/Artemis.Core/Plugins/Abstract/Plugin.cs
+++ b/src/Artemis.Core/Plugins/Abstract/Plugin.cs
@@ -1,5 +1,4 @@
using System;
-using System.Threading.Tasks;
using Artemis.Core.Plugins.Models;
namespace Artemis.Core.Plugins.Abstract
@@ -17,6 +16,12 @@ namespace Artemis.Core.Plugins.Abstract
public PluginInfo PluginInfo { get; internal set; }
+ ///
+ ///
+ /// Called when the plugin is unloaded, clean up any unmanaged resources here
+ ///
+ public abstract void Dispose();
+
///
/// Called when the plugin is activated
///
@@ -26,11 +31,5 @@ namespace Artemis.Core.Plugins.Abstract
/// Called when the plugin is deactivated
///
public abstract void DisablePlugin();
-
- ///
- ///
- /// Called when the plugin is unloaded, clean up any unmanaged resources here
- ///
- public abstract void Dispose();
}
}
\ No newline at end of file
diff --git a/src/Artemis.Core/Plugins/Abstract/ProfileModule.cs b/src/Artemis.Core/Plugins/Abstract/ProfileModule.cs
index 31c1b6cd0..8e0a8992e 100644
--- a/src/Artemis.Core/Plugins/Abstract/ProfileModule.cs
+++ b/src/Artemis.Core/Plugins/Abstract/ProfileModule.cs
@@ -3,7 +3,6 @@ using System.Drawing;
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Models;
-using RGB.NET.Core;
namespace Artemis.Core.Plugins.Abstract
{
diff --git a/src/Artemis.Core/Plugins/Models/PluginSetting.cs b/src/Artemis.Core/Plugins/Models/PluginSetting.cs
index f2608249d..b925c140f 100644
--- a/src/Artemis.Core/Plugins/Models/PluginSetting.cs
+++ b/src/Artemis.Core/Plugins/Models/PluginSetting.cs
@@ -1,10 +1,8 @@
using System;
-using System.ComponentModel;
using System.Threading.Tasks;
using Artemis.Storage.Entities;
using Artemis.Storage.Repositories.Interfaces;
using Newtonsoft.Json;
-using Stylet;
namespace Artemis.Core.Plugins.Models
{
diff --git a/src/Artemis.Core/RGB.NET/DirectBitmap.cs b/src/Artemis.Core/RGB.NET/DirectBitmap.cs
index e328a7df3..9bc7ddce4 100644
--- a/src/Artemis.Core/RGB.NET/DirectBitmap.cs
+++ b/src/Artemis.Core/RGB.NET/DirectBitmap.cs
@@ -50,6 +50,7 @@ namespace Artemis.Core.RGB.NET
return result;
}
+
return Color.Black;
}
}
diff --git a/src/Artemis.Core/Services/CoreService.cs b/src/Artemis.Core/Services/CoreService.cs
index 60d80819a..ec41cb386 100644
--- a/src/Artemis.Core/Services/CoreService.cs
+++ b/src/Artemis.Core/Services/CoreService.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
using System.Threading.Tasks;
using Artemis.Core.Events;
using Artemis.Core.Exceptions;
@@ -101,6 +100,16 @@ namespace Artemis.Core.Services
OnFrameRendered(new FrameRenderedEventArgs(_rgbService.GraphicsDecorator.GetBitmap(), _rgbService.Surface));
}
+ protected virtual void OnFrameRendering(FrameRenderingEventArgs e)
+ {
+ FrameRendering?.Invoke(this, e);
+ }
+
+ protected virtual void OnFrameRendered(FrameRenderedEventArgs e)
+ {
+ FrameRendered?.Invoke(this, e);
+ }
+
#region Events
public event EventHandler Initialized;
@@ -114,15 +123,5 @@ namespace Artemis.Core.Services
}
#endregion
-
- protected virtual void OnFrameRendering(FrameRenderingEventArgs e)
- {
- FrameRendering?.Invoke(this, e);
- }
-
- protected virtual void OnFrameRendered(FrameRenderedEventArgs e)
- {
- FrameRendered?.Invoke(this, e);
- }
}
}
\ No newline at end of file
diff --git a/src/Artemis.Core/Services/Interfaces/IMainDataModelService.cs b/src/Artemis.Core/Services/Interfaces/IMainDataModelService.cs
index 25ed1c2f4..c620a6d01 100644
--- a/src/Artemis.Core/Services/Interfaces/IMainDataModelService.cs
+++ b/src/Artemis.Core/Services/Interfaces/IMainDataModelService.cs
@@ -1,6 +1,5 @@
using Artemis.Core.Models;
using Artemis.Core.Plugins.Abstract;
-using Artemis.Core.Plugins.Interfaces;
namespace Artemis.Core.Services.Interfaces
{
diff --git a/src/Artemis.Core/Services/Interfaces/IPluginService.cs b/src/Artemis.Core/Services/Interfaces/IPluginService.cs
index c50bec069..031b1a788 100644
--- a/src/Artemis.Core/Services/Interfaces/IPluginService.cs
+++ b/src/Artemis.Core/Services/Interfaces/IPluginService.cs
@@ -74,7 +74,7 @@ namespace Artemis.Core.Services.Interfaces
#region Events
///
- /// Occurs when built-in plugins are being loaded
+ /// Occurs when built-in plugins are being loaded
///
event EventHandler CopyingBuildInPlugins;
diff --git a/src/Artemis.Core/Services/Interfaces/IRgbService.cs b/src/Artemis.Core/Services/Interfaces/IRgbService.cs
index f0946dc07..ebf7298c0 100644
--- a/src/Artemis.Core/Services/Interfaces/IRgbService.cs
+++ b/src/Artemis.Core/Services/Interfaces/IRgbService.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Artemis.Core.Events;
-using Artemis.Core.Models.Surface;
using Artemis.Core.RGB.NET;
using RGB.NET.Core;
diff --git a/src/Artemis.Core/Services/PluginService.cs b/src/Artemis.Core/Services/PluginService.cs
index 84bb0dc20..1aea17fbf 100644
--- a/src/Artemis.Core/Services/PluginService.cs
+++ b/src/Artemis.Core/Services/PluginService.cs
@@ -63,19 +63,18 @@ namespace Artemis.Core.Services
// Find the matching plugin in the plugin folder
var match = pluginDirectory.EnumerateDirectories().FirstOrDefault(d => d.Name == subDirectory.Name);
if (match == null)
- {
CopyBuiltInPlugin(subDirectory);
- }
else
{
var metadataFile = Path.Combine(match.FullName, "plugin.json");
if (!File.Exists(metadataFile))
{
- _logger.Information("Copying missing built-in plugin {name} version: {version}",
+ _logger.Information("Copying missing built-in plugin {name} version: {version}",
builtInPluginInfo.Name, builtInPluginInfo.Version);
CopyBuiltInPlugin(subDirectory);
}
else
+ {
try
{
// Compare versions, copy if the same when debugging
@@ -83,7 +82,7 @@ namespace Artemis.Core.Services
#if DEBUG
if (builtInPluginInfo.Version >= pluginInfo.Version)
{
- _logger.Information("Copying updated built-in plugin {name} version: {version} (old version: {oldVersion})",
+ _logger.Information("Copying updated built-in plugin {name} version: {version} (old version: {oldVersion})",
builtInPluginInfo.Name, builtInPluginInfo.Version, pluginInfo.Version);
CopyBuiltInPlugin(subDirectory);
}
@@ -100,6 +99,7 @@ namespace Artemis.Core.Services
{
throw new ArtemisPluginException("Failed read plugin metadata needed to install built-in plugin", e);
}
+ }
}
}
}
@@ -128,10 +128,7 @@ namespace Artemis.Core.Services
{
// Load the metadata
var metadataFile = Path.Combine(subDirectory.FullName, "plugin.json");
- if (!File.Exists(metadataFile))
- {
- _logger.Warning(new ArtemisPluginException("Couldn't find the plugins metadata file at " + metadataFile), "Plugin exception");
- }
+ if (!File.Exists(metadataFile)) _logger.Warning(new ArtemisPluginException("Couldn't find the plugins metadata file at " + metadataFile), "Plugin exception");
// Locate the main entry
var pluginInfo = JsonConvert.DeserializeObject(File.ReadAllText(metadataFile));
diff --git a/src/Artemis.Core/Services/RgbService.cs b/src/Artemis.Core/Services/RgbService.cs
index b2571b360..da6095db0 100644
--- a/src/Artemis.Core/Services/RgbService.cs
+++ b/src/Artemis.Core/Services/RgbService.cs
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using Artemis.Core.Events;
using Artemis.Core.Plugins.Models;
using Artemis.Core.RGB.NET;
using Artemis.Core.Services.Interfaces;
-using Artemis.Core.Services.Storage;
using RGB.NET.Brushes;
using RGB.NET.Core;
using RGB.NET.Groups;
@@ -20,10 +18,10 @@ namespace Artemis.Core.Services
{
private readonly List _loadedDevices;
private readonly ILogger _logger;
- private readonly TimerUpdateTrigger _updateTrigger;
- private ListLedGroup _background;
private readonly PluginSetting _renderScaleSetting;
private readonly PluginSetting _targetFrameRateSetting;
+ private readonly TimerUpdateTrigger _updateTrigger;
+ private ListLedGroup _background;
internal RgbService(ILogger logger, ISettingsService settingsService)
{
@@ -40,7 +38,6 @@ namespace Artemis.Core.Services
_loadedDevices = new List();
_updateTrigger = new TimerUpdateTrigger {UpdateFrequency = 1.0 / _targetFrameRateSetting.Value};
Surface.RegisterUpdateTrigger(_updateTrigger);
-
}
///
@@ -68,9 +65,7 @@ namespace Artemis.Core.Services
OnDeviceLoaded(new DeviceEventArgs(surfaceDevice));
}
else
- {
OnDeviceReloaded(new DeviceEventArgs(surfaceDevice));
- }
}
}
@@ -91,7 +86,7 @@ namespace Artemis.Core.Services
{
_updateTrigger.UpdateFrequency = 1.0 / _targetFrameRateSetting.Value;
}
-
+
private void SurfaceOnException(ExceptionEventArgs args)
{
_logger.Warning("Surface threw e");
diff --git a/src/Artemis.Core/Services/Storage/SurfaceService.cs b/src/Artemis.Core/Services/Storage/SurfaceService.cs
index a6f2c38ca..f57a7764e 100644
--- a/src/Artemis.Core/Services/Storage/SurfaceService.cs
+++ b/src/Artemis.Core/Services/Storage/SurfaceService.cs
@@ -17,11 +17,11 @@ namespace Artemis.Core.Services.Storage
public class SurfaceService : ISurfaceService
{
private readonly ILogger _logger;
- private readonly IRgbService _rgbService;
private readonly IPluginService _pluginService;
+ private readonly PluginSetting _renderScaleSetting;
+ private readonly IRgbService _rgbService;
private readonly List _surfaceConfigurations;
private readonly ISurfaceRepository _surfaceRepository;
- private readonly PluginSetting _renderScaleSetting;
internal SurfaceService(ILogger logger, ISurfaceRepository surfaceRepository, IRgbService rgbService, IPluginService pluginService, ISettingsService settingsService)
{
@@ -128,27 +128,6 @@ namespace Artemis.Core.Services.Storage
}
}
- #region Event handlers
-
- private void RgbServiceOnDeviceLoaded(object sender, DeviceEventArgs e)
- {
- lock (_surfaceConfigurations)
- {
- foreach (var surfaceConfiguration in _surfaceConfigurations)
- AddDeviceIfMissing(e.Device, surfaceConfiguration);
- }
-
- UpdateSurfaceConfiguration(ActiveSurface, true);
- }
-
- private void RenderScaleSettingOnSettingChanged(object sender, EventArgs e)
- {
- foreach (var surfaceConfiguration in SurfaceConfigurations)
- surfaceConfiguration.UpdateScale(_renderScaleSetting.Value);
- }
-
- #endregion
-
#region Repository
private void LoadFromRepository()
@@ -225,6 +204,27 @@ namespace Artemis.Core.Services.Storage
#endregion
+ #region Event handlers
+
+ private void RgbServiceOnDeviceLoaded(object sender, DeviceEventArgs e)
+ {
+ lock (_surfaceConfigurations)
+ {
+ foreach (var surfaceConfiguration in _surfaceConfigurations)
+ AddDeviceIfMissing(e.Device, surfaceConfiguration);
+ }
+
+ UpdateSurfaceConfiguration(ActiveSurface, true);
+ }
+
+ private void RenderScaleSettingOnSettingChanged(object sender, EventArgs e)
+ {
+ foreach (var surfaceConfiguration in SurfaceConfigurations)
+ surfaceConfiguration.UpdateScale(_renderScaleSetting.Value);
+ }
+
+ #endregion
+
#region Events
public event EventHandler ActiveSurfaceConfigurationChanged;
diff --git a/src/Artemis.Core/app.config b/src/Artemis.Core/app.config
index 87be05efa..99b0b360c 100644
--- a/src/Artemis.Core/app.config
+++ b/src/Artemis.Core/app.config
@@ -1,4 +1,5 @@
+
@@ -27,7 +28,8 @@
-
+
@@ -51,7 +53,8 @@
-
+
@@ -67,7 +70,8 @@
-
+
@@ -83,7 +87,8 @@
-
+
@@ -91,7 +96,8 @@
-
+
@@ -107,4 +113,4 @@
-
+
\ No newline at end of file
diff --git a/src/Artemis.Core/packages.config b/src/Artemis.Core/packages.config
index 3f7e5162a..88478609d 100644
--- a/src/Artemis.Core/packages.config
+++ b/src/Artemis.Core/packages.config
@@ -1,4 +1,5 @@
+
diff --git a/src/Artemis.Plugins.Devices.Corsair/CorsairDevice.cs b/src/Artemis.Plugins.Devices.Corsair/CorsairDevice.cs
index 610b1233c..6635f8a88 100644
--- a/src/Artemis.Plugins.Devices.Corsair/CorsairDevice.cs
+++ b/src/Artemis.Plugins.Devices.Corsair/CorsairDevice.cs
@@ -1,5 +1,4 @@
using System.IO;
-using Artemis.Core.Extensions;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces;
@@ -25,7 +24,7 @@ namespace Artemis.Plugins.Devices.Corsair
CorsairDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "CUESDK.dll"));
_rgbService.AddDeviceProvider(DeviceProvider);
}
-
+
public override void DisablePlugin()
{
// TODO: Remove the device provider from the surface
diff --git a/src/Artemis.Plugins.Devices.Corsair/Properties/AssemblyInfo.cs b/src/Artemis.Plugins.Devices.Corsair/Properties/AssemblyInfo.cs
index 837eaee2f..e2749984a 100644
--- a/src/Artemis.Plugins.Devices.Corsair/Properties/AssemblyInfo.cs
+++ b/src/Artemis.Plugins.Devices.Corsair/Properties/AssemblyInfo.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -33,4 +32,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/src/Artemis.Plugins.Devices.Corsair/app.config b/src/Artemis.Plugins.Devices.Corsair/app.config
index eee083bd7..9a8f47c0a 100644
--- a/src/Artemis.Plugins.Devices.Corsair/app.config
+++ b/src/Artemis.Plugins.Devices.Corsair/app.config
@@ -1,4 +1,5 @@
+
@@ -15,7 +16,8 @@
-
+
diff --git a/src/Artemis.Plugins.Devices.Corsair/packages.config b/src/Artemis.Plugins.Devices.Corsair/packages.config
index fc1cee430..9ea274301 100644
--- a/src/Artemis.Plugins.Devices.Corsair/packages.config
+++ b/src/Artemis.Plugins.Devices.Corsair/packages.config
@@ -1,4 +1,5 @@
+
\ No newline at end of file
diff --git a/src/Artemis.Plugins.Devices.Corsair/plugin.json b/src/Artemis.Plugins.Devices.Corsair/plugin.json
index 82afc1e32..9846e0d1f 100644
--- a/src/Artemis.Plugins.Devices.Corsair/plugin.json
+++ b/src/Artemis.Plugins.Devices.Corsair/plugin.json
@@ -7,4 +7,4 @@
"Build": 0
},
"Main": "Artemis.Plugins.Devices.Corsair.dll"
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Plugins.Devices.Logitech/LogitechDevice.cs b/src/Artemis.Plugins.Devices.Logitech/LogitechDevice.cs
index 937bc5f13..c2411e8ed 100644
--- a/src/Artemis.Plugins.Devices.Logitech/LogitechDevice.cs
+++ b/src/Artemis.Plugins.Devices.Logitech/LogitechDevice.cs
@@ -1,6 +1,4 @@
-using System;
-using System.IO;
-using Artemis.Core.Extensions;
+using System.IO;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces;
@@ -25,7 +23,7 @@ namespace Artemis.Plugins.Devices.Logitech
LogitechDeviceProvider.PossibleX86NativePaths.Add(Path.Combine(PluginInfo.Directory.FullName, "x86", "LogitechLedEnginesWrapper.dll"));
_rgbService.AddDeviceProvider(DeviceProvider);
}
-
+
public override void DisablePlugin()
{
}
diff --git a/src/Artemis.Plugins.Devices.Logitech/Properties/AssemblyInfo.cs b/src/Artemis.Plugins.Devices.Logitech/Properties/AssemblyInfo.cs
index 79fac2002..a04c96540 100644
--- a/src/Artemis.Plugins.Devices.Logitech/Properties/AssemblyInfo.cs
+++ b/src/Artemis.Plugins.Devices.Logitech/Properties/AssemblyInfo.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -33,4 +32,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/src/Artemis.Plugins.Devices.Logitech/plugin.json b/src/Artemis.Plugins.Devices.Logitech/plugin.json
index 3777d2245..1ffd798fa 100644
--- a/src/Artemis.Plugins.Devices.Logitech/plugin.json
+++ b/src/Artemis.Plugins.Devices.Logitech/plugin.json
@@ -7,4 +7,4 @@
"Build": 0
},
"Main": "Artemis.Plugins.Devices.Logitech.dll"
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Plugins.LayerTypes.Brush/BrushLayerType.cs b/src/Artemis.Plugins.LayerTypes.Brush/BrushLayerType.cs
index 9b4d5d4dd..29e0409cd 100644
--- a/src/Artemis.Plugins.LayerTypes.Brush/BrushLayerType.cs
+++ b/src/Artemis.Plugins.LayerTypes.Brush/BrushLayerType.cs
@@ -4,7 +4,6 @@ using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Models;
using QRCoder;
-using RGB.NET.Core;
namespace Artemis.Plugins.LayerTypes.Brush
{
diff --git a/src/Artemis.Plugins.LayerTypes.Brush/app.config b/src/Artemis.Plugins.LayerTypes.Brush/app.config
index 718870ef0..c31f9a979 100644
--- a/src/Artemis.Plugins.LayerTypes.Brush/app.config
+++ b/src/Artemis.Plugins.LayerTypes.Brush/app.config
@@ -1,4 +1,5 @@
+
@@ -15,7 +16,8 @@
-
+
@@ -32,4 +34,7 @@
-
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.Plugins.LayerTypes.Brush/packages.config b/src/Artemis.Plugins.LayerTypes.Brush/packages.config
index 255a27498..1b85e127f 100644
--- a/src/Artemis.Plugins.LayerTypes.Brush/packages.config
+++ b/src/Artemis.Plugins.LayerTypes.Brush/packages.config
@@ -1,4 +1,5 @@
+
diff --git a/src/Artemis.Plugins.LayerTypes.Brush/plugin.json b/src/Artemis.Plugins.LayerTypes.Brush/plugin.json
index 5dfc20629..3f2ac043d 100644
--- a/src/Artemis.Plugins.LayerTypes.Brush/plugin.json
+++ b/src/Artemis.Plugins.LayerTypes.Brush/plugin.json
@@ -7,4 +7,4 @@
"Build": 0
},
"Main": "Artemis.Plugins.LayerTypes.Brush.dll"
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Plugins.Modules.General/GeneralDataModel.cs b/src/Artemis.Plugins.Modules.General/GeneralDataModel.cs
index fd990befb..c80f4d24d 100644
--- a/src/Artemis.Plugins.Modules.General/GeneralDataModel.cs
+++ b/src/Artemis.Plugins.Modules.General/GeneralDataModel.cs
@@ -1,6 +1,5 @@
using Artemis.Core.Attributes;
using Artemis.Core.Plugins.Abstract;
-using Artemis.Core.Plugins.Interfaces;
namespace Artemis.Plugins.Modules.General
{
diff --git a/src/Artemis.Plugins.Modules.General/ViewModels/GeneralViewModel.cs b/src/Artemis.Plugins.Modules.General/ViewModels/GeneralViewModel.cs
index 7ab14f005..7bf5365df 100644
--- a/src/Artemis.Plugins.Modules.General/ViewModels/GeneralViewModel.cs
+++ b/src/Artemis.Plugins.Modules.General/ViewModels/GeneralViewModel.cs
@@ -1,5 +1,4 @@
using Artemis.Core.Plugins.Abstract;
-using Artemis.Core.Plugins.Interfaces;
namespace Artemis.Plugins.Modules.General.ViewModels
{
diff --git a/src/Artemis.Plugins.Modules.General/app.config b/src/Artemis.Plugins.Modules.General/app.config
index 718870ef0..c31f9a979 100644
--- a/src/Artemis.Plugins.Modules.General/app.config
+++ b/src/Artemis.Plugins.Modules.General/app.config
@@ -1,4 +1,5 @@
+
@@ -15,7 +16,8 @@
-
+
@@ -32,4 +34,7 @@
-
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.Plugins.Modules.General/packages.config b/src/Artemis.Plugins.Modules.General/packages.config
index cddaad4d2..c5ec6307a 100644
--- a/src/Artemis.Plugins.Modules.General/packages.config
+++ b/src/Artemis.Plugins.Modules.General/packages.config
@@ -1,4 +1,5 @@
+
diff --git a/src/Artemis.Plugins.Modules.General/plugin.json b/src/Artemis.Plugins.Modules.General/plugin.json
index dc42f8911..bd33a88c6 100644
--- a/src/Artemis.Plugins.Modules.General/plugin.json
+++ b/src/Artemis.Plugins.Modules.General/plugin.json
@@ -7,4 +7,4 @@
"Build": 0
},
"Main": "Artemis.Plugins.Modules.General.dll"
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Storage/Entities/PluginSettingEntity.cs b/src/Artemis.Storage/Entities/PluginSettingEntity.cs
index 6f275bf8b..ba73fd031 100644
--- a/src/Artemis.Storage/Entities/PluginSettingEntity.cs
+++ b/src/Artemis.Storage/Entities/PluginSettingEntity.cs
@@ -1,5 +1,4 @@
using System;
-using System.ComponentModel.DataAnnotations;
namespace Artemis.Storage.Entities
{
@@ -7,7 +6,7 @@ namespace Artemis.Storage.Entities
{
public Guid PluginGuid { get; set; }
public string Name { get; set; }
-
+
public string Value { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Artemis.Storage/Migrations/20191028171528_InitialCreate.cs b/src/Artemis.Storage/Migrations/20191028171528_InitialCreate.cs
index de5f437a8..65f4611a1 100644
--- a/src/Artemis.Storage/Migrations/20191028171528_InitialCreate.cs
+++ b/src/Artemis.Storage/Migrations/20191028171528_InitialCreate.cs
@@ -8,11 +8,11 @@ namespace Artemis.Storage.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
- name: "Folders",
- columns: table => new
+ "Folders",
+ table => new
{
- Guid = table.Column(nullable: false),
- Order = table.Column(nullable: false),
+ Guid = table.Column(),
+ Order = table.Column(),
Name = table.Column(nullable: true),
FolderEntityGuid = table.Column(nullable: true)
},
@@ -20,57 +20,48 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Folders", x => x.Guid);
table.ForeignKey(
- name: "FK_Folders_Folders_FolderEntityGuid",
- column: x => x.FolderEntityGuid,
- principalTable: "Folders",
- principalColumn: "Guid",
+ "FK_Folders_Folders_FolderEntityGuid",
+ x => x.FolderEntityGuid,
+ "Folders",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "PluginSettings",
- columns: table => new
+ "PluginSettings",
+ table => new
{
- PluginGuid = table.Column(nullable: false),
- Name = table.Column(nullable: false),
+ PluginGuid = table.Column(),
+ Name = table.Column(),
Value = table.Column(nullable: true)
},
- constraints: table =>
- {
- table.PrimaryKey("PK_PluginSettings", x => new { x.Name, x.PluginGuid });
- });
+ constraints: table => { table.PrimaryKey("PK_PluginSettings", x => new {x.Name, x.PluginGuid}); });
migrationBuilder.CreateTable(
- name: "Settings",
- columns: table => new
+ "Settings",
+ table => new
{
- Name = table.Column(nullable: false),
+ Name = table.Column(),
Value = table.Column(nullable: true)
},
- constraints: table =>
- {
- table.PrimaryKey("PK_Settings", x => x.Name);
- });
+ constraints: table => { table.PrimaryKey("PK_Settings", x => x.Name); });
migrationBuilder.CreateTable(
- name: "Surfaces",
- columns: table => new
+ "Surfaces",
+ table => new
{
- Guid = table.Column(nullable: false),
+ Guid = table.Column(),
Name = table.Column(nullable: true),
- IsActive = table.Column(nullable: false)
+ IsActive = table.Column()
},
- constraints: table =>
- {
- table.PrimaryKey("PK_Surfaces", x => x.Guid);
- });
+ constraints: table => { table.PrimaryKey("PK_Surfaces", x => x.Guid); });
migrationBuilder.CreateTable(
- name: "Layers",
- columns: table => new
+ "Layers",
+ table => new
{
- Guid = table.Column(nullable: false),
- Order = table.Column(nullable: false),
+ Guid = table.Column(),
+ Order = table.Column(),
Name = table.Column(nullable: true),
FolderEntityGuid = table.Column(nullable: true)
},
@@ -78,62 +69,62 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Layers", x => x.Guid);
table.ForeignKey(
- name: "FK_Layers_Folders_FolderEntityGuid",
- column: x => x.FolderEntityGuid,
- principalTable: "Folders",
- principalColumn: "Guid",
+ "FK_Layers_Folders_FolderEntityGuid",
+ x => x.FolderEntityGuid,
+ "Folders",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "Profiles",
- columns: table => new
+ "Profiles",
+ table => new
{
- Guid = table.Column(nullable: false),
- PluginGuid = table.Column(nullable: false),
+ Guid = table.Column(),
+ PluginGuid = table.Column(),
Name = table.Column(nullable: true),
- RootFolderId = table.Column(nullable: false),
+ RootFolderId = table.Column(),
RootFolderGuid = table.Column(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Profiles", x => x.Guid);
table.ForeignKey(
- name: "FK_Profiles_Folders_RootFolderGuid",
- column: x => x.RootFolderGuid,
- principalTable: "Folders",
- principalColumn: "Guid",
+ "FK_Profiles_Folders_RootFolderGuid",
+ x => x.RootFolderGuid,
+ "Folders",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "DeviceEntity",
- columns: table => new
+ "DeviceEntity",
+ table => new
{
- Guid = table.Column(nullable: false),
- DeviceHashCode = table.Column(nullable: false),
- X = table.Column(nullable: false),
- Y = table.Column(nullable: false),
- Rotation = table.Column(nullable: false),
- ZIndex = table.Column(nullable: false),
+ Guid = table.Column(),
+ DeviceHashCode = table.Column(),
+ X = table.Column(),
+ Y = table.Column(),
+ Rotation = table.Column(),
+ ZIndex = table.Column(),
SurfaceId = table.Column(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DeviceEntity", x => x.Guid);
table.ForeignKey(
- name: "FK_DeviceEntity_Surfaces_SurfaceId",
- column: x => x.SurfaceId,
- principalTable: "Surfaces",
- principalColumn: "Guid",
+ "FK_DeviceEntity_Surfaces_SurfaceId",
+ x => x.SurfaceId,
+ "Surfaces",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "LayerSettings",
- columns: table => new
+ "LayerSettings",
+ table => new
{
- Guid = table.Column(nullable: false),
+ Guid = table.Column(),
Name = table.Column(nullable: true),
Value = table.Column(nullable: true),
LayerEntityGuid = table.Column(nullable: true)
@@ -142,18 +133,18 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_LayerSettings", x => x.Guid);
table.ForeignKey(
- name: "FK_LayerSettings_Layers_LayerEntityGuid",
- column: x => x.LayerEntityGuid,
- principalTable: "Layers",
- principalColumn: "Guid",
+ "FK_LayerSettings_Layers_LayerEntityGuid",
+ x => x.LayerEntityGuid,
+ "Layers",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "Leds",
- columns: table => new
+ "Leds",
+ table => new
{
- Guid = table.Column(nullable: false),
+ Guid = table.Column(),
LedName = table.Column(nullable: true),
LimitedToDevice = table.Column(nullable: true),
LayerId = table.Column(nullable: true)
@@ -162,19 +153,19 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Leds", x => x.Guid);
table.ForeignKey(
- name: "FK_Leds_Layers_LayerId",
- column: x => x.LayerId,
- principalTable: "Layers",
- principalColumn: "Guid",
+ "FK_Leds_Layers_LayerId",
+ x => x.LayerId,
+ "Layers",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "Keypoints",
- columns: table => new
+ "Keypoints",
+ table => new
{
- Guid = table.Column(nullable: false),
- Time = table.Column(nullable: false),
+ Guid = table.Column(),
+ Time = table.Column(),
Value = table.Column(nullable: true),
LayerSettingEntityGuid = table.Column(nullable: true)
},
@@ -182,80 +173,80 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Keypoints", x => x.Guid);
table.ForeignKey(
- name: "FK_Keypoints_LayerSettings_LayerSettingEntityGuid",
- column: x => x.LayerSettingEntityGuid,
- principalTable: "LayerSettings",
- principalColumn: "Guid",
+ "FK_Keypoints_LayerSettings_LayerSettingEntityGuid",
+ x => x.LayerSettingEntityGuid,
+ "LayerSettings",
+ "Guid",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
- name: "IX_DeviceEntity_SurfaceId",
- table: "DeviceEntity",
- column: "SurfaceId");
+ "IX_DeviceEntity_SurfaceId",
+ "DeviceEntity",
+ "SurfaceId");
migrationBuilder.CreateIndex(
- name: "IX_Folders_FolderEntityGuid",
- table: "Folders",
- column: "FolderEntityGuid");
+ "IX_Folders_FolderEntityGuid",
+ "Folders",
+ "FolderEntityGuid");
migrationBuilder.CreateIndex(
- name: "IX_Keypoints_LayerSettingEntityGuid",
- table: "Keypoints",
- column: "LayerSettingEntityGuid");
+ "IX_Keypoints_LayerSettingEntityGuid",
+ "Keypoints",
+ "LayerSettingEntityGuid");
migrationBuilder.CreateIndex(
- name: "IX_Layers_FolderEntityGuid",
- table: "Layers",
- column: "FolderEntityGuid");
+ "IX_Layers_FolderEntityGuid",
+ "Layers",
+ "FolderEntityGuid");
migrationBuilder.CreateIndex(
- name: "IX_LayerSettings_LayerEntityGuid",
- table: "LayerSettings",
- column: "LayerEntityGuid");
+ "IX_LayerSettings_LayerEntityGuid",
+ "LayerSettings",
+ "LayerEntityGuid");
migrationBuilder.CreateIndex(
- name: "IX_Leds_LayerId",
- table: "Leds",
- column: "LayerId");
+ "IX_Leds_LayerId",
+ "Leds",
+ "LayerId");
migrationBuilder.CreateIndex(
- name: "IX_Profiles_RootFolderGuid",
- table: "Profiles",
- column: "RootFolderGuid");
+ "IX_Profiles_RootFolderGuid",
+ "Profiles",
+ "RootFolderGuid");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
- name: "DeviceEntity");
+ "DeviceEntity");
migrationBuilder.DropTable(
- name: "Keypoints");
+ "Keypoints");
migrationBuilder.DropTable(
- name: "Leds");
+ "Leds");
migrationBuilder.DropTable(
- name: "PluginSettings");
+ "PluginSettings");
migrationBuilder.DropTable(
- name: "Profiles");
+ "Profiles");
migrationBuilder.DropTable(
- name: "Settings");
+ "Settings");
migrationBuilder.DropTable(
- name: "Surfaces");
+ "Surfaces");
migrationBuilder.DropTable(
- name: "LayerSettings");
+ "LayerSettings");
migrationBuilder.DropTable(
- name: "Layers");
+ "Layers");
migrationBuilder.DropTable(
- name: "Folders");
+ "Folders");
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Storage/Migrations/StorageContextModelSnapshot.cs b/src/Artemis.Storage/Migrations/StorageContextModelSnapshot.cs
index fbba2e694..e41900c32 100644
--- a/src/Artemis.Storage/Migrations/StorageContextModelSnapshot.cs
+++ b/src/Artemis.Storage/Migrations/StorageContextModelSnapshot.cs
@@ -1,14 +1,13 @@
//
+
using System;
-using Artemis.Storage;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Artemis.Storage.Migrations
{
[DbContext(typeof(StorageContext))]
- partial class StorageContextModelSnapshot : ModelSnapshot
+ internal class StorageContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@@ -17,227 +16,227 @@ namespace Artemis.Storage.Migrations
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062");
modelBuilder.Entity("Artemis.Storage.Entities.DeviceEntity", b =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("DeviceHashCode");
+ b.Property("DeviceHashCode");
- b.Property("Rotation");
+ b.Property("Rotation");
- b.Property("SurfaceId");
+ b.Property("SurfaceId");
- b.Property("X");
+ b.Property("X");
- b.Property("Y");
+ b.Property("Y");
- b.Property("ZIndex");
+ b.Property("ZIndex");
- b.HasKey("Guid");
+ b.HasKey("Guid");
- b.HasIndex("SurfaceId");
+ b.HasIndex("SurfaceId");
- b.ToTable("DeviceEntity");
- });
+ b.ToTable("DeviceEntity");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("FolderEntityGuid");
+ b.Property("FolderEntityGuid");
- b.Property("Name");
+ b.Property("Name");
- b.Property("Order");
+ b.Property("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 =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("LayerSettingEntityGuid");
+ b.Property("LayerSettingEntityGuid");
- b.Property("Time");
+ b.Property("Time");
- b.Property("Value");
+ b.Property("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 =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("FolderEntityGuid");
+ b.Property("FolderEntityGuid");
- b.Property("Name");
+ b.Property("Name");
- b.Property("Order");
+ b.Property("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 =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("LayerEntityGuid");
+ b.Property("LayerEntityGuid");
- b.Property("Name");
+ b.Property("Name");
- b.Property("Value");
+ b.Property("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 =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("LayerId");
+ b.Property("LayerId");
- b.Property("LedName");
+ b.Property("LedName");
- b.Property("LimitedToDevice");
+ b.Property("LimitedToDevice");
- b.HasKey("Guid");
+ b.HasKey("Guid");
- b.HasIndex("LayerId");
+ b.HasIndex("LayerId");
- b.ToTable("Leds");
- });
+ b.ToTable("Leds");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.PluginSettingEntity", b =>
- {
- b.Property("Name");
+ {
+ b.Property("Name");
- b.Property("PluginGuid");
+ b.Property("PluginGuid");
- b.Property("Value");
+ b.Property("Value");
- b.HasKey("Name", "PluginGuid");
+ b.HasKey("Name", "PluginGuid");
- b.ToTable("PluginSettings");
- });
+ b.ToTable("PluginSettings");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("Name");
+ b.Property("Name");
- b.Property("PluginGuid");
+ b.Property("PluginGuid");
- b.Property("RootFolderGuid");
+ b.Property("RootFolderGuid");
- b.Property("RootFolderId");
+ b.Property("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 =>
- {
- b.Property("Name")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Name")
+ .ValueGeneratedOnAdd();
- b.Property("Value");
+ b.Property("Value");
- b.HasKey("Name");
+ b.HasKey("Name");
- b.ToTable("Settings");
- });
+ b.ToTable("Settings");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.SurfaceEntity", b =>
- {
- b.Property("Guid")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Guid")
+ .ValueGeneratedOnAdd();
- b.Property("IsActive");
+ b.Property("IsActive");
- b.Property("Name");
+ b.Property("Name");
- b.HasKey("Guid");
+ b.HasKey("Guid");
- b.ToTable("Surfaces");
- });
+ b.ToTable("Surfaces");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.DeviceEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.SurfaceEntity", "Surface")
- .WithMany("DeviceEntities")
- .HasForeignKey("SurfaceId");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.SurfaceEntity", "Surface")
+ .WithMany("DeviceEntities")
+ .HasForeignKey("SurfaceId");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.FolderEntity")
- .WithMany("Folders")
- .HasForeignKey("FolderEntityGuid");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.FolderEntity")
+ .WithMany("Folders")
+ .HasForeignKey("FolderEntityGuid");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
- .WithMany("Keypoints")
- .HasForeignKey("LayerSettingEntityGuid");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
+ .WithMany("Keypoints")
+ .HasForeignKey("LayerSettingEntityGuid");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.FolderEntity")
- .WithMany("Layers")
- .HasForeignKey("FolderEntityGuid");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.FolderEntity")
+ .WithMany("Layers")
+ .HasForeignKey("FolderEntityGuid");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.LayerEntity")
- .WithMany("Settings")
- .HasForeignKey("LayerEntityGuid");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.LayerEntity")
+ .WithMany("Settings")
+ .HasForeignKey("LayerEntityGuid");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
- .WithMany("Leds")
- .HasForeignKey("LayerId");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
+ .WithMany("Leds")
+ .HasForeignKey("LayerId");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
- .WithMany()
- .HasForeignKey("RootFolderGuid");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
+ .WithMany()
+ .HasForeignKey("RootFolderGuid");
+ });
#pragma warning restore 612, 618
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Storage/Repositories/SurfaceRepository.cs b/src/Artemis.Storage/Repositories/SurfaceRepository.cs
index cfd8f3a98..2aa8a3ebc 100644
--- a/src/Artemis.Storage/Repositories/SurfaceRepository.cs
+++ b/src/Artemis.Storage/Repositories/SurfaceRepository.cs
@@ -46,7 +46,7 @@ namespace Artemis.Storage.Repositories
{
return await _dbContext.Surfaces.Include(s => s.DeviceEntities).ToListAsync();
}
-
+
public void Save()
{
_dbContext.SaveChanges();
diff --git a/src/Artemis.UI/App.config b/src/Artemis.UI/App.config
index 4f6c695cc..26bb25a66 100644
--- a/src/Artemis.UI/App.config
+++ b/src/Artemis.UI/App.config
@@ -1,4 +1,5 @@
+
@@ -30,7 +31,8 @@
-
+
@@ -54,7 +56,8 @@
-
+
@@ -70,7 +73,8 @@
-
+
@@ -86,7 +90,8 @@
-
+
@@ -94,7 +99,8 @@
-
+
@@ -107,4 +113,4 @@
-
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Converters/NullToVisibilityConverter.cs b/src/Artemis.UI/Converters/NullToVisibilityConverter.cs
index 9b40824a9..60eebe97c 100644
--- a/src/Artemis.UI/Converters/NullToVisibilityConverter.cs
+++ b/src/Artemis.UI/Converters/NullToVisibilityConverter.cs
@@ -7,12 +7,6 @@ namespace Artemis.UI.Converters
{
public class NullToVisibilityConverter : IValueConverter
{
- private enum Parameters
- {
- Normal,
- Inverted
- }
-
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var direction = (Parameters) Enum.Parse(typeof(Parameters), (string) parameter ?? throw new InvalidOperationException());
@@ -22,6 +16,7 @@ namespace Artemis.UI.Converters
return Visibility.Hidden;
return Visibility.Visible;
}
+
if (value == null)
return Visibility.Visible;
return Visibility.Hidden;
@@ -31,5 +26,11 @@ namespace Artemis.UI.Converters
{
throw new NotImplementedException();
}
+
+ private enum Parameters
+ {
+ Normal,
+ Inverted
+ }
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Extensions/RgbColorExtensions.cs b/src/Artemis.UI/Extensions/RgbColorExtensions.cs
index ef4ea741d..10891abad 100644
--- a/src/Artemis.UI/Extensions/RgbColorExtensions.cs
+++ b/src/Artemis.UI/Extensions/RgbColorExtensions.cs
@@ -1,5 +1,4 @@
-using System;
-using RGB.NET.Core;
+using RGB.NET.Core;
using Color = System.Windows.Media.Color;
namespace Artemis.UI.Extensions
diff --git a/src/Artemis.UI/Extensions/RgbRectangleExtensions.cs b/src/Artemis.UI/Extensions/RgbRectangleExtensions.cs
index 83ef976a9..7d2443a91 100644
--- a/src/Artemis.UI/Extensions/RgbRectangleExtensions.cs
+++ b/src/Artemis.UI/Extensions/RgbRectangleExtensions.cs
@@ -1,17 +1,12 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using RGB.NET.Core;
+using System.Drawing;
namespace Artemis.UI.Extensions
{
public static class RgbRectangleExtensions
{
- public static System.Drawing.Rectangle ToDrawingRectangle(this Rectangle rectangle)
+ public static Rectangle ToDrawingRectangle(this RGB.NET.Core.Rectangle rectangle)
{
- return new System.Drawing.Rectangle((int) rectangle.X, (int) rectangle.Y, (int) rectangle.Width, (int) rectangle.Height);
+ return new Rectangle((int) rectangle.X, (int) rectangle.Y, (int) rectangle.Width, (int) rectangle.Height);
}
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Ninject/UiModule.cs b/src/Artemis.UI/Ninject/UiModule.cs
index a4c5d340e..6ff3209b5 100644
--- a/src/Artemis.UI/Ninject/UiModule.cs
+++ b/src/Artemis.UI/Ninject/UiModule.cs
@@ -37,7 +37,7 @@ namespace Artemis.UI.Ninject
// Bind the module VM
Bind().ToFactory();
Bind().ToFactory();
-
+
// Bind all UI services as singletons
Kernel.Bind(x =>
{
diff --git a/src/Artemis.UI/Properties/AssemblyInfo.cs b/src/Artemis.UI/Properties/AssemblyInfo.cs
index 11226bcc8..bd367b9b2 100644
--- a/src/Artemis.UI/Properties/AssemblyInfo.cs
+++ b/src/Artemis.UI/Properties/AssemblyInfo.cs
@@ -1,5 +1,5 @@
-using System.Resources;
-using System.Reflection;
+using System.Reflection;
+using System.Resources;
using System.Runtime.InteropServices;
using System.Windows;
@@ -52,5 +52,4 @@ using System.Windows;
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
-[assembly: NeutralResourcesLanguage("en-US")]
-
+[assembly: NeutralResourcesLanguage("en-US")]
\ No newline at end of file
diff --git a/src/Artemis.UI/Services/DialogService.cs b/src/Artemis.UI/Services/DialogService.cs
index 98fcdd252..bfaa6b234 100644
--- a/src/Artemis.UI/Services/DialogService.cs
+++ b/src/Artemis.UI/Services/DialogService.cs
@@ -26,10 +26,10 @@ namespace Artemis.UI.Services
new ConstructorArgument("header", header),
new ConstructorArgument("text", text),
new ConstructorArgument("confirmText", confirmText),
- new ConstructorArgument("cancelText", cancelText),
+ new ConstructorArgument("cancelText", cancelText)
};
var result = await ShowDialog(arguments);
- return (bool)result;
+ return (bool) result;
}
public async Task ShowConfirmDialogAt(string identifier, string header, string text, string confirmText = "Confirm", string cancelText = "Cancel")
@@ -39,7 +39,7 @@ namespace Artemis.UI.Services
new ConstructorArgument("header", header),
new ConstructorArgument("text", text),
new ConstructorArgument("confirmText", confirmText),
- new ConstructorArgument("cancelText", cancelText),
+ new ConstructorArgument("cancelText", cancelText)
};
var result = await ShowDialogAt(identifier, arguments);
return (bool) result;
diff --git a/src/Artemis.UI/ViewModels/Controls/ProfileEditor/ProfileEditorViewModel.cs b/src/Artemis.UI/ViewModels/Controls/ProfileEditor/ProfileEditorViewModel.cs
index 87140a3ab..19b6bb2aa 100644
--- a/src/Artemis.UI/ViewModels/Controls/ProfileEditor/ProfileEditorViewModel.cs
+++ b/src/Artemis.UI/ViewModels/Controls/ProfileEditor/ProfileEditorViewModel.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Timers;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
@@ -9,7 +8,6 @@ using Artemis.Core.Events;
using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Services;
-using Artemis.Core.Services.Interfaces;
using Artemis.Core.Services.Storage;
using Artemis.UI.ViewModels.Screens;
using Artemis.UI.ViewModels.Utilities;
@@ -21,7 +19,7 @@ namespace Artemis.UI.ViewModels.Controls.ProfileEditor
{
public class ProfileEditorViewModel : ModuleViewModel
{
- private TimerUpdateTrigger _updateTrigger;
+ private readonly TimerUpdateTrigger _updateTrigger;
public ProfileEditorViewModel(Module module, ISurfaceService surfaceService, ISettingsService settingsService) : base(module, "Profile Editor")
{
@@ -37,7 +35,7 @@ namespace Artemis.UI.ViewModels.Controls.ProfileEditor
// Borrow RGB.NET's update trigger, update up to 25 FPS, ignore higher settings than that
var targetFps = Math.Min(settingsService.GetSetting("TargetFrameRate", 25).Value, 25);
- _updateTrigger = new TimerUpdateTrigger {UpdateFrequency = 1.0 / targetFps };
+ _updateTrigger = new TimerUpdateTrigger {UpdateFrequency = 1.0 / targetFps};
_updateTrigger.Update += UpdateLeds;
_updateTrigger.Start();
diff --git a/src/Artemis.UI/ViewModels/Controls/SurfaceEditor/SurfaceLedViewModel.cs b/src/Artemis.UI/ViewModels/Controls/SurfaceEditor/SurfaceLedViewModel.cs
index 276108e7e..d60a333de 100644
--- a/src/Artemis.UI/ViewModels/Controls/SurfaceEditor/SurfaceLedViewModel.cs
+++ b/src/Artemis.UI/ViewModels/Controls/SurfaceEditor/SurfaceLedViewModel.cs
@@ -11,6 +11,13 @@ namespace Artemis.UI.ViewModels.Controls.SurfaceEditor
ApplyLedToViewModel();
}
+ public Led Led { get; set; }
+
+ public double X { get; set; }
+ public double Y { get; set; }
+ public double Width { get; set; }
+ public double Height { get; set; }
+
public void ApplyLedToViewModel()
{
X = Led.LedRectangle.X;
@@ -18,12 +25,5 @@ namespace Artemis.UI.ViewModels.Controls.SurfaceEditor
Width = Led.LedRectangle.Width;
Height = Led.LedRectangle.Height;
}
-
- public Led Led { get; set; }
-
- public double X { get; set; }
- public double Y { get; set; }
- public double Width { get; set; }
- public double Height { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/ViewModels/Screens/DebugViewModel.cs b/src/Artemis.UI/ViewModels/Screens/DebugViewModel.cs
index 4b343bc0d..6c313ee88 100644
--- a/src/Artemis.UI/ViewModels/Screens/DebugViewModel.cs
+++ b/src/Artemis.UI/ViewModels/Screens/DebugViewModel.cs
@@ -29,6 +29,8 @@ namespace Artemis.UI.ViewModels.Screens
public ImageSource CurrentFrame { get; set; }
public double CurrentFps { get; set; }
+ public string Title => "Debugger";
+
public void ForceGarbageCollection()
{
GC.Collect();
@@ -42,10 +44,7 @@ namespace Artemis.UI.ViewModels.Screens
var imageSource = ImageSourceFromBitmap(e.Bitmap);
imageSource.Freeze();
- Execute.OnUIThread(() =>
- {
- CurrentFrame = imageSource;
- });
+ Execute.OnUIThread(() => { CurrentFrame = imageSource; });
}
private void CoreServiceOnFrameRendering(object sender, FrameRenderingEventArgs e)
@@ -72,12 +71,10 @@ namespace Artemis.UI.ViewModels.Screens
{
DeleteObject(handle);
}
- }
+ }
[DllImport("gdi32.dll", EntryPoint = "DeleteObject")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool DeleteObject([In] IntPtr hObject);
-
- public string Title => "Debugger";
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/ViewModels/Screens/RootViewModel.cs b/src/Artemis.UI/ViewModels/Screens/RootViewModel.cs
index 84eb92176..14533c95c 100644
--- a/src/Artemis.UI/ViewModels/Screens/RootViewModel.cs
+++ b/src/Artemis.UI/ViewModels/Screens/RootViewModel.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
using Artemis.Core.Events;
@@ -16,8 +15,8 @@ namespace Artemis.UI.ViewModels.Screens
public class RootViewModel : Conductor.Collection.OneActive
{
private readonly ICollection _artemisViewModels;
- private readonly IPluginService _pluginService;
private readonly IModuleViewModelFactory _moduleViewModelFactory;
+ private readonly IPluginService _pluginService;
public RootViewModel(ICollection artemisViewModels, IPluginService pluginService, IModuleViewModelFactory moduleViewModelFactory)
{
diff --git a/src/Artemis.UI/ViewModels/Utilities/DialogViewModelHost.cs b/src/Artemis.UI/ViewModels/Utilities/DialogViewModelHost.cs
index 7ecb10f0f..32b596060 100644
--- a/src/Artemis.UI/ViewModels/Utilities/DialogViewModelHost.cs
+++ b/src/Artemis.UI/ViewModels/Utilities/DialogViewModelHost.cs
@@ -12,6 +12,7 @@ namespace Artemis.UI.ViewModels.Utilities
{
_viewManager = viewManager;
}
+
public DialogViewModelBase ActiveDialogViewModel { get; set; }
public bool IsOpen { get; set; }
diff --git a/src/Artemis.UI/ViewModels/Utilities/PanZoomViewModel.cs b/src/Artemis.UI/ViewModels/Utilities/PanZoomViewModel.cs
index 77673dc9c..287306524 100644
--- a/src/Artemis.UI/ViewModels/Utilities/PanZoomViewModel.cs
+++ b/src/Artemis.UI/ViewModels/Utilities/PanZoomViewModel.cs
@@ -59,7 +59,7 @@ namespace Artemis.UI.ViewModels.Utilities
PanX = Math.Min(0, PanX - delta.Value.X);
PanY = Math.Min(0, PanY - delta.Value.Y);
-
+
_lastPanPosition = position;
}
diff --git a/src/Artemis.UI/Views/Controls/Settings/DeviceSettingsView.xaml b/src/Artemis.UI/Views/Controls/Settings/DeviceSettingsView.xaml
index 8d9559d0c..fe59752d1 100644
--- a/src/Artemis.UI/Views/Controls/Settings/DeviceSettingsView.xaml
+++ b/src/Artemis.UI/Views/Controls/Settings/DeviceSettingsView.xaml
@@ -12,9 +12,12 @@
-
-
-
+
+
+
@@ -26,7 +29,8 @@
-
+