Browse Source

Support copy entries from resource string table

pull/226/head
Ronny Klier 14 years ago
parent
commit
e63cbb6175
  1. 5
      ILSpy/Controls/ResourceStringTable.xaml
  2. 10
      ILSpy/Controls/ResourceStringTable.xaml.cs

5
ILSpy/Controls/ResourceStringTable.xaml

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<UserControl
x:Class="ICSharpCode.ILSpy.Controls.ResourceStringTable" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls">
x:Class="ICSharpCode.ILSpy.Controls.ResourceStringTable" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy"
Executed="ExecuteCopy"
CanExecute="CanExecuteCopy"/>
</UserControl.CommandBindings>
<ListView
Name="resourceListView">
Name="resourceListView"
SelectionMode="Extended">
<ListView.View>
<GridView
AllowsColumnReorder="False">

10
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)

Loading…
Cancel
Save