1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Project cleanup

This commit is contained in:
SpoinkyNL 2018-03-04 22:29:04 +01:00
parent 2f72cdb1d9
commit 31affd01b3
30 changed files with 254 additions and 268 deletions

View File

@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artemis.Core.Attributes namespace Artemis.Core.Attributes
{ {
@ -10,4 +6,4 @@ namespace Artemis.Core.Attributes
{ {
public string DisplayName { get; set; } public string DisplayName { get; set; }
} }
} }

View File

@ -1,12 +1,6 @@
using System; namespace Artemis.Core.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artemis.Core.Models
{ {
public class DataModelDescription public class DataModelDescription
{ {
} }
} }

View File

@ -1,9 +1,4 @@
using System.Linq; using Artemis.Core.Services.Interfaces;
using System.Reflection;
using Artemis.Core.Services.Interfaces;
using Artemis.Plugins.Interfaces;
using Artemis.Plugins.Models;
using Newtonsoft.Json;
using Ninject.Extensions.Conventions; using Ninject.Extensions.Conventions;
using Ninject.Modules; using Ninject.Modules;

View File

@ -10,8 +10,8 @@ namespace Artemis.Core.Services
{ {
public class CoreService : ICoreService public class CoreService : ICoreService
{ {
private readonly IRgbService _rgbService;
private readonly IPluginService _pluginService; private readonly IPluginService _pluginService;
private readonly IRgbService _rgbService;
public CoreService(IPluginService pluginService, IRgbService rgbService) public CoreService(IPluginService pluginService, IRgbService rgbService)
{ {
@ -38,7 +38,7 @@ namespace Artemis.Core.Services
// Initialize the services // Initialize the services
await _pluginService.LoadPlugins(); await _pluginService.LoadPlugins();
await _rgbService.LoadDevices(); await _rgbService.LoadDevices();
OnInitialized(); OnInitialized();
} }

View File

@ -1,19 +1,14 @@
using System; using System;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Artemis.Core.Events; using Artemis.Core.Events;
using Artemis.Core.Services.Interfaces; using Artemis.Core.Services.Interfaces;
using RGB.NET.Brushes;
using RGB.NET.Core; using RGB.NET.Core;
using RGB.NET.Devices.Asus;
using RGB.NET.Devices.CoolerMaster; using RGB.NET.Devices.CoolerMaster;
using RGB.NET.Devices.Corsair; using RGB.NET.Devices.Corsair;
using RGB.NET.Devices.DMX; using RGB.NET.Devices.DMX;
using RGB.NET.Devices.Logitech; using RGB.NET.Devices.Logitech;
using RGB.NET.Devices.Msi;
using RGB.NET.Devices.Novation; using RGB.NET.Devices.Novation;
using RGB.NET.Devices.Razer; using RGB.NET.Devices.Razer;
using RGB.NET.Groups;
namespace Artemis.Core.Services namespace Artemis.Core.Services
{ {

View File

@ -28,7 +28,8 @@
<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>
<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.1.0" newVersion="4.0.1.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -52,7 +53,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="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <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" /> <bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>

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.2.1" targetFramework="net46" /> <package id="Castle.Core" version="4.2.1" targetFramework="net46" />
<package id="HidSharp" version="1.5" targetFramework="net46" /> <package id="HidSharp" version="1.5" targetFramework="net46" />

View File

@ -1,5 +1,4 @@
using System; using Artemis.Core.Attributes;
using Artemis.Core.Attributes;
using Artemis.Plugins.Interfaces; using Artemis.Plugins.Interfaces;
namespace Artemis.Plugins.BuiltIn.Modules.General namespace Artemis.Plugins.BuiltIn.Modules.General

View File

@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
@ -33,4 +32,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

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">
@ -15,7 +16,8 @@
<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>
<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.1.0" newVersion="4.0.1.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -59,7 +61,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="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <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" /> <bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Stylet" version="1.1.21" targetFramework="net461" /> <package id="Stylet" version="1.1.21" targetFramework="net461" />
</packages> </packages>

View File

@ -1,5 +1,4 @@
using System; using System;
using Ninject;
namespace Artemis.Plugins.Interfaces namespace Artemis.Plugins.Interfaces
{ {
@ -19,7 +18,7 @@ namespace Artemis.Plugins.Interfaces
/// accessed by profiles in this module /// accessed by profiles in this module
/// </summary> /// </summary>
bool ExpandsMainDataModel { get; } bool ExpandsMainDataModel { get; }
/// <summary> /// <summary>
/// Called each frame when the module must update /// Called each frame when the module must update
/// </summary> /// </summary>

View File

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

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">
@ -19,7 +20,8 @@
<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>
<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.1.0" newVersion="4.0.1.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -43,7 +45,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="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <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" /> <bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="CS-Script.bin" version="3.28.0.1" targetFramework="net46" /> <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.Analyzers" version="1.1.0" targetFramework="net46" />

View File

@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace Artemis.Storage.Migrations namespace Artemis.Storage.Migrations
{ {
@ -9,8 +7,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
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
@ -22,28 +20,25 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Folders", x => x.Id); table.PrimaryKey("PK_Folders", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_Folders_Folders_FolderEntityId", "FK_Folders_Folders_FolderEntityId",
column: x => x.FolderEntityId, x => x.FolderEntityId,
principalTable: "Folders", "Folders",
principalColumn: "Id", "Id",
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
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
@ -56,16 +51,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Layers", x => x.Id); table.PrimaryKey("PK_Layers", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_Layers_Folders_FolderEntityId", "FK_Layers_Folders_FolderEntityId",
column: x => x.FolderEntityId, x => x.FolderEntityId,
principalTable: "Folders", "Folders",
principalColumn: "Id", "Id",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Profiles", "Profiles",
columns: table => new table => new
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
@ -77,16 +72,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Profiles", x => x.Id); table.PrimaryKey("PK_Profiles", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_Profiles_Folders_RootFolderId", "FK_Profiles_Folders_RootFolderId",
column: x => x.RootFolderId, x => x.RootFolderId,
principalTable: "Folders", "Folders",
principalColumn: "Id", "Id",
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "LayerSettings", "LayerSettings",
columns: table => new table => new
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
@ -98,16 +93,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_LayerSettings", x => x.Id); table.PrimaryKey("PK_LayerSettings", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_LayerSettings_Layers_LayerEntityId", "FK_LayerSettings_Layers_LayerEntityId",
column: x => x.LayerEntityId, x => x.LayerEntityId,
principalTable: "Layers", "Layers",
principalColumn: "Id", "Id",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Leds", "Leds",
columns: table => new table => new
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
@ -119,16 +114,16 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Leds", x => x.Id); table.PrimaryKey("PK_Leds", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_Leds_Layers_LayerId", "FK_Leds_Layers_LayerId",
column: x => x.LayerId, x => x.LayerId,
principalTable: "Layers", "Layers",
principalColumn: "Id", "Id",
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Keypoints", "Keypoints",
columns: table => new table => new
{ {
Id = table.Column<int>(nullable: false) Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
@ -140,66 +135,66 @@ namespace Artemis.Storage.Migrations
{ {
table.PrimaryKey("PK_Keypoints", x => x.Id); table.PrimaryKey("PK_Keypoints", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_Keypoints_LayerSettings_LayerSettingEntityId", "FK_Keypoints_LayerSettings_LayerSettingEntityId",
column: x => x.LayerSettingEntityId, x => x.LayerSettingEntityId,
principalTable: "LayerSettings", "LayerSettings",
principalColumn: "Id", "Id",
onDelete: ReferentialAction.Restrict); onDelete: ReferentialAction.Restrict);
}); });
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Folders_FolderEntityId", "IX_Folders_FolderEntityId",
table: "Folders", "Folders",
column: "FolderEntityId"); "FolderEntityId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Keypoints_LayerSettingEntityId", "IX_Keypoints_LayerSettingEntityId",
table: "Keypoints", "Keypoints",
column: "LayerSettingEntityId"); "LayerSettingEntityId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Layers_FolderEntityId", "IX_Layers_FolderEntityId",
table: "Layers", "Layers",
column: "FolderEntityId"); "FolderEntityId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_LayerSettings_LayerEntityId", "IX_LayerSettings_LayerEntityId",
table: "LayerSettings", "LayerSettings",
column: "LayerEntityId"); "LayerEntityId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Leds_LayerId", "IX_Leds_LayerId",
table: "Leds", "Leds",
column: "LayerId"); "LayerId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Profiles_RootFolderId", "IX_Profiles_RootFolderId",
table: "Profiles", "Profiles",
column: "RootFolderId"); "RootFolderId");
} }
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,16 +1,12 @@
// <auto-generated /> // <auto-generated />
using Artemis.Storage;
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 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)
{ {
@ -19,171 +15,171 @@ namespace Artemis.Storage.Migrations
.HasAnnotation("ProductVersion", "2.0.1-rtm-125"); .HasAnnotation("ProductVersion", "2.0.1-rtm-125");
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<int?>("FolderEntityId"); b.Property<int?>("FolderEntityId");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<int>("Order"); b.Property<int>("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 => modelBuilder.Entity("Artemis.Storage.Entities.KeypointEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<int?>("LayerSettingEntityId"); b.Property<int?>("LayerSettingEntityId");
b.Property<int>("Time"); b.Property<int>("Time");
b.Property<string>("Value"); b.Property<string>("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 => modelBuilder.Entity("Artemis.Storage.Entities.LayerEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<int?>("FolderEntityId"); b.Property<int?>("FolderEntityId");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<int>("Order"); b.Property<int>("Order");
b.Property<string>("Type"); b.Property<string>("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 => modelBuilder.Entity("Artemis.Storage.Entities.LayerSettingEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<int?>("LayerEntityId"); b.Property<int?>("LayerEntityId");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<string>("Value"); b.Property<string>("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 => modelBuilder.Entity("Artemis.Storage.Entities.LedEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
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("Id"); b.HasKey("Id");
b.HasIndex("LayerId"); b.HasIndex("LayerId");
b.ToTable("Leds"); b.ToTable("Leds");
}); });
modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b => modelBuilder.Entity("Artemis.Storage.Entities.ProfileEntity", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<string>("Module"); b.Property<string>("Module");
b.Property<string>("Name"); b.Property<string>("Name");
b.Property<int>("RootFolderId"); b.Property<int>("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 => 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("FolderEntityId"); .HasForeignKey("FolderEntityId");
}); });
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("LayerSettingEntityId"); .HasForeignKey("LayerSettingEntityId");
}); });
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("FolderEntityId"); .HasForeignKey("FolderEntityId");
}); });
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("LayerEntityId"); .HasForeignKey("LayerEntityId");
}); });
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("LayerId") .HasForeignKey("LayerId")
.OnDelete(DeleteBehavior.Cascade); .OnDelete(DeleteBehavior.Cascade);
}); });
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("RootFolderId") .HasForeignKey("RootFolderId")
.OnDelete(DeleteBehavior.Cascade); .OnDelete(DeleteBehavior.Cascade);
}); });
#pragma warning restore 612, 618 #pragma warning restore 612, 618
} }
} }
} }

