Started layout editor implementation

Rearranged VMs/Views
Updated RGB.NET
This commit is contained in:
SpoinkyNL committed 2019-08-11 01:23:13 +02:00
1 parent 390dcc6ae1
commit 6e23c079b1
52 files changed
+741 -185

No files matched your search

+10 -7
View File
@@ -1,8 +1,8 @@
using System;
using System.IO;
using System.IO;
using System.Reflection;
using Artemis.Storage.Entities;
using Microsoft.EntityFrameworkCore;
using SQLitePCL;
namespace Artemis.Storage
{
@@ -10,23 +10,26 @@ namespace Artemis.Storage
{
public DbSet<ProfileEntity> Profiles { get; set; }
public DbSet<SettingEntity> Settings { get; set; }
public DbSet<PluginSettingEntity> PluginSettings { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
#if DEBUG
// var dbLocation = @"C:\Repos\Artemis\src\Artemis.Storage\Storage.db";
#if DEBUG
var dbLocation = Path.GetFullPath(Path.Combine(Assembly.GetEntryAssembly().Location, @"..\..\..\..\Artemis.Storage\Storage.db"));
#else
#else
var dbLocation = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\Artemis\\Storage.db";
#endif
#endif
optionsBuilder.UseSqlite("Data Source=" + dbLocation);
// Requires Microsoft.Data.Sqlite in the startup project
SQLitePCL.Batteries.Init();
Batteries.Init();
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<SettingEntity>().HasKey(s => new {s.Name, s.PluginGuid});
modelBuilder.Entity<SettingEntity>().HasKey(s => s.Name);
modelBuilder.Entity<PluginSettingEntity>().HasKey(s => new {s.Name, s.PluginGuid});
base.OnModelCreating(modelBuilder);
}
}