From e63cbb6175ce5e719a3d8bcbf40f53df58abc19e Mon Sep 17 00:00:00 2001 From: Ronny Klier Date: Sun, 26 Jun 2011 23:57:03 +0200 Subject: [PATCH] Support copy entries from resource string table --- ILSpy/Controls/ResourceStringTable.xaml | 5 +++-- ILSpy/Controls/ResourceStringTable.xaml.cs | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ILSpy/Controls/ResourceStringTable.xaml b/ILSpy/Controls/ResourceStringTable.xaml index 925b0367c..e5782a33b 100644 --- a/ILSpy/Controls/ResourceStringTable.xaml +++ b/ILSpy/Controls/ResourceStringTable.xaml @@ -1,13 +1,14 @@  + x:Class="ICSharpCode.ILSpy.Controls.ResourceStringTable" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + Name="resourceListView" + SelectionMode="Extended"> diff --git a/ILSpy/Controls/ResourceStringTable.xaml.cs b/ILSpy/Controls/ResourceStringTable.xaml.cs index 347667228..b3aab0049 100644 --- a/ILSpy/Controls/ResourceStringTable.xaml.cs +++ b/ILSpy/Controls/ResourceStringTable.xaml.cs @@ -35,10 +35,12 @@ namespace ICSharpCode.ILSpy.Controls void ExecuteCopy(object sender, ExecutedRoutedEventArgs args) { - if (resourceListView.SelectionMode == SelectionMode.Single) - return; - else if (resourceListView.SelectionMode == SelectionMode.Multiple) - return; + StringBuilder sb = new StringBuilder(); + foreach (var item in resourceListView.SelectedItems) + { + sb.AppendLine(item.ToString()); + } + Clipboard.SetText(sb.ToString()); } void CanExecuteCopy(object sender, CanExecuteRoutedEventArgs args)