mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Noise brush - Added option to map noise to a gradient
Color brush - Only show gradient/color option when applicable Gradient picker - Design tweaks
This commit is contained in:
1 parent
d647dfbd53
commit
e863652b08
10 files changed
+201
-82
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Models.Profile.KeyframeEngines;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
@@ -45,7 +46,21 @@ namespace Artemis.Core.Ninject
|
||||
if (!Directory.Exists(Constants.DataFolder))
|
||||
Directory.CreateDirectory(Constants.DataFolder);
|
||||
|
||||
return new LiteRepository(Constants.ConnectionString);
|
||||
try
|
||||
{
|
||||
return new LiteRepository(Constants.ConnectionString);
|
||||
}
|
||||
catch (LiteException e)
|
||||
{
|
||||
// I don't like this way of error reporting, now I need to use reflection if I want a meaningful error code
|
||||
if (e.ErrorCode != LiteException.INVALID_DATABASE)
|
||||
throw new ArtemisCoreException($"LiteDB threw error code {e.ErrorCode}. See inner exception for more details", e);
|
||||
|
||||
// If the DB is invalid it's probably LiteDB v4 (TODO: we'll have to do something better later)
|
||||
File.Delete($"{Constants.DataFolder}\\database.db");
|
||||
return new LiteRepository(Constants.ConnectionString);
|
||||
}
|
||||
|
||||
}).InSingletonScope();
|
||||
|
||||
// Bind all repositories as singletons
|
||||
|
||||
Reference in new issue
Block a user