mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Added a layer of abstraction between RGB.NET and Artemis
This means Artemis can add extra functionality It also avoid having to reference RGB.NET for basic rendering Implemented rendering scaling
This commit is contained in:
1 parent
498b6a6111
commit
8777e8975f
41 files changed
+725
-494
No files matched your search
+29
-35
@@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
[DbContext(typeof(StorageContext))]
|
||||
[Migration("20191013153102_InitialCreate")]
|
||||
[Migration("20191028171528_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -18,6 +18,30 @@ namespace Artemis.Storage.Migrations
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062");
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.DeviceEntity", b =>
|
||||
{
|
||||
b.Property<string>("Guid")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("DeviceHashCode");
|
||||
|
||||
b.Property<double>("Rotation");
|
||||
|
||||
b.Property<string>("SurfaceId");
|
||||
|
||||
b.Property<double>("X");
|
||||
|
||||
b.Property<double>("Y");
|
||||
|
||||
b.Property<int>("ZIndex");
|
||||
|
||||
b.HasKey("Guid");
|
||||
|
||||
b.HasIndex("SurfaceId");
|
||||
|
||||
b.ToTable("DeviceEntity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
|
||||
{
|
||||
b.Property<string>("Guid")
|
||||
@@ -167,34 +191,11 @@ namespace Artemis.Storage.Migrations
|
||||
b.ToTable("Surfaces");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.SurfacePositionEntity", b =>
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.DeviceEntity", b =>
|
||||
{
|
||||
b.Property<string>("Guid")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("DeviceId");
|
||||
|
||||
b.Property<string>("DeviceManufacturer");
|
||||
|
||||
b.Property<string>("DeviceModel");
|
||||
|
||||
b.Property<string>("DeviceName");
|
||||
|
||||
b.Property<double>("Rotation");
|
||||
|
||||
b.Property<string>("SurfaceId");
|
||||
|
||||
b.Property<double>("X");
|
||||
|
||||
b.Property<double>("Y");
|
||||
|
||||
b.Property<int>("ZIndex");
|
||||
|
||||
b.HasKey("Guid");
|
||||
|
||||
b.HasIndex("SurfaceId");
|
||||
|
||||
b.ToTable("SurfacePositionEntity");
|
||||
b.HasOne("Artemis.Storage.Entities.SurfaceEntity", "Surface")
|
||||
.WithMany("DeviceEntities")
|
||||
.HasForeignKey("SurfaceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
|
||||
@@ -238,13 +239,6 @@ namespace Artemis.Storage.Migrations
|
||||
.WithMany()
|
||||
.HasForeignKey("RootFolderGuid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.SurfacePositionEntity", b =>
|
||||
{
|
||||
b.HasOne("Artemis.Storage.Entities.SurfaceEntity", "Surface")
|
||||
.WithMany("SurfacePositions")
|
||||
.HasForeignKey("SurfaceId");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
+13
-16
@@ -107,14 +107,11 @@ namespace Artemis.Storage.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SurfacePositionEntity",
|
||||
name: "DeviceEntity",
|
||||
columns: table => new
|
||||
{
|
||||
Guid = table.Column<string>(nullable: false),
|
||||
DeviceId = table.Column<int>(nullable: false),
|
||||
DeviceName = table.Column<string>(nullable: true),
|
||||
DeviceModel = table.Column<string>(nullable: true),
|
||||
DeviceManufacturer = table.Column<string>(nullable: true),
|
||||
DeviceHashCode = table.Column<int>(nullable: false),
|
||||
X = table.Column<double>(nullable: false),
|
||||
Y = table.Column<double>(nullable: false),
|
||||
Rotation = table.Column<double>(nullable: false),
|
||||
@@ -123,9 +120,9 @@ namespace Artemis.Storage.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SurfacePositionEntity", x => x.Guid);
|
||||
table.PrimaryKey("PK_DeviceEntity", x => x.Guid);
|
||||
table.ForeignKey(
|
||||
name: "FK_SurfacePositionEntity_Surfaces_SurfaceId",
|
||||
name: "FK_DeviceEntity_Surfaces_SurfaceId",
|
||||
column: x => x.SurfaceId,
|
||||
principalTable: "Surfaces",
|
||||
principalColumn: "Guid",
|
||||
@@ -192,6 +189,11 @@ namespace Artemis.Storage.Migrations
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DeviceEntity_SurfaceId",
|
||||
table: "DeviceEntity",
|
||||
column: "SurfaceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Folders_FolderEntityGuid",
|
||||
table: "Folders",
|
||||
@@ -221,15 +223,13 @@ namespace Artemis.Storage.Migrations
|
||||
name: "IX_Profiles_RootFolderGuid",
|
||||
table: "Profiles",
|
||||
column: "RootFolderGuid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SurfacePositionEntity_SurfaceId",
|
||||
table: "SurfacePositionEntity",
|
||||
column: "SurfaceId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DeviceEntity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Keypoints");
|
||||
|
||||
@@ -246,14 +246,11 @@ namespace Artemis.Storage.Migrations
|
||||
name: "Settings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SurfacePositionEntity");
|
||||
name: "Surfaces");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "LayerSettings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Surfaces");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Layers");
|
||||
|
||||
@@ -16,6 +16,30 @@ namespace Artemis.Storage.Migrations
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062");
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.DeviceEntity", b =>
|
||||
{
|
||||
b.Property<string>("Guid")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("DeviceHashCode");
|
||||
|
||||
b.Property<double>("Rotation");
|
||||
|
||||
b.Property<string>("SurfaceId");
|
||||
|
||||
b.Property<double>("X");
|
||||
|
||||
b.Property<double>("Y");
|
||||
|
||||
b.Property<int>("ZIndex");
|
||||
|
||||
b.HasKey("Guid");
|
||||
|
||||
b.HasIndex("SurfaceId");
|
||||
|
||||
b.ToTable("DeviceEntity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
|
||||
{
|
||||
b.Property<string>("Guid")
|
||||
@@ -165,34 +189,11 @@ namespace Artemis.Storage.Migrations
|
||||
b.ToTable("Surfaces");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.SurfacePositionEntity", b =>
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.DeviceEntity", b =>
|
||||
{
|
||||
b.Property<string>("Guid")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("DeviceId");
|
||||
|
||||
b.Property<string>("DeviceManufacturer");
|
||||
|
||||
b.Property<string>("DeviceModel");
|
||||
|
||||
b.Property<string>("DeviceName");
|
||||
|
||||
b.Property<double>("Rotation");
|
||||
|
||||
b.Property<string>("SurfaceId");
|
||||
|
||||
b.Property<double>("X");
|
||||
|
||||
b.Property<double>("Y");
|
||||
|
||||
b.Property<int>("ZIndex");
|
||||
|
||||
b.HasKey("Guid");
|
||||
|
||||
b.HasIndex("SurfaceId");
|
||||
|
||||
b.ToTable("SurfacePositionEntity");
|
||||
b.HasOne("Artemis.Storage.Entities.SurfaceEntity", "Surface")
|
||||
.WithMany("DeviceEntities")
|
||||
.HasForeignKey("SurfaceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.FolderEntity", b =>
|
||||
@@ -236,13 +237,6 @@ namespace Artemis.Storage.Migrations
|
||||
.WithMany()
|
||||
.HasForeignKey("RootFolderGuid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Artemis.Storage.Entities.SurfacePositionEntity", b =>
|
||||
{
|
||||
b.HasOne("Artemis.Storage.Entities.SurfaceEntity", "Surface")
|
||||
.WithMany("SurfacePositions")
|
||||
.HasForeignKey("SurfaceId");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user