diff --git a/src/Artemis.Core/Artemis.Core.csproj b/src/Artemis.Core/Artemis.Core.csproj index 90e552ee4..eebae52f5 100644 --- a/src/Artemis.Core/Artemis.Core.csproj +++ b/src/Artemis.Core/Artemis.Core.csproj @@ -36,6 +36,7 @@ true + @@ -43,6 +44,7 @@ + diff --git a/src/Artemis.Core/Constants.cs b/src/Artemis.Core/Constants.cs index 6429f74ed..96f6f0653 100644 --- a/src/Artemis.Core/Constants.cs +++ b/src/Artemis.Core/Constants.cs @@ -6,7 +6,7 @@ namespace Artemis.Core public static class Constants { public static readonly string DataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\Artemis\\"; - public static readonly string ConnectionString = $"FileName={DataFolder}\\database.db;Mode=Exclusive"; + public static readonly string ConnectionString = $"FileName={DataFolder}\\database.db"; public static readonly PluginInfo CorePluginInfo = new PluginInfo {Guid = Guid.Parse("ffffffff-ffff-ffff-ffff-ffffffffffff"), Name = "Artemis Core"}; } } \ No newline at end of file diff --git a/src/Artemis.Core/Ninject/CoreModule.cs b/src/Artemis.Core/Ninject/CoreModule.cs index 66ea2d9d0..4743e0c98 100644 --- a/src/Artemis.Core/Ninject/CoreModule.cs +++ b/src/Artemis.Core/Ninject/CoreModule.cs @@ -4,6 +4,7 @@ using Artemis.Core.Models.Profile.KeyframeEngines; using Artemis.Core.Plugins.Models; using Artemis.Core.Services.Interfaces; using Artemis.Storage.Repositories.Interfaces; +using Artemis.UI.Shared.Services.Interfaces; using LiteDB; using Ninject.Activation; using Ninject.Extensions.Conventions; @@ -29,6 +30,16 @@ namespace Artemis.Core.Ninject .Configure(c => c.InSingletonScope()); }); + // Bind all shared UI services as singletons + Kernel.Bind(x => + { + x.FromAssemblyContaining() + .SelectAllClasses() + .InheritedFrom() + .BindAllInterfaces() + .Configure(c => c.InSingletonScope()); + }); + // Bind all protected services as singletons Kernel.Bind(x => { diff --git a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj index 2510fabe7..57159d87a 100644 --- a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj +++ b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj @@ -19,9 +19,12 @@ pdbonly + + + diff --git a/src/Artemis.UI/Screens/Dialogs/ConfirmDialogView.xaml b/src/Artemis.UI.Shared/Screens/Dialogs/ConfirmDialogView.xaml similarity index 90% rename from src/Artemis.UI/Screens/Dialogs/ConfirmDialogView.xaml rename to src/Artemis.UI.Shared/Screens/Dialogs/ConfirmDialogView.xaml index c335cada7..fcaeacc6f 100644 --- a/src/Artemis.UI/Screens/Dialogs/ConfirmDialogView.xaml +++ b/src/Artemis.UI.Shared/Screens/Dialogs/ConfirmDialogView.xaml @@ -1,11 +1,11 @@ - diff --git a/src/Artemis.UI/Screens/Dialogs/ConfirmDialogViewModel.cs b/src/Artemis.UI.Shared/Screens/Dialogs/ConfirmDialogViewModel.cs similarity index 88% rename from src/Artemis.UI/Screens/Dialogs/ConfirmDialogViewModel.cs rename to src/Artemis.UI.Shared/Screens/Dialogs/ConfirmDialogViewModel.cs index 14b842bab..47e71b7fd 100644 --- a/src/Artemis.UI/Screens/Dialogs/ConfirmDialogViewModel.cs +++ b/src/Artemis.UI.Shared/Screens/Dialogs/ConfirmDialogViewModel.cs @@ -1,6 +1,6 @@ -using Artemis.UI.ViewModels.Dialogs; +using Artemis.UI.Shared.Services.Dialog; -namespace Artemis.UI.Screens.Dialogs +namespace Artemis.UI.Shared.Screens.Dialogs { public class ConfirmDialogViewModel : DialogViewModelBase { diff --git a/src/Artemis.UI.Shared/Screens/Dialogs/ExceptionDialogView.xaml b/src/Artemis.UI.Shared/Screens/Dialogs/ExceptionDialogView.xaml new file mode 100644 index 000000000..96efaa35c --- /dev/null +++ b/src/Artemis.UI.Shared/Screens/Dialogs/ExceptionDialogView.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + +