mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Profile import - Fixed and streamlined functionality
This commit is contained in:
1 parent
a5455c26d6
commit
8294cc306a
4 files changed
+24
-5
No files matched your search
@@ -6,6 +6,7 @@ using System.Windows;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Extensions;
|
||||
using Artemis.UI.Screens.ProfileEditor.Dialogs;
|
||||
using Artemis.UI.Screens.ProfileEditor.DisplayConditions;
|
||||
using Artemis.UI.Screens.ProfileEditor.LayerProperties;
|
||||
@@ -58,7 +59,7 @@ namespace Artemis.UI.Screens.ProfileEditor
|
||||
DialogService = dialogService;
|
||||
|
||||
Profiles = new BindableCollection<ProfileDescriptor>();
|
||||
|
||||
|
||||
// Populate the panels
|
||||
ProfileViewModel = profileViewModel;
|
||||
ProfileTreeViewModel = profileTreeViewModel;
|
||||
@@ -190,10 +191,16 @@ namespace Artemis.UI.Screens.ProfileEditor
|
||||
|
||||
public async Task ImportProfile()
|
||||
{
|
||||
await DialogService.ShowDialog<ProfileImportViewModel>(new Dictionary<string, object>
|
||||
var result = await DialogService.ShowDialog<ProfileImportViewModel>(new Dictionary<string, object>
|
||||
{
|
||||
{"profileModule", Module}
|
||||
});
|
||||
|
||||
if (result != null && result is ProfileDescriptor descriptor)
|
||||
{
|
||||
Profiles.Add(descriptor);
|
||||
Profiles.Sort(p => p.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
|
||||
Reference in new issue
Block a user