Browse Source

Add Assembly column to search results

pull/1690/head
Jan Kučera 6 years ago
parent
commit
7de2a069a1
  1. 9
      ILSpy/Properties/Resources.Designer.cs
  2. 3
      ILSpy/Properties/Resources.resx
  3. 2
      ILSpy/Search/AbstractSearchStrategy.cs
  4. 2
      ILSpy/Search/SearchPane.cs
  5. 12
      ILSpy/Search/SearchPane.xaml

9
ILSpy/Properties/Resources.Designer.cs generated

@ -303,6 +303,15 @@ namespace ICSharpCode.ILSpy.Properties { @@ -303,6 +303,15 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Assembly.
/// </summary>
public static string Assembly {
get {
return ResourceManager.GetString("Assembly", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The directory is not empty. File will be overwritten.
///Are you sure you want to continue?.

3
ILSpy/Properties/Resources.resx

@ -754,4 +754,7 @@ Are you sure you want to continue?</value> @@ -754,4 +754,7 @@ Are you sure you want to continue?</value>
<data name="DecompilerSettings.RemoveDeadStores" xml:space="preserve">
<value>Remove dead stores (use with caution!)</value>
</data>
<data name="Assembly" xml:space="preserve">
<value>Assembly</value>
</data>
</root>

2
ILSpy/Search/AbstractSearchStrategy.cs

@ -161,6 +161,8 @@ namespace ICSharpCode.ILSpy.Search @@ -161,6 +161,8 @@ namespace ICSharpCode.ILSpy.Search
Name = GetLanguageSpecificName(item),
LocationImage = declaringType != null ? TypeTreeNode.GetIcon(declaringType) : Images.Namespace,
Location = declaringType != null ? language.TypeToString(declaringType, includeNamespace: true) : item.Namespace,
AssemblyImage = Images.Assembly,
Assembly = item.ParentModule.FullAssemblyName,
ToolTip = item.ParentModule.PEFile?.FileName
};
}

2
ILSpy/Search/SearchPane.cs

@ -378,11 +378,13 @@ namespace ICSharpCode.ILSpy @@ -378,11 +378,13 @@ namespace ICSharpCode.ILSpy
public IEntity Member { get; set; }
public float Fitness { get; set; }
public string Assembly { get; set; }
public string Location { get; set; }
public string Name { get; set; }
public object ToolTip { get; set; }
public ImageSource Image { get; set; }
public ImageSource LocationImage { get; set; }
public ImageSource AssemblyImage { get; set; }
public override string ToString()
{

12
ILSpy/Search/SearchPane.xaml

@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
<ProgressBar x:Name="searchProgressBar" Grid.Row="1" BorderThickness="0" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<ListView Grid.Row="2" BorderThickness="0,1,0,0" HorizontalContentAlignment="Stretch" KeyDown="ListBox_KeyDown"
MouseDoubleClick="ListBox_MouseDoubleClick" Name="listBox" SelectionMode="Single" controls:SortableGridViewColumn.SortMode="Automatic"
controls:GridViewColumnAutoSize.AutoWidth="50%;50%" BorderBrush="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
controls:GridViewColumnAutoSize.AutoWidth="40%;40%;20%" BorderBrush="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
ItemsSource="{Binding Results, ElementName=self}">
<ListView.View>
<GridView AllowsColumnReorder="False">
@ -65,6 +65,16 @@ @@ -65,6 +65,16 @@
</DataTemplate>
</controls:SortableGridViewColumn.CellTemplate>
</controls:SortableGridViewColumn>
<controls:SortableGridViewColumn Header="{x:Static properties:Resources.Assembly}" SortBy="Assembly">
<controls:SortableGridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Height="16" Margin="4,0,4,0" Width="16" Source="{Binding AssemblyImage}" />
<TextBlock Text="{Binding Assembly}" TextTrimming="CharacterEllipsis" />
</StackPanel>
</DataTemplate>
</controls:SortableGridViewColumn.CellTemplate>
</controls:SortableGridViewColumn>
</GridView>
</ListView.View>
</ListView>

Loading…
Cancel
Save