|
|
|
@ -30,17 +30,25 @@ namespace ICSharpCode.ILSpy.Controls
@@ -30,17 +30,25 @@ namespace ICSharpCode.ILSpy.Controls
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ResourceObjectTable : UserControl |
|
|
|
|
{ |
|
|
|
|
public ResourceObjectTable(IEnumerable resources,Size maxSize) |
|
|
|
|
{ |
|
|
|
|
public ResourceObjectTable(IEnumerable resources, ContentPresenter contentPresenter) |
|
|
|
|
{ |
|
|
|
|
InitializeComponent(); |
|
|
|
|
// set size to fit decompiler window
|
|
|
|
|
// TODO: there should be a more transparent way to do this
|
|
|
|
|
Width = maxSize.Width; |
|
|
|
|
MaxHeight = maxSize.Height; |
|
|
|
|
resourceListView.ItemsSource = resources; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ExecuteCopy(object sender, ExecutedRoutedEventArgs args) |
|
|
|
|
contentPresenter.SizeChanged += OnParentSizeChanged; |
|
|
|
|
Width = contentPresenter.ActualWidth - 45; |
|
|
|
|
MaxHeight = contentPresenter.ActualHeight; |
|
|
|
|
resourceListView.ItemsSource = resources; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void OnParentSizeChanged(object sender, SizeChangedEventArgs e) |
|
|
|
|
{ |
|
|
|
|
if (e.WidthChanged) |
|
|
|
|
Width = e.NewSize.Width - 45; |
|
|
|
|
if (e.HeightChanged) |
|
|
|
|
MaxHeight = e.NewSize.Height; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ExecuteCopy(object sender, ExecutedRoutedEventArgs args) |
|
|
|
|
{ |
|
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
|
foreach (var item in resourceListView.SelectedItems) |
|
|
|
|