Browse Source

First part to support copy from string table

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

5
ILSpy/Controls/ResourceStringTable.xaml

@ -1,6 +1,11 @@
<?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">
<UserControl.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy"
Executed="ExecuteCopy"
CanExecute="CanExecuteCopy"/>
</UserControl.CommandBindings>
<ListView
Name="resourceListView">
<ListView.View>

13
ILSpy/Controls/ResourceStringTable.xaml.cs

@ -32,5 +32,18 @@ namespace ICSharpCode.ILSpy.Controls
MaxHeight = MainWindow.Instance.mainPane.ActualHeight-100;
resourceListView.ItemsSource = strings;
}
void ExecuteCopy(object sender, ExecutedRoutedEventArgs args)
{
if (resourceListView.SelectionMode == SelectionMode.Single)
return;
else if (resourceListView.SelectionMode == SelectionMode.Multiple)
return;
}
void CanExecuteCopy(object sender, CanExecuteRoutedEventArgs args)
{
args.CanExecute = true;
}
}
}
Loading…
Cancel
Save