View File

@ -31,7 +31,8 @@
<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>
<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.1.0" newVersion="4.0.1.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@ -55,7 +56,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="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <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" /> <bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>

View File

@ -31,9 +31,9 @@
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" /> Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />
<!-- Artemis --> <!-- Artemis -->
<ResourceDictionary Source="Styles/Visualizers/RGBSurfaceVisualizer.xaml"></ResourceDictionary> <ResourceDictionary Source="Styles/Visualizers/RGBSurfaceVisualizer.xaml" />
<ResourceDictionary Source="Styles/Visualizers/RGBDeviceVisualizer.xaml"></ResourceDictionary> <ResourceDictionary Source="Styles/Visualizers/RGBDeviceVisualizer.xaml" />
<ResourceDictionary Source="Styles/Visualizers/LedVisualizer.xaml"></ResourceDictionary> <ResourceDictionary Source="Styles/Visualizers/LedVisualizer.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<!-- MahApps Brushes --> <!-- MahApps Brushes -->

View File

@ -11,6 +11,16 @@ namespace Artemis.UI.Controls.Visualizers
/// </summary> /// </summary>
public class LedVisualizer : Control public class LedVisualizer : Control
{ {
public void Select()
{
BorderBrush = new SolidColorBrush(Colors.RoyalBlue);
}
public void Deselect()
{
BorderBrush = new SolidColorBrush(Colors.Black);
}
#region DependencyProperties #region DependencyProperties
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
@ -33,15 +43,5 @@ namespace Artemis.UI.Controls.Visualizers
// ReSharper restore InconsistentNaming // ReSharper restore InconsistentNaming
#endregion #endregion
public void Select()
{
BorderBrush = new SolidColorBrush(Colors.RoyalBlue);
}
public void Deselect()
{
BorderBrush = new SolidColorBrush(Colors.Black);
}
} }
} }

