mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Project cleanup
This commit is contained in:
parent
2f72cdb1d9
commit
31affd01b3
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Artemis.Core.Attributes
|
||||
{
|
||||
|
||||
@ -1,10 +1,4 @@
|
||||
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
|
||||
{
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -28,7 +28,8 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a"
|
||||
culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
@ -52,7 +53,8 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35"
|
||||
culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<packages>
|
||||
<package id="Castle.Core" version="4.2.1" targetFramework="net46" />
|
||||
<package id="HidSharp" version="1.5" targetFramework="net46" />
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Artemis.Core.Attributes;
|
||||
using Artemis.Core.Attributes;
|
||||
using Artemis.Plugins.Interfaces;
|
||||
|
||||
namespace Artemis.Plugins.BuiltIn.Modules.General
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<configuration>
|
||||
<runtime>
|
||||
<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" />
|
||||
</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" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
@ -59,7 +61,8 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35"
|
||||
culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<packages>
|
||||
<package id="Stylet" version="1.1.21" targetFramework="net461" />
|
||||
</packages>
|
||||
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Ninject;
|
||||
|
||||
namespace Artemis.Plugins.Interfaces
|
||||
{
|
||||
|
||||
@ -2,6 +2,5 @@
|
||||
{
|
||||
public interface IModuleDataModel
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<configuration>
|
||||
<runtime>
|
||||
<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" />
|
||||
</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" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
@ -43,7 +45,8 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35"
|
||||
culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<packages>
|
||||
<package id="CS-Script.bin" version="3.28.0.1" targetFramework="net46" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net46" />
|
||||
|
||||
@ -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<int>(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<string>(nullable: false),
|
||||
Value = table.Column<string>(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<int>(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<int>(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<int>(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<int>(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<int>(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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,16 +1,12 @@
|
||||
// <auto-generated />
|
||||
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,170 +15,170 @@ namespace Artemis.Storage.Migrations
|
||||
.HasAnnotation("ProductVersion", "2.0.1-rtm-125");
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.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 =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.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 =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.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 =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.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 =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.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 =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.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 =>
|
||||
{
|
||||
b.Property<string>("Name")
|
||||
.ValueGeneratedOnAdd();
|
||||
{
|
||||
b.Property<string>("Name")
|
||||
.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 =>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,8 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a"
|
||||
culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
@ -55,7 +56,8 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Scripting" publicKeyToken="31bf3856ad364e35"
|
||||
culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Teal.xaml" />
|
||||
|
||||
<!-- Artemis -->
|
||||
<ResourceDictionary Source="Styles/Visualizers/RGBSurfaceVisualizer.xaml"></ResourceDictionary>
|
||||
<ResourceDictionary Source="Styles/Visualizers/RGBDeviceVisualizer.xaml"></ResourceDictionary>
|
||||
<ResourceDictionary Source="Styles/Visualizers/LedVisualizer.xaml"></ResourceDictionary>
|
||||
<ResourceDictionary Source="Styles/Visualizers/RGBSurfaceVisualizer.xaml" />
|
||||
<ResourceDictionary Source="Styles/Visualizers/RGBDeviceVisualizer.xaml" />
|
||||
<ResourceDictionary Source="Styles/Visualizers/LedVisualizer.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- MahApps Brushes -->
|
||||
|
||||
@ -11,6 +11,16 @@ namespace Artemis.UI.Controls.Visualizers
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ namespace Artemis.UI.Controls.Visualizers
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <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>
|
||||
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
|
||||
public class RGBDeviceVisualizer : Control
|
||||
@ -28,13 +28,13 @@ namespace Artemis.UI.Controls.Visualizers
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
/// <summary>
|
||||
/// Backing-property for the <see cref="Device"/>-property.
|
||||
/// Backing-property for the <see cref="Device" />-property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty DeviceProperty = DependencyProperty.Register(
|
||||
"Device", typeof(IRGBDevice), typeof(RGBDeviceVisualizer), new PropertyMetadata(default(IRGBDevice), DeviceChanged));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="IRGBDevice"/> to visualize.
|
||||
/// Gets or sets the <see cref="IRGBDevice" /> to visualize.
|
||||
/// </summary>
|
||||
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});
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ namespace Artemis.UI.Controls.Visualizers
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <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>
|
||||
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
|
||||
public class RGBSurfaceVisualizer : Control
|
||||
@ -41,12 +41,12 @@ namespace Artemis.UI.Controls.Visualizers
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <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>
|
||||
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();
|
||||
}
|
||||
|
||||
@ -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
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <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>
|
||||
[ValueConversion(typeof(RGB.NET.Core.Color), typeof(SolidColorBrush))]
|
||||
[ValueConversion(typeof(Color), typeof(SolidColorBrush))]
|
||||
public class ColorToSolidColorBrushConverter : IValueConverter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
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));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,5 @@
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public interface IArtemisUIService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -67,11 +67,14 @@
|
||||
<Style x:Key="StyleLedVisualizer" TargetType="{x:Type controls:LedVisualizer}">
|
||||
<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="Canvas.Left" Value="{Binding Led.LedRectangle.Location.X, RelativeSource={RelativeSource Self}}" />
|
||||
<Setter Property="Canvas.Top" Value="{Binding Led.LedRectangle.Location.Y, RelativeSource={RelativeSource Self}}" />
|
||||
<Setter Property="Canvas.Left"
|
||||
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="Background" Value="{Binding Led.Color, RelativeSource={RelativeSource Self},
|
||||
<Setter Property="Background"
|
||||
Value="{Binding Led.Color, RelativeSource={RelativeSource Self},
|
||||
Converter={StaticResource ConverterColorToSolidColorBrush}}" />
|
||||
|
||||
<Setter Property="Template" Value="{StaticResource ControlTemplateLedRectangle}" />
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<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>
|
||||
</UserControl.Resources>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<packages>
|
||||
<package id="Castle.Core" version="4.2.1" targetFramework="net461" />
|
||||
<package id="ControlzEx" version="3.0.2.4" targetFramework="net461" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user