From de6f41c9a62e41b46899556bd696d6cbd6b83900 Mon Sep 17 00:00:00 2001 From: Jan Michal Date: Mon, 5 Feb 2024 06:03:33 +0100 Subject: [PATCH] Copy file path and show in file explorer implemented --- DependenciesGui/DependencyWindow.xaml | 12 ++++++++++-- DependenciesGui/DependencyWindow.xaml.cs | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/DependenciesGui/DependencyWindow.xaml b/DependenciesGui/DependencyWindow.xaml index 591cef59..3b5961aa 100644 --- a/DependenciesGui/DependencyWindow.xaml +++ b/DependenciesGui/DependencyWindow.xaml @@ -50,6 +50,8 @@ + + + IsEnabled="True" /> + + + diff --git a/DependenciesGui/DependencyWindow.xaml.cs b/DependenciesGui/DependencyWindow.xaml.cs index fe4599a5..740ab1fb 100755 --- a/DependenciesGui/DependencyWindow.xaml.cs +++ b/DependenciesGui/DependencyWindow.xaml.cs @@ -1346,6 +1346,28 @@ private void DoFindModuleInList_Executed(object sender, ExecutedRoutedEventArgs } } + private void CopyFilePath_Executed(object sender, ExecutedRoutedEventArgs e) + { + ModuleTreeViewItem Source = e.Source as ModuleTreeViewItem; + String SelectedModuleName = Source.GetTreeNodeHeaderName(Dependencies.Properties.Settings.Default.FullPath); + if (Source == null) + return; + + Clipboard.SetText(SelectedModuleName); + } + + private void OpenInExplorer_Executed(object sender, ExecutedRoutedEventArgs e) + { + ModuleTreeViewItem Source = e.Source as ModuleTreeViewItem; + if (Source == null) + return; + + String SelectedModuleName = Source.GetTreeNodeHeaderName(Dependencies.Properties.Settings.Default.FullPath); + String commandParameter = "/select,\"" + SelectedModuleName + "\""; + + Process.Start("explorer.exe", commandParameter); + } + private void ExpandAllParentNode(ModuleTreeViewItem Item) { if (Item != null)