View File

@ -6,7 +6,7 @@ namespace Artemis.UI.Controls.Visualizers
{ {
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
/// Visualizes a <see cref="T:RGB.NET.Core.IRGBDevice" /> in an wpf-application. /// Visualizes a <see cref="T:RGB.NET.Core.IRGBDevice" /> in an wpf-application.
/// </summary> /// </summary>
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))] [TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
public class RGBDeviceVisualizer : Control public class RGBDeviceVisualizer : Control
@ -18,7 +18,7 @@ namespace Artemis.UI.Controls.Visualizers
#endregion #endregion
#region Properties & Fields #region Properties & Fields
public Canvas Canvas { get; private set; } public Canvas Canvas { get; private set; }
#endregion #endregion
@ -28,13 +28,13 @@ namespace Artemis.UI.Controls.Visualizers
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
/// <summary> /// <summary>
/// Backing-property for the <see cref="Device"/>-property. /// Backing-property for the <see cref="Device" />-property.
/// </summary> /// </summary>
public static readonly DependencyProperty DeviceProperty = DependencyProperty.Register( public static readonly DependencyProperty DeviceProperty = DependencyProperty.Register(
"Device", typeof(IRGBDevice), typeof(RGBDeviceVisualizer), new PropertyMetadata(default(IRGBDevice), DeviceChanged)); "Device", typeof(IRGBDevice), typeof(RGBDeviceVisualizer), new PropertyMetadata(default(IRGBDevice), DeviceChanged));
/// <summary> /// <summary>
/// Gets or sets the <see cref="IRGBDevice"/> to visualize. /// Gets or sets the <see cref="IRGBDevice" /> to visualize.
/// </summary> /// </summary>
public IRGBDevice Device public IRGBDevice Device
{ {
@ -69,7 +69,7 @@ namespace Artemis.UI.Controls.Visualizers
if (Device == null) return; if (Device == null) return;
foreach (Led led in Device) foreach (var led in Device)
Canvas.Children.Add(new LedVisualizer {Led = led}); Canvas.Children.Add(new LedVisualizer {Led = led});
} }

View File

@ -14,7 +14,7 @@ namespace Artemis.UI.Controls.Visualizers
{ {
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
/// Visualizes the <see cref="T:RGB.NET.Core.RGBSurface" /> in an wpf-application. /// Visualizes the <see cref="T:RGB.NET.Core.RGBSurface" /> in an wpf-application.
/// </summary> /// </summary>
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))] [TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
public class RGBSurfaceVisualizer : Control public class RGBSurfaceVisualizer : Control
@ -41,12 +41,12 @@ namespace Artemis.UI.Controls.Visualizers
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="T:RGB.NET.WPF.Controls.RGBSurfaceVisualizer" /> class. /// Initializes a new instance of the <see cref="T:RGB.NET.WPF.Controls.RGBSurfaceVisualizer" /> class.
/// </summary> /// </summary>
public RGBSurfaceVisualizer() public RGBSurfaceVisualizer()
{ {
this.Loaded += OnLoaded; Loaded += OnLoaded;
this.Unloaded += OnUnloaded; Unloaded += OnUnloaded;
} }
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs) private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
@ -54,7 +54,7 @@ namespace Artemis.UI.Controls.Visualizers
_surface = RGBSurface.Instance; _surface = RGBSurface.Instance;
_surface.SurfaceLayoutChanged += RGBSurfaceOnSurfaceLayoutChanged; _surface.SurfaceLayoutChanged += RGBSurfaceOnSurfaceLayoutChanged;
foreach (IRGBDevice device in _surface.Devices) foreach (var device in _surface.Devices)
_newDevices.Add(device); _newDevices.Add(device);
UpdateSurface(); UpdateSurface();
@ -70,7 +70,7 @@ namespace Artemis.UI.Controls.Visualizers
private void RGBSurfaceOnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs args) private void RGBSurfaceOnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs args)
{ {
if (args.DeviceAdded) if (args.DeviceAdded)
foreach (IRGBDevice device in args.Devices) foreach (var device in args.Devices)
_newDevices.Add(device); _newDevices.Add(device);
UpdateSurface(); UpdateSurface();
@ -89,6 +89,7 @@ namespace Artemis.UI.Controls.Visualizers
_canvas.MouseLeftButtonDown -= ScrollViewerOnMouseLeftButtonDown; _canvas.MouseLeftButtonDown -= ScrollViewerOnMouseLeftButtonDown;
_canvas.MouseLeftButtonUp -= ScrollViewerOnMouseLeftButtonUp; _canvas.MouseLeftButtonUp -= ScrollViewerOnMouseLeftButtonUp;
} }
_canvas?.Children.Clear(); _canvas?.Children.Clear();
_canvas = (Canvas) GetTemplateChild(PART_CANVAS); _canvas = (Canvas) GetTemplateChild(PART_CANVAS);
@ -151,11 +152,11 @@ namespace Artemis.UI.Controls.Visualizers
private void UpdateSurface() private void UpdateSurface()
{ {
if ((_canvas == null) || (_surface == null)) return; if (_canvas == null || _surface == null) return;
if (_newDevices.Count > 0) if (_newDevices.Count > 0)
{ {
foreach (IRGBDevice device in _newDevices) foreach (var device in _newDevices)
_canvas.Children.Add(new RGBDeviceVisualizer {Device = device}); _canvas.Children.Add(new RGBDeviceVisualizer {Device = device});
_newDevices.Clear(); _newDevices.Clear();
} }

View File

@ -2,30 +2,31 @@
using System.Globalization; using System.Globalization;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Media; using System.Windows.Media;
using Color = RGB.NET.Core.Color;
namespace Artemis.UI.Converters namespace Artemis.UI.Converters
{ {
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
/// Converts <see cref="T:RGB.NET.Core.Color" /> into <see cref="T:System.Windows.Media.SolidColorBrush" />. /// Converts <see cref="T:RGB.NET.Core.Color" /> into <see cref="T:System.Windows.Media.SolidColorBrush" />.
/// </summary> /// </summary>
[ValueConversion(typeof(RGB.NET.Core.Color), typeof(SolidColorBrush))] [ValueConversion(typeof(Color), typeof(SolidColorBrush))]
public class ColorToSolidColorBrushConverter : IValueConverter public class ColorToSolidColorBrushConverter : IValueConverter
{ {
/// <inheritdoc /> /// <inheritdoc />
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
return new SolidColorBrush(!(value is RGB.NET.Core.Color color) return new SolidColorBrush(!(value is Color color)
? Color.FromArgb(0, 0, 0, 0) ? System.Windows.Media.Color.FromArgb(0, 0, 0, 0)
: Color.FromArgb(color.A, color.R, color.G, color.B)); : System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B));
} }
/// <inheritdoc /> /// <inheritdoc />
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{ {
return !(value is SolidColorBrush brush) return !(value is SolidColorBrush brush)
? RGB.NET.Core.Color.Transparent ? Color.Transparent
: new RGB.NET.Core.Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B); : new Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B);
} }
} }
} }

