Browse Source

Merge pull request #1690 from miloush/master

Add Assembly column to search results
pull/1707/head
Siegfried Pammer 7 years ago committed by GitHub
parent
commit
1b1d77967b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      ILSpy/Properties/Resources.Designer.cs
  2. 3
      ILSpy/Properties/Resources.resx
  3. 1
      ILSpy/Search/AbstractSearchStrategy.cs
  4. 7
      ILSpy/Search/SearchPane.cs
  5. 14
      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

@ -763,4 +763,7 @@ Are you sure you want to continue?</value> @@ -763,4 +763,7 @@ Are you sure you want to continue?</value>
<data name="Show_publiconlyTypesMembers" xml:space="preserve">
<value>Show only _public types and members</value>
</data>
<data name="Assembly" xml:space="preserve">
<value>Assembly</value>
</data>
</root>

1
ILSpy/Search/AbstractSearchStrategy.cs

@ -159,6 +159,7 @@ namespace ICSharpCode.ILSpy.Search @@ -159,6 +159,7 @@ namespace ICSharpCode.ILSpy.Search
Fitness = CalculateFitness(item),
Name = GetLanguageSpecificName(item),
Location = declaringType != null ? language.TypeToString(declaringType, includeNamespace: true) : item.Namespace,
Assembly = item.ParentModule.FullAssemblyName,
ToolTip = item.ParentModule.PEFile?.FileName
};
}

7
ILSpy/Search/SearchPane.cs

@ -381,6 +381,7 @@ namespace ICSharpCode.ILSpy @@ -381,6 +381,7 @@ 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; }
@ -403,6 +404,12 @@ namespace ICSharpCode.ILSpy @@ -403,6 +404,12 @@ namespace ICSharpCode.ILSpy
}
}
public ImageSource AssemblyImage {
get {
return Images.Assembly;
}
}
public override string ToString()
{
return Name;

14
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">
@ -60,7 +60,17 @@ @@ -60,7 +60,17 @@
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Height="16" Margin="4,0,4,0" Width="16" Source="{Binding LocationImage}" />
<TextBlock Text="{Binding Location}" TextTrimming="CharacterEllipsis" />
<TextBlock Text="{Binding Location}" ToolTip="{Binding Location}" TextTrimming="CharacterEllipsis" />
</StackPanel>
</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}" ToolTip="{Binding Assembly}" TextTrimming="CharacterEllipsis" />
</StackPanel>
</DataTemplate>
</controls:SortableGridViewColumn.CellTemplate>

Loading…
Cancel
Save