mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
Debugger - Added the ability to copy data model paths
This commit is contained in:
parent
c4010b5481
commit
94826e8598
@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.UI.Shared.Services;
|
||||
@ -194,6 +195,12 @@ namespace Artemis.UI.Shared
|
||||
IsMatchingFilteredTypes = filteredTypes.Any(t => t == type || t == typeof(Enum) && type.IsEnum);
|
||||
}
|
||||
|
||||
public void CopyPath()
|
||||
{
|
||||
if (Path != null)
|
||||
Clipboard.SetText(Path);
|
||||
}
|
||||
|
||||
internal virtual int GetChildDepth()
|
||||
{
|
||||
return 0;
|
||||
|
||||
@ -73,6 +73,13 @@
|
||||
<TreeView.Resources>
|
||||
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource MaterialDesignTreeViewItem}">
|
||||
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="ContextMenu">
|
||||
<Setter.Value>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="Copy path" Command="{s:Action CopyPath}" CommandParameter="{Binding}" />
|
||||
</ContextMenu>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<HierarchicalDataTemplate DataType="{x:Type dataModel:DataModelPropertiesViewModel}" ItemsSource="{Binding Children}">
|
||||
|
||||
@ -81,6 +81,11 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
}
|
||||
}
|
||||
|
||||
public void CopyPath(DataModelVisualizationViewModel viewModel)
|
||||
{
|
||||
viewModel.CopyPath();
|
||||
}
|
||||
|
||||
#region Overrides of Screen
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user