95 lines
5.7 KiB
Plaintext
95 lines
5.7 KiB
Plaintext
![]() |
<!--
|
||
|
Copyright (C) 2014-2019 de4dot@gmail.com
|
||
|
|
||
|
This file is part of dnSpy
|
||
|
|
||
|
dnSpy is free software: you can redistribute it and/or modify
|
||
|
it under the terms of the GNU General Public License as published by
|
||
|
the Free Software Foundation, either version 3 of the License, or
|
||
|
(at your option) any later version.
|
||
|
|
||
|
dnSpy is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
GNU General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with dnSpy. If not, see <http://www.gnu.org/licenses/>.
|
||
|
-->
|
||
|
<winlocal:WindowBase x:Class="dnSpy.AsmEditor.DnlibDialogs.MemberPickerDlg"
|
||
|
x:ClassModifier="internal"
|
||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:mvvmvc="clr-namespace:dnSpy.Contracts.MVVM.Converters;assembly=dnSpy.Contracts.DnSpy"
|
||
|
xmlns:mvvm="clr-namespace:dnSpy.Contracts.MVVM;assembly=dnSpy.Contracts.DnSpy"
|
||
|
xmlns:vc="clr-namespace:dnSpy.AsmEditor.DnlibDialogs.Converters"
|
||
|
xmlns:winlocal="clr-namespace:dnSpy.Contracts.Controls;assembly=dnSpy.Contracts.DnSpy"
|
||
|
xmlns:img="clr-namespace:dnSpy.Contracts.Images;assembly=dnSpy.Contracts.DnSpy"
|
||
|
xmlns:p="clr-namespace:dnSpy.AsmEditor.Properties"
|
||
|
Height="500" Width="600"
|
||
|
Title="{Binding Title}"
|
||
|
Style="{StaticResource DialogWindowStyle}" WindowStartupLocation="CenterOwner"
|
||
|
MinHeight="200" MinWidth="400">
|
||
|
<winlocal:WindowBase.Resources>
|
||
|
<mvvmvc:NegateBooleanConverter x:Key="NegateBooleanConverter" />
|
||
|
<vc:BooleanToThicknessConverter x:Key="BooleanToThicknessConverter" />
|
||
|
<vc:BooleanToGridrowLengthConverter x:Key="BooleanToGridrowLengthConverter" />
|
||
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||
|
<ControlTemplate x:Key="noRedBorderOnValidationError">
|
||
|
<!-- Don't show the red border when the user hasn't selected a valid node -->
|
||
|
<AdornedElementPlaceholder/>
|
||
|
</ControlTemplate>
|
||
|
</winlocal:WindowBase.Resources>
|
||
|
<Grid FocusManager.FocusedElement="{Binding ElementName=searchTextBox}">
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto" />
|
||
|
<RowDefinition Height="{Binding HasSearchText, Converter={StaticResource BooleanToGridrowLengthConverter}, ConverterParameter=1}" />
|
||
|
<RowDefinition Height="*" />
|
||
|
<RowDefinition Height="Auto" />
|
||
|
</Grid.RowDefinitions>
|
||
|
|
||
|
<Grid Grid.Row="0" Margin="5">
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="Auto" />
|
||
|
<ColumnDefinition Width="*" />
|
||
|
<ColumnDefinition Width="Auto" />
|
||
|
<ColumnDefinition Width="Auto" />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto" />
|
||
|
</Grid.RowDefinitions>
|
||
|
|
||
|
<Label Grid.Column="0" Content="{x:Static p:dnSpy_AsmEditor_Resources.PickMember_Search}" Target="{Binding ElementName=searchTextBox}"/>
|
||
|
<TextBox Grid.Column="1" Margin="5 0 0 0" Name="searchTextBox" Text="{Binding SearchText, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
<Button Grid.Column="2" Margin="5 0 0 0" Focusable="False" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding OpenCommand}" ToolTip="{x:Static p:dnSpy_AsmEditor_Resources.PickMember_OpenAsmToolTip}" Visibility="{Binding CanOpenAssembly, Converter={StaticResource BooleanToVisibilityConverter}}" img:DsImage.BackgroundBrush="{DynamicResource DialogWindowBackground}">
|
||
|
<img:DsImage ImageReference="{x:Static img:DsImages.OpenFolder}"/>
|
||
|
</Button>
|
||
|
<ComboBox Grid.Column="3" Margin="5 0 0 0" DisplayMemberPath="UniqueNameUI" Width="100" ItemsSource="{Binding AllLanguages}" SelectedItem="{Binding Language}" VerticalContentAlignment="Center" />
|
||
|
</Grid>
|
||
|
|
||
|
<ListBox Grid.Row="1"
|
||
|
Name="listBox"
|
||
|
Margin="5 0 5 5"
|
||
|
HorizontalContentAlignment="Stretch"
|
||
|
SelectionMode="Single"
|
||
|
VirtualizingStackPanel.IsVirtualizing="True"
|
||
|
VirtualizingStackPanel.VirtualizationMode="Recycling"
|
||
|
BorderThickness="1"
|
||
|
mvvm:AutomationPeerMemoryLeakWorkaround.Initialize="True"
|
||
|
img:DsImage.BackgroundBrush="{Binding Background, RelativeSource={RelativeSource Self}}"
|
||
|
Validation.ErrorTemplate="{StaticResource noRedBorderOnValidationError}"
|
||
|
ItemsSource="{Binding SearchResultsCollectionView}"
|
||
|
SelectedItem="{Binding SearchResult, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}"/>
|
||
|
|
||
|
<ContentPresenter Grid.Row="2" Name="cpTreeView" Margin="5 0 5 5" />
|
||
|
|
||
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5 0 5 5">
|
||
|
<Button Content="{x:Static p:dnSpy_AsmEditor_Resources.Button_OK}" IsEnabled="{Binding HasError, Converter={StaticResource NegateBooleanConverter}}" IsDefault="True" Style="{StaticResource DialogButton}" Margin="0,0,5,0" Click="okButton_Click" />
|
||
|
<Button Content="{x:Static p:dnSpy_AsmEditor_Resources.Button_Cancel}" IsCancel="True" Style="{StaticResource DialogButton}" />
|
||
|
</StackPanel>
|
||
|
</Grid>
|
||
|
</winlocal:WindowBase>
|