Profile editor - Added adapt menu option

Profile editor - Implement menu title casing
Device properties - Display LED ID even if missing from enum
This commit is contained in:
Robert committed 2021-06-30 17:07:44 +02:00
1 parent 1e3121a4df
commit ab754942d5
5 files changed
+63 -29

No files matched your search

@@ -60,21 +60,24 @@
s:View.ActionTarget="{Binding ProfileTreeViewModel}" />
</MenuItem>
<Separator />
<MenuItem Header="View properties"
<MenuItem Header="View Properties"
Icon="{materialDesign:PackIcon Kind=Settings}"
Command="{s:Action ViewProperties}"/>
<MenuItem Header="Suspend profile"
<MenuItem Header="Adapt Profile"
Icon="{materialDesign:PackIcon Kind=Magic}"
Command="{s:Action AdaptProfile}"/>
<MenuItem Header="Suspend Profile"
IsCheckable="True"
IsChecked="{Binding ProfileConfiguration.IsSuspended}" />
<Separator />
<MenuItem Header="Export profile"
<MenuItem Header="Export Profile"
Icon="{materialDesign:PackIcon Kind=Export}"
Command="{s:Action ExportProfile}" />
<MenuItem Header="Duplicate profile"
<MenuItem Header="Duplicate Profile"
Icon="{materialDesign:PackIcon Kind=ContentDuplicate}"
Command="{s:Action DuplicateProfile}" />
<Separator />
<MenuItem Header="Delete profile"
<MenuItem Header="Delete Profile"
Icon="{materialDesign:PackIcon Kind=Trash}"
Command="{s:Action DeleteProfile}" />
</MenuItem>
@@ -95,20 +98,20 @@
InputGestureText="Ctrl+V" />
</MenuItem>
<MenuItem Header="_Scripting" IsEnabled="False">
<MenuItem Header="_Profile scripts"
<MenuItem Header="_Profile Scripts"
Icon="{materialDesign:PackIcon Kind=BookEdit}"
Command="{s:Action OpenProfileScripts}"/>
<MenuItem Header="_Layer scripts"
<MenuItem Header="_Layer Scripts"
Icon="{materialDesign:PackIcon Kind=Layers}"
IsEnabled="{Binding HasSelectedElement}"
Command="{s:Action OpenLayerScripts}"/>
<MenuItem Header="_Property scripts"
<MenuItem Header="_Property Scripts"
Icon="{materialDesign:PackIcon Kind=FormTextbox}"
IsEnabled="{Binding HasSelectedElement}"
Command="{s:Action OpenLayerPropertyScripts}"/>
</MenuItem>
<MenuItem Header="_Help">
<MenuItem Header="Artemis wiki"
<MenuItem Header="Artemis Wiki"
Icon="{materialDesign:PackIcon Kind=BookEdit}"
Command="{s:Action OpenUrl}"
CommandParameter="https://wiki.artemis-rgb.com/" />
@@ -121,7 +124,7 @@
Icon="{materialDesign:PackIcon Kind=Layers}"
Command="{s:Action OpenUrl}"
CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/layers" />
<MenuItem Header="Display conditions"
<MenuItem Header="Display Conditions"
Icon="{materialDesign:PackIcon Kind=NotEqual}"
Command="{s:Action OpenUrl}"
CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/conditions" />
@@ -129,7 +132,7 @@
Icon="{materialDesign:PackIcon Kind=Stopwatch}"
Command="{s:Action OpenUrl}"
CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/timeline" />
<MenuItem Header="Data bindings"
<MenuItem Header="Data Bindings"
Icon="{materialDesign:PackIcon Kind=VectorLink}"
Command="{s:Action OpenUrl}"
CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/data-bindings" />
@@ -138,11 +141,11 @@
Command="{s:Action OpenUrl}"
CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/scripting" />
<Separator />
<MenuItem Header="Report a bug"
<MenuItem Header="Report a Bug"
Icon="{materialDesign:PackIcon Kind=Github}"
Command="{s:Action OpenUrl}"
CommandParameter="https://github.com/Artemis-RGB/Artemis/issues" />
<MenuItem Header="Get help on Discord"
<MenuItem Header="Get Help on Discord"
Icon="{materialDesign:PackIcon Kind=Discord}"
Command="{s:Action OpenUrl}"
CommandParameter="https://discord.gg/S3MVaC9" />
@@ -152,7 +155,7 @@
<Button Grid.Row="0"
Grid.Column="2"
Style="{StaticResource MaterialDesignIconForegroundButton}"
ToolTip="Open debugger"
ToolTip="Open Debugger"
Margin="10 -4 10 0"
Width="34"
Height="34"
@@ -126,20 +126,6 @@ namespace Artemis.UI.Screens.ProfileEditor
set => SetAndNotify(ref _elementPropertiesWidth, value);
}
public async Task AdaptActiveProfile()
{
if (_profileEditorService.SelectedProfileConfiguration?.Profile == null)
return;
if (!await DialogService.ShowConfirmDialog(
"Adapt profile",
"Are you sure you want to adapt the profile to your current surface? Layer assignments may change."
))
return;
_profileService.AdaptProfile(_profileEditorService.SelectedProfileConfiguration.Profile);
}
public void Undo()
{
// Expanded status is also undone because undoing works a bit crude, that's annoying
@@ -248,6 +234,20 @@ namespace Artemis.UI.Screens.ProfileEditor
{
await _sidebarVmFactory.SidebarProfileConfigurationViewModel(_profileEditorService.SelectedProfileConfiguration).ViewProperties();
}
public async Task AdaptProfile()
{
if (_profileEditorService.SelectedProfileConfiguration?.Profile == null)
return;
if (!await DialogService.ShowConfirmDialog(
"Adapt profile",
"Are you sure you want to adapt the profile to your current surface? Layer assignments may change."
))
return;
_profileService.AdaptProfile(_profileEditorService.SelectedProfileConfiguration.Profile);
}
public void DuplicateProfile()
{