diff --git a/src/Artemis.Core/Attributes/DataModelProperty.cs b/src/Artemis.Core/Attributes/DataModelProperty.cs
index 34ac933a2..2135665d0 100644
--- a/src/Artemis.Core/Attributes/DataModelProperty.cs
+++ b/src/Artemis.Core/Attributes/DataModelProperty.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Artemis.Core.Attributes
{
@@ -10,4 +6,4 @@ namespace Artemis.Core.Attributes
{
public string DisplayName { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Core/Models/DataModelDescription.cs b/src/Artemis.Core/Models/DataModelDescription.cs
index 34794fc4f..c7d950777 100644
--- a/src/Artemis.Core/Models/DataModelDescription.cs
+++ b/src/Artemis.Core/Models/DataModelDescription.cs
@@ -1,12 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Artemis.Core.Models
+namespace Artemis.Core.Models
{
public class DataModelDescription
{
}
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.Core/Ninject/CoreModule.cs b/src/Artemis.Core/Ninject/CoreModule.cs
index 09c579f60..6b1c062c2 100644
--- a/src/Artemis.Core/Ninject/CoreModule.cs
+++ b/src/Artemis.Core/Ninject/CoreModule.cs
@@ -1,9 +1,4 @@
-using System.Linq;
-using System.Reflection;
-using Artemis.Core.Services.Interfaces;
-using Artemis.Plugins.Interfaces;
-using Artemis.Plugins.Models;
-using Newtonsoft.Json;
+using Artemis.Core.Services.Interfaces;
using Ninject.Extensions.Conventions;
using Ninject.Modules;
diff --git a/src/Artemis.Core/Services/CoreService.cs b/src/Artemis.Core/Services/CoreService.cs
index 42de5fab1..7c33b412c 100644
--- a/src/Artemis.Core/Services/CoreService.cs
+++ b/src/Artemis.Core/Services/CoreService.cs
@@ -10,8 +10,8 @@ namespace Artemis.Core.Services
{
public class CoreService : ICoreService
{
- private readonly IRgbService _rgbService;
private readonly IPluginService _pluginService;
+ private readonly IRgbService _rgbService;
public CoreService(IPluginService pluginService, IRgbService rgbService)
{
@@ -38,7 +38,7 @@ namespace Artemis.Core.Services
// Initialize the services
await _pluginService.LoadPlugins();
await _rgbService.LoadDevices();
-
+
OnInitialized();
}
diff --git a/src/Artemis.Core/Services/RgbService.cs b/src/Artemis.Core/Services/RgbService.cs
index 0b420f2ac..ed59aebb5 100644
--- a/src/Artemis.Core/Services/RgbService.cs
+++ b/src/Artemis.Core/Services/RgbService.cs
@@ -1,19 +1,14 @@
using System;
-using System.Linq;
using System.Threading.Tasks;
using Artemis.Core.Events;
using Artemis.Core.Services.Interfaces;
-using RGB.NET.Brushes;
using RGB.NET.Core;
-using RGB.NET.Devices.Asus;
using RGB.NET.Devices.CoolerMaster;
using RGB.NET.Devices.Corsair;
using RGB.NET.Devices.DMX;
using RGB.NET.Devices.Logitech;
-using RGB.NET.Devices.Msi;
using RGB.NET.Devices.Novation;
using RGB.NET.Devices.Razer;
-using RGB.NET.Groups;
namespace Artemis.Core.Services
{
diff --git a/src/Artemis.Core/app.config b/src/Artemis.Core/app.config
index 9153e89c8..dd61acf51 100644
--- a/src/Artemis.Core/app.config
+++ b/src/Artemis.Core/app.config
@@ -28,7 +28,8 @@
-
+
@@ -52,7 +53,8 @@
-
+
diff --git a/src/Artemis.Core/packages.config b/src/Artemis.Core/packages.config
index 04fdc42e2..28b222ef4 100644
--- a/src/Artemis.Core/packages.config
+++ b/src/Artemis.Core/packages.config
@@ -1,4 +1,5 @@
+
diff --git a/src/Artemis.Plugins.BuiltIn/Modules/General/GeneralDataModel.cs b/src/Artemis.Plugins.BuiltIn/Modules/General/GeneralDataModel.cs
index d44ed99af..b619f8864 100644
--- a/src/Artemis.Plugins.BuiltIn/Modules/General/GeneralDataModel.cs
+++ b/src/Artemis.Plugins.BuiltIn/Modules/General/GeneralDataModel.cs
@@ -1,5 +1,4 @@
-using System;
-using Artemis.Core.Attributes;
+using Artemis.Core.Attributes;
using Artemis.Plugins.Interfaces;
namespace Artemis.Plugins.BuiltIn.Modules.General
diff --git a/src/Artemis.Plugins.BuiltIn/Properties/AssemblyInfo.cs b/src/Artemis.Plugins.BuiltIn/Properties/AssemblyInfo.cs
index 6081c8fac..1cceb3def 100644
--- a/src/Artemis.Plugins.BuiltIn/Properties/AssemblyInfo.cs
+++ b/src/Artemis.Plugins.BuiltIn/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.BuiltIn/app.config b/src/Artemis.Plugins.BuiltIn/app.config
index 6f8378fea..5b3e7dfff 100644
--- a/src/Artemis.Plugins.BuiltIn/app.config
+++ b/src/Artemis.Plugins.BuiltIn/app.config
@@ -1,4 +1,5 @@
+
@@ -15,7 +16,8 @@
-
+
@@ -59,7 +61,8 @@
-
+
diff --git a/src/Artemis.Plugins.BuiltIn/packages.config b/src/Artemis.Plugins.BuiltIn/packages.config
index c44ec7607..79b339dec 100644
--- a/src/Artemis.Plugins.BuiltIn/packages.config
+++ b/src/Artemis.Plugins.BuiltIn/packages.config
@@ -1,4 +1,5 @@
+
\ No newline at end of file
diff --git a/src/Artemis.Plugins/Interfaces/IModule.cs b/src/Artemis.Plugins/Interfaces/IModule.cs
index 7b4899ca0..ac96898c3 100644
--- a/src/Artemis.Plugins/Interfaces/IModule.cs
+++ b/src/Artemis.Plugins/Interfaces/IModule.cs
@@ -1,5 +1,4 @@
using System;
-using Ninject;
namespace Artemis.Plugins.Interfaces
{
@@ -19,7 +18,7 @@ namespace Artemis.Plugins.Interfaces
/// accessed by profiles in this module
///
bool ExpandsMainDataModel { get; }
-
+
///
/// Called each frame when the module must update
///
diff --git a/src/Artemis.Plugins/Interfaces/IModuleDataModel.cs b/src/Artemis.Plugins/Interfaces/IModuleDataModel.cs
index 7f069887e..534d5b9f2 100644
--- a/src/Artemis.Plugins/Interfaces/IModuleDataModel.cs
+++ b/src/Artemis.Plugins/Interfaces/IModuleDataModel.cs
@@ -2,6 +2,5 @@
{
public interface IModuleDataModel
{
-
}
}
\ No newline at end of file
diff --git a/src/Artemis.Plugins/app.config b/src/Artemis.Plugins/app.config
index 00fa1b520..5c210d0c2 100644
--- a/src/Artemis.Plugins/app.config
+++ b/src/Artemis.Plugins/app.config
@@ -1,4 +1,5 @@
+
@@ -19,7 +20,8 @@
-
+
@@ -43,7 +45,8 @@
-
+
diff --git a/src/Artemis.Plugins/packages.config b/src/Artemis.Plugins/packages.config
index 1be98b369..a0ab7c1fc 100644
--- a/src/Artemis.Plugins/packages.config
+++ b/src/Artemis.Plugins/packages.config
@@ -1,4 +1,5 @@
+
diff --git a/src/Artemis.Storage/Migrations/20180124134310_InitialCreate.cs b/src/Artemis.Storage/Migrations/20180124134310_InitialCreate.cs
index 8f709fb9f..6d9326b69 100644
--- a/src/Artemis.Storage/Migrations/20180124134310_InitialCreate.cs
+++ b/src/Artemis.Storage/Migrations/20180124134310_InitialCreate.cs
@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
-using System;
-using System.Collections.Generic;
namespace Artemis.Storage.Migrations
{
@@ -9,8 +7,8 @@ namespace Artemis.Storage.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
- name: "Folders",
- columns: table => new
+ "Folders",
+ table => new
{
Id = table.Column(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -22,28 +20,25 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Folders", x => x.Id);
table.ForeignKey(
- name: "FK_Folders_Folders_FolderEntityId",
- column: x => x.FolderEntityId,
- principalTable: "Folders",
- principalColumn: "Id",
+ "FK_Folders_Folders_FolderEntityId",
+ x => x.FolderEntityId,
+ "Folders",
+ "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "Settings",
- columns: table => new
+ "Settings",
+ table => new
{
Name = table.Column(nullable: false),
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: "Layers",
- columns: table => new
+ "Layers",
+ table => new
{
Id = table.Column(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -56,16 +51,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Layers", x => x.Id);
table.ForeignKey(
- name: "FK_Layers_Folders_FolderEntityId",
- column: x => x.FolderEntityId,
- principalTable: "Folders",
- principalColumn: "Id",
+ "FK_Layers_Folders_FolderEntityId",
+ x => x.FolderEntityId,
+ "Folders",
+ "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "Profiles",
- columns: table => new
+ "Profiles",
+ table => new
{
Id = table.Column(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -77,16 +72,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Profiles", x => x.Id);
table.ForeignKey(
- name: "FK_Profiles_Folders_RootFolderId",
- column: x => x.RootFolderId,
- principalTable: "Folders",
- principalColumn: "Id",
+ "FK_Profiles_Folders_RootFolderId",
+ x => x.RootFolderId,
+ "Folders",
+ "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
- name: "LayerSettings",
- columns: table => new
+ "LayerSettings",
+ table => new
{
Id = table.Column(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -98,16 +93,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_LayerSettings", x => x.Id);
table.ForeignKey(
- name: "FK_LayerSettings_Layers_LayerEntityId",
- column: x => x.LayerEntityId,
- principalTable: "Layers",
- principalColumn: "Id",
+ "FK_LayerSettings_Layers_LayerEntityId",
+ x => x.LayerEntityId,
+ "Layers",
+ "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
- name: "Leds",
- columns: table => new
+ "Leds",
+ table => new
{
Id = table.Column(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -119,16 +114,16 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Leds", x => x.Id);
table.ForeignKey(
- name: "FK_Leds_Layers_LayerId",
- column: x => x.LayerId,
- principalTable: "Layers",
- principalColumn: "Id",
+ "FK_Leds_Layers_LayerId",
+ x => x.LayerId,
+ "Layers",
+ "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
- name: "Keypoints",
- columns: table => new
+ "Keypoints",
+ table => new
{
Id = table.Column(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
@@ -140,66 +135,66 @@ namespace Artemis.Storage.Migrations
{
table.PrimaryKey("PK_Keypoints", x => x.Id);
table.ForeignKey(
- name: "FK_Keypoints_LayerSettings_LayerSettingEntityId",
- column: x => x.LayerSettingEntityId,
- principalTable: "LayerSettings",
- principalColumn: "Id",
+ "FK_Keypoints_LayerSettings_LayerSettingEntityId",
+ x => x.LayerSettingEntityId,
+ "LayerSettings",
+ "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
- name: "IX_Folders_FolderEntityId",
- table: "Folders",
- column: "FolderEntityId");
+ "IX_Folders_FolderEntityId",
+ "Folders",
+ "FolderEntityId");
migrationBuilder.CreateIndex(
- name: "IX_Keypoints_LayerSettingEntityId",
- table: "Keypoints",
- column: "LayerSettingEntityId");
+ "IX_Keypoints_LayerSettingEntityId",
+ "Keypoints",
+ "LayerSettingEntityId");
migrationBuilder.CreateIndex(
- name: "IX_Layers_FolderEntityId",
- table: "Layers",
- column: "FolderEntityId");
+ "IX_Layers_FolderEntityId",
+ "Layers",
+ "FolderEntityId");
migrationBuilder.CreateIndex(
- name: "IX_LayerSettings_LayerEntityId",
- table: "LayerSettings",
- column: "LayerEntityId");
+ "IX_LayerSettings_LayerEntityId",
+ "LayerSettings",
+ "LayerEntityId");
migrationBuilder.CreateIndex(
- name: "IX_Leds_LayerId",
- table: "Leds",
- column: "LayerId");
+ "IX_Leds_LayerId",
+ "Leds",
+ "LayerId");
migrationBuilder.CreateIndex(
- name: "IX_Profiles_RootFolderId",
- table: "Profiles",
- column: "RootFolderId");
+ "IX_Profiles_RootFolderId",
+ "Profiles",
+ "RootFolderId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
- name: "Keypoints");
+ "Keypoints");
migrationBuilder.DropTable(
- name: "Leds");
+ "Leds");
migrationBuilder.DropTable(
- name: "Profiles");
+ "Profiles");
migrationBuilder.DropTable(
- name: "Settings");
+ "Settings");
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 5cba3bdc1..1cef1a47c 100644
--- a/src/Artemis.Storage/Migrations/StorageContextModelSnapshot.cs
+++ b/src/Artemis.Storage/Migrations/StorageContextModelSnapshot.cs
@@ -1,16 +1,12 @@
//
-using Artemis.Storage;
+
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage;
-using System;
namespace Artemis.Storage.Migrations
{
[DbContext(typeof(StorageContext))]
- partial class StorageContextModelSnapshot : ModelSnapshot
+ internal class StorageContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@@ -19,171 +15,171 @@ namespace Artemis.Storage.Migrations
.HasAnnotation("ProductVersion", "2.0.1-rtm-125");
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
- b.Property("FolderEntityId");
+ b.Property("FolderEntityId");
- b.Property("Name");
+ b.Property("Name");
- b.Property("Order");
+ b.Property("Order");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("FolderEntityId");
+ b.HasIndex("FolderEntityId");
- b.ToTable("Folders");
- });
+ b.ToTable("Folders");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
- b.Property("LayerSettingEntityId");
+ b.Property("LayerSettingEntityId");
- b.Property("Time");
+ b.Property("Time");
- b.Property("Value");
+ b.Property("Value");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("LayerSettingEntityId");
+ b.HasIndex("LayerSettingEntityId");
- b.ToTable("Keypoints");
- });
+ b.ToTable("Keypoints");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
- b.Property("FolderEntityId");
+ b.Property("FolderEntityId");
- b.Property("Name");
+ b.Property("Name");
- b.Property("Order");
+ b.Property("Order");
- b.Property("Type");
+ b.Property("Type");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("FolderEntityId");
+ b.HasIndex("FolderEntityId");
- b.ToTable("Layers");
- });
+ b.ToTable("Layers");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
- b.Property("LayerEntityId");
+ b.Property("LayerEntityId");
- b.Property("Name");
+ b.Property("Name");
- b.Property("Value");
+ b.Property("Value");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("LayerEntityId");
+ b.HasIndex("LayerEntityId");
- b.ToTable("LayerSettings");
- });
+ b.ToTable("LayerSettings");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
- b.Property("LayerId");
+ b.Property("LayerId");
- b.Property("LedName");
+ b.Property("LedName");
- b.Property("LimitedToDevice");
+ b.Property("LimitedToDevice");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("LayerId");
+ b.HasIndex("LayerId");
- b.ToTable("Leds");
- });
+ b.ToTable("Leds");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
- b.Property("Module");
+ b.Property("Module");
- b.Property("Name");
+ b.Property("Name");
- b.Property("RootFolderId");
+ b.Property("RootFolderId");
- b.HasKey("Id");
+ b.HasKey("Id");
- b.HasIndex("RootFolderId");
+ b.HasIndex("RootFolderId");
- 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.FolderEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.FolderEntity")
- .WithMany("Folders")
- .HasForeignKey("FolderEntityId");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.FolderEntity")
+ .WithMany("Folders")
+ .HasForeignKey("FolderEntityId");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
- .WithMany("Keypoints")
- .HasForeignKey("LayerSettingEntityId");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.LayerSettingEntity")
+ .WithMany("Keypoints")
+ .HasForeignKey("LayerSettingEntityId");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.FolderEntity")
- .WithMany("Layers")
- .HasForeignKey("FolderEntityId");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.FolderEntity")
+ .WithMany("Layers")
+ .HasForeignKey("FolderEntityId");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.LayerEntity")
- .WithMany("Settings")
- .HasForeignKey("LayerEntityId");
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.LayerEntity")
+ .WithMany("Settings")
+ .HasForeignKey("LayerEntityId");
+ });
modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
- .WithMany("Leds")
- .HasForeignKey("LayerId")
- .OnDelete(DeleteBehavior.Cascade);
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.LayerEntity", "Layer")
+ .WithMany("Leds")
+ .HasForeignKey("LayerId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
- {
- b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
- .WithMany()
- .HasForeignKey("RootFolderId")
- .OnDelete(DeleteBehavior.Cascade);
- });
+ {
+ b.HasOne("Artemis.Storage.Entities.FolderEntity", "RootFolder")
+ .WithMany()
+ .HasForeignKey("RootFolderId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
#pragma warning restore 612, 618
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.UI/App.config b/src/Artemis.UI/App.config
index 46ebf0007..dfd6fa450 100644
--- a/src/Artemis.UI/App.config
+++ b/src/Artemis.UI/App.config
@@ -31,7 +31,8 @@
-
+
@@ -55,7 +56,8 @@
-
+
diff --git a/src/Artemis.UI/App.xaml b/src/Artemis.UI/App.xaml
index 4f4a062fc..5b27fb1c2 100644
--- a/src/Artemis.UI/App.xaml
+++ b/src/Artemis.UI/App.xaml
@@ -31,9 +31,9 @@
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />
-
-
-
+
+
+
diff --git a/src/Artemis.UI/Controls/Visualizers/LedVisualizer.cs b/src/Artemis.UI/Controls/Visualizers/LedVisualizer.cs
index 19c880803..d875e61c8 100644
--- a/src/Artemis.UI/Controls/Visualizers/LedVisualizer.cs
+++ b/src/Artemis.UI/Controls/Visualizers/LedVisualizer.cs
@@ -11,6 +11,16 @@ namespace Artemis.UI.Controls.Visualizers
///
public class LedVisualizer : Control
{
+ public void Select()
+ {
+ BorderBrush = new SolidColorBrush(Colors.RoyalBlue);
+ }
+
+ public void Deselect()
+ {
+ BorderBrush = new SolidColorBrush(Colors.Black);
+ }
+
#region DependencyProperties
// ReSharper disable InconsistentNaming
@@ -33,15 +43,5 @@ namespace Artemis.UI.Controls.Visualizers
// ReSharper restore InconsistentNaming
#endregion
-
- public void Select()
- {
- BorderBrush = new SolidColorBrush(Colors.RoyalBlue);
- }
-
- public void Deselect()
- {
- BorderBrush = new SolidColorBrush(Colors.Black);
- }
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Controls/Visualizers/RGBDeviceVisualizer.cs b/src/Artemis.UI/Controls/Visualizers/RGBDeviceVisualizer.cs
index d01cd3333..111d59a76 100644
--- a/src/Artemis.UI/Controls/Visualizers/RGBDeviceVisualizer.cs
+++ b/src/Artemis.UI/Controls/Visualizers/RGBDeviceVisualizer.cs
@@ -6,7 +6,7 @@ namespace Artemis.UI.Controls.Visualizers
{
///
///
- /// Visualizes a in an wpf-application.
+ /// Visualizes a in an wpf-application.
///
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
public class RGBDeviceVisualizer : Control
@@ -18,7 +18,7 @@ namespace Artemis.UI.Controls.Visualizers
#endregion
#region Properties & Fields
-
+
public Canvas Canvas { get; private set; }
#endregion
@@ -28,13 +28,13 @@ namespace Artemis.UI.Controls.Visualizers
// ReSharper disable InconsistentNaming
///
- /// Backing-property for the -property.
+ /// Backing-property for the -property.
///
public static readonly DependencyProperty DeviceProperty = DependencyProperty.Register(
"Device", typeof(IRGBDevice), typeof(RGBDeviceVisualizer), new PropertyMetadata(default(IRGBDevice), DeviceChanged));
///
- /// Gets or sets the to visualize.
+ /// Gets or sets the to visualize.
///
public IRGBDevice Device
{
@@ -69,7 +69,7 @@ namespace Artemis.UI.Controls.Visualizers
if (Device == null) return;
- foreach (Led led in Device)
+ foreach (var led in Device)
Canvas.Children.Add(new LedVisualizer {Led = led});
}
diff --git a/src/Artemis.UI/Controls/Visualizers/RGBSurfaceVisualizer.cs b/src/Artemis.UI/Controls/Visualizers/RGBSurfaceVisualizer.cs
index 18b18e1fe..d05fd77c1 100644
--- a/src/Artemis.UI/Controls/Visualizers/RGBSurfaceVisualizer.cs
+++ b/src/Artemis.UI/Controls/Visualizers/RGBSurfaceVisualizer.cs
@@ -14,7 +14,7 @@ namespace Artemis.UI.Controls.Visualizers
{
///
///
- /// Visualizes the in an wpf-application.
+ /// Visualizes the in an wpf-application.
///
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
public class RGBSurfaceVisualizer : Control
@@ -41,12 +41,12 @@ namespace Artemis.UI.Controls.Visualizers
///
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
public RGBSurfaceVisualizer()
{
- this.Loaded += OnLoaded;
- this.Unloaded += OnUnloaded;
+ Loaded += OnLoaded;
+ Unloaded += OnUnloaded;
}
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
@@ -54,7 +54,7 @@ namespace Artemis.UI.Controls.Visualizers
_surface = RGBSurface.Instance;
_surface.SurfaceLayoutChanged += RGBSurfaceOnSurfaceLayoutChanged;
- foreach (IRGBDevice device in _surface.Devices)
+ foreach (var device in _surface.Devices)
_newDevices.Add(device);
UpdateSurface();
@@ -70,7 +70,7 @@ namespace Artemis.UI.Controls.Visualizers
private void RGBSurfaceOnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs args)
{
if (args.DeviceAdded)
- foreach (IRGBDevice device in args.Devices)
+ foreach (var device in args.Devices)
_newDevices.Add(device);
UpdateSurface();
@@ -89,6 +89,7 @@ namespace Artemis.UI.Controls.Visualizers
_canvas.MouseLeftButtonDown -= ScrollViewerOnMouseLeftButtonDown;
_canvas.MouseLeftButtonUp -= ScrollViewerOnMouseLeftButtonUp;
}
+
_canvas?.Children.Clear();
_canvas = (Canvas) GetTemplateChild(PART_CANVAS);
@@ -151,11 +152,11 @@ namespace Artemis.UI.Controls.Visualizers
private void UpdateSurface()
{
- if ((_canvas == null) || (_surface == null)) return;
+ if (_canvas == null || _surface == null) return;
if (_newDevices.Count > 0)
{
- foreach (IRGBDevice device in _newDevices)
+ foreach (var device in _newDevices)
_canvas.Children.Add(new RGBDeviceVisualizer {Device = device});
_newDevices.Clear();
}
diff --git a/src/Artemis.UI/Converters/ColorToSolidColorBrushConverter.cs b/src/Artemis.UI/Converters/ColorToSolidColorBrushConverter.cs
index 51107717b..bbca9ca79 100644
--- a/src/Artemis.UI/Converters/ColorToSolidColorBrushConverter.cs
+++ b/src/Artemis.UI/Converters/ColorToSolidColorBrushConverter.cs
@@ -2,30 +2,31 @@
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
+using Color = RGB.NET.Core.Color;
namespace Artemis.UI.Converters
{
///
///
- /// Converts into .
+ /// Converts into .
///
- [ValueConversion(typeof(RGB.NET.Core.Color), typeof(SolidColorBrush))]
+ [ValueConversion(typeof(Color), typeof(SolidColorBrush))]
public class ColorToSolidColorBrushConverter : IValueConverter
{
///
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- return new SolidColorBrush(!(value is RGB.NET.Core.Color color)
- ? Color.FromArgb(0, 0, 0, 0)
- : Color.FromArgb(color.A, color.R, color.G, color.B));
+ return new SolidColorBrush(!(value is Color color)
+ ? System.Windows.Media.Color.FromArgb(0, 0, 0, 0)
+ : System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B));
}
///
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return !(value is SolidColorBrush brush)
- ? RGB.NET.Core.Color.Transparent
- : new RGB.NET.Core.Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B);
+ ? Color.Transparent
+ : new Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Artemis.UI/Services/Interfaces/IArtemisUIService.cs b/src/Artemis.UI/Services/Interfaces/IArtemisUIService.cs
index 38a201599..d29486dce 100644
--- a/src/Artemis.UI/Services/Interfaces/IArtemisUIService.cs
+++ b/src/Artemis.UI/Services/Interfaces/IArtemisUIService.cs
@@ -3,6 +3,5 @@
// ReSharper disable once InconsistentNaming
public interface IArtemisUIService
{
-
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Styles/Visualizers/LedVisualizer.xaml b/src/Artemis.UI/Styles/Visualizers/LedVisualizer.xaml
index 54b756850..9bfb6bd80 100644
--- a/src/Artemis.UI/Styles/Visualizers/LedVisualizer.xaml
+++ b/src/Artemis.UI/Styles/Visualizers/LedVisualizer.xaml
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Artemis.UI.Controls.Visualizers"
xmlns:converters="clr-namespace:Artemis.UI.Converters">
-
+
@@ -50,12 +50,12 @@
-
@@ -67,11 +67,14 @@
-
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Styles/Visualizers/RGBDeviceVisualizer.xaml b/src/Artemis.UI/Styles/Visualizers/RGBDeviceVisualizer.xaml
index 679977043..a96f8cbc5 100644
--- a/src/Artemis.UI/Styles/Visualizers/RGBDeviceVisualizer.xaml
+++ b/src/Artemis.UI/Styles/Visualizers/RGBDeviceVisualizer.xaml
@@ -1,7 +1,7 @@
-
+