View File

@ -3,6 +3,5 @@
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public interface IArtemisUIService public interface IArtemisUIService
{ {
} }
} }

View File

@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Artemis.UI.Controls.Visualizers" xmlns:controls="clr-namespace:Artemis.UI.Controls.Visualizers"
xmlns:converters="clr-namespace:Artemis.UI.Converters"> xmlns:converters="clr-namespace:Artemis.UI.Converters">
<converters:ColorToSolidColorBrushConverter x:Key="ConverterColorToSolidColorBrush" /> <converters:ColorToSolidColorBrushConverter x:Key="ConverterColorToSolidColorBrush" />
<ControlTemplate x:Key="ControlTemplateLedRectangle" TargetType="{x:Type controls:LedVisualizer}"> <ControlTemplate x:Key="ControlTemplateLedRectangle" TargetType="{x:Type controls:LedVisualizer}">
@ -50,12 +50,12 @@
<Path Opacity="0.5" <Path Opacity="0.5"
Clip="{Binding Data, RelativeSource={RelativeSource Self}}" Clip="{Binding Data, RelativeSource={RelativeSource Self}}"
Stroke="{TemplateBinding BorderBrush}" Stroke="{TemplateBinding BorderBrush}"
StrokeThickness="2" StrokeThickness="2"
Fill="{TemplateBinding Background}"> Fill="{TemplateBinding Background}">
<Path.Data> <Path.Data>
<PathGeometry Figures="{Binding Led.ShapeData, RelativeSource={RelativeSource TemplatedParent}}"> <PathGeometry Figures="{Binding Led.ShapeData, RelativeSource={RelativeSource TemplatedParent}}">
<PathGeometry.Transform> <PathGeometry.Transform>
<ScaleTransform ScaleX="{Binding ActualWidth, ElementName=Border}" <ScaleTransform ScaleX="{Binding ActualWidth, ElementName=Border}"
ScaleY="{Binding ActualHeight, ElementName=Border}" /> ScaleY="{Binding ActualHeight, ElementName=Border}" />
</PathGeometry.Transform> </PathGeometry.Transform>
</PathGeometry> </PathGeometry>
@ -67,11 +67,14 @@
<Style x:Key="StyleLedVisualizer" TargetType="{x:Type controls:LedVisualizer}"> <Style x:Key="StyleLedVisualizer" TargetType="{x:Type controls:LedVisualizer}">
<Setter Property="Width" Value="{Binding Led.LedRectangle.Size.Width, RelativeSource={RelativeSource Self}}" /> <Setter Property="Width" Value="{Binding Led.LedRectangle.Size.Width, RelativeSource={RelativeSource Self}}" />
<Setter Property="Height" Value="{Binding Led.LedRectangle.Size.Height, RelativeSource={RelativeSource Self}}" /> <Setter Property="Height" Value="{Binding Led.LedRectangle.Size.Height, RelativeSource={RelativeSource Self}}" />
<Setter Property="Canvas.Left" Value="{Binding Led.LedRectangle.Location.X, RelativeSource={RelativeSource Self}}" /> <Setter Property="Canvas.Left"
<Setter Property="Canvas.Top" Value="{Binding Led.LedRectangle.Location.Y, RelativeSource={RelativeSource Self}}" /> Value="{Binding Led.LedRectangle.Location.X, RelativeSource={RelativeSource Self}}" />
<Setter Property="Canvas.Top"
Value="{Binding Led.LedRectangle.Location.Y, RelativeSource={RelativeSource Self}}" />
<Setter Property="BorderBrush" Value="#000000" /> <Setter Property="BorderBrush" Value="#000000" />
<Setter Property="Background" Value="{Binding Led.Color, RelativeSource={RelativeSource Self}, <Setter Property="Background"
Value="{Binding Led.Color, RelativeSource={RelativeSource Self},
Converter={StaticResource ConverterColorToSolidColorBrush}}" /> Converter={StaticResource ConverterColorToSolidColorBrush}}" />
<Setter Property="Template" Value="{StaticResource ControlTemplateLedRectangle}" /> <Setter Property="Template" Value="{StaticResource ControlTemplateLedRectangle}" />
@ -80,7 +83,7 @@
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#FFFFFF" /> <Setter Property="BorderBrush" Value="#FFFFFF" />
</Trigger> </Trigger>
<DataTrigger Binding="{Binding Led.Shape, RelativeSource={RelativeSource Self}}" Value="Circle"> <DataTrigger Binding="{Binding Led.Shape, RelativeSource={RelativeSource Self}}" Value="Circle">
<Setter Property="Template" Value="{StaticResource ControlTemplateLedCircle}" /> <Setter Property="Template" Value="{StaticResource ControlTemplateLedCircle}" />
</DataTrigger> </DataTrigger>
@ -91,5 +94,5 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style TargetType="{x:Type controls:LedVisualizer}" BasedOn="{StaticResource StyleLedVisualizer}" /> <Style TargetType="{x:Type controls:LedVisualizer}" BasedOn="{StaticResource StyleLedVisualizer}" />
</ResourceDictionary> </ResourceDictionary>

View File

@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Artemis.UI.Controls.Visualizers"> xmlns:controls="clr-namespace:Artemis.UI.Controls.Visualizers">
<Style x:Key="StyleRGBDeviceVisualizer" TargetType="{x:Type controls:RGBDeviceVisualizer}"> <Style x:Key="StyleRGBDeviceVisualizer" TargetType="{x:Type controls:RGBDeviceVisualizer}">
<Setter Property="Width" Value="{Binding Device.Size.Width, RelativeSource={RelativeSource Self}}" /> <Setter Property="Width" Value="{Binding Device.Size.Width, RelativeSource={RelativeSource Self}}" />
<Setter Property="Height" Value="{Binding Device.Size.Height, RelativeSource={RelativeSource Self}}" /> <Setter Property="Height" Value="{Binding Device.Size.Height, RelativeSource={RelativeSource Self}}" />
@ -23,16 +23,16 @@
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type controls:RGBDeviceVisualizer}"> <ControlTemplate TargetType="{x:Type controls:RGBDeviceVisualizer}">
<Grid VerticalAlignment="Stretch" <Grid VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="{TemplateBinding Background}"> Background="{TemplateBinding Background}">
<Canvas x:Name="PART_Canvas" <Canvas x:Name="PART_Canvas"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" /> HorizontalAlignment="Stretch" />
<Border VerticalAlignment="Stretch" <Border VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{x:Null}" /> Background="{x:Null}" />
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>

View File

@ -19,7 +19,7 @@ namespace Artemis.UI.Stylet
DefaultConfigureIoC(Kernel); DefaultConfigureIoC(Kernel);
ConfigureIoC(Kernel); ConfigureIoC(Kernel);
} }
/// <summary> /// <summary>
/// Carries out default configuration of the IoC container. Override if you don't want to do this /// Carries out default configuration of the IoC container. Override if you don't want to do this

View File

@ -171,4 +171,4 @@
</DockPanel> </DockPanel>
</materialDesign:DrawerHost> </materialDesign:DrawerHost>
</materialDesign:DialogHost> </materialDesign:DialogHost>
</metro:MetroWindow> </metro:MetroWindow>

View File

@ -8,7 +8,8 @@
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" /> <ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>

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.2.1" targetFramework="net461" /> <package id="Castle.Core" version="4.2.1" targetFramework="net461" />
<package id="ControlzEx" version="3.0.2.4" targetFramework="net461" /> <package id="ControlzEx" version="3.0.2.4" targetFramework="net461" />