mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Device properties - Implemented LED mappings tab
Device properties - Tweak design
This commit is contained in:
1 parent
78479c0fa2
commit
a06bc68046
21 files changed
+295
-129
No files matched your search
@@ -35,7 +35,7 @@
|
||||
<avalonia:MaterialIcon Kind="BookEdit" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Adapt Profile" Command="{Binding AdaptProfile}">
|
||||
<MenuItem Header="Adapt Profile" Command="{CompiledBinding AdaptProfile}">
|
||||
<MenuItem.Icon>
|
||||
<avalonia:MaterialIcon Kind="Magic" />
|
||||
</MenuItem.Icon>
|
||||
|
||||
@@ -55,6 +55,7 @@ public class MenuBarViewModel : ActivatableViewModelBase
|
||||
AddFolder = ReactiveCommand.Create(ExecuteAddFolder);
|
||||
AddLayer = ReactiveCommand.Create(ExecuteAddLayer);
|
||||
ViewProperties = ReactiveCommand.CreateFromTask(ExecuteViewProperties, this.WhenAnyValue(vm => vm.ProfileConfiguration).Select(c => c != null));
|
||||
AdaptProfile = ReactiveCommand.CreateFromTask(ExecuteAdaptProfile, this.WhenAnyValue(vm => vm.ProfileConfiguration).Select(c => c != null));
|
||||
ToggleSuspended = ReactiveCommand.Create(ExecuteToggleSuspended, this.WhenAnyValue(vm => vm.ProfileConfiguration).Select(c => c != null));
|
||||
DeleteProfile = ReactiveCommand.CreateFromTask(ExecuteDeleteProfile, this.WhenAnyValue(vm => vm.ProfileConfiguration).Select(c => c != null));
|
||||
ExportProfile = ReactiveCommand.CreateFromTask(ExecuteExportProfile, this.WhenAnyValue(vm => vm.ProfileConfiguration).Select(c => c != null));
|
||||
@@ -68,6 +69,7 @@ public class MenuBarViewModel : ActivatableViewModelBase
|
||||
public ReactiveCommand<Unit, Unit> AddLayer { get; }
|
||||
public ReactiveCommand<Unit, Unit> ToggleSuspended { get; }
|
||||
public ReactiveCommand<Unit, Unit> ViewProperties { get; }
|
||||
public ReactiveCommand<Unit,Unit> AdaptProfile { get; }
|
||||
public ReactiveCommand<Unit, Unit> DeleteProfile { get; }
|
||||
public ReactiveCommand<Unit, Unit> ExportProfile { get; }
|
||||
public ReactiveCommand<Unit, Unit> DuplicateProfile { get; }
|
||||
@@ -121,6 +123,16 @@ public class MenuBarViewModel : ActivatableViewModelBase
|
||||
("profileConfiguration", ProfileConfiguration)
|
||||
);
|
||||
}
|
||||
private async Task ExecuteAdaptProfile()
|
||||
{
|
||||
if (ProfileConfiguration?.Profile == null)
|
||||
return;
|
||||
|
||||
if (!await _windowService.ShowConfirmContentDialog("Adapt profile", "Are you sure you want to adapt the profile to your current surface? Layer assignments may change."))
|
||||
return;
|
||||
|
||||
_profileService.AdaptProfile(ProfileConfiguration.Profile);
|
||||
}
|
||||
|
||||
private void ExecuteToggleSuspended()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user