mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
6.2 KiB
171 lines
6.2 KiB
<?xml version="1.0" encoding="utf-8"?> |
|
<Window |
|
x:Class="ICSharpCode.ILSpy.MainWindow" |
|
x:ClassModifier="internal" |
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tv="clr-namespace:ICSharpCode.TreeView;assembly=ICSharpCode.TreeView" |
|
xmlns:local="clr-namespace:ICSharpCode.ILSpy" xmlns:textView="clr-namespace:ICSharpCode.ILSpy.TextView" |
|
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" |
|
xmlns:routedCommands="clr-namespace:ICSharpCode.ILSpy.Commands" |
|
Title="ILSpy" |
|
MinWidth="250" |
|
MinHeight="200" |
|
UseLayoutRounding="True" |
|
TextOptions.TextFormattingMode="Display" |
|
FocusManager.FocusedElement="{Binding ElementName=treeView}" |
|
> |
|
<Window.Resources> |
|
<ResourceDictionary> |
|
<ResourceDictionary.MergedDictionaries> |
|
<ResourceDictionary Source="Controls/SearchBoxStyle.xaml" /> |
|
</ResourceDictionary.MergedDictionaries> |
|
</ResourceDictionary> |
|
</Window.Resources> |
|
<Window.CommandBindings> |
|
<CommandBinding |
|
Command="routedCommands:RoutedUICommands.AttachToProcess" |
|
Executed="AttachToProcessExecuted" /> |
|
<CommandBinding |
|
Command="routedCommands:RoutedUICommands.DetachFromProcess" |
|
Executed="DetachFromProcessExecuted" /> |
|
<CommandBinding |
|
Command="Open" |
|
Executed="OpenCommandExecuted" /> |
|
<CommandBinding |
|
Command="Refresh" |
|
Executed="RefreshCommandExecuted" /> |
|
</Window.CommandBindings> |
|
<DockPanel> |
|
<!-- Main menu --> |
|
<Menu DockPanel.Dock="Top"> |
|
<MenuItem Header="_File"> |
|
<MenuItem Command="Open"> |
|
<MenuItem.Icon> |
|
<Image Width="16" Height="16" Source="Images/Open.png" /> |
|
</MenuItem.Icon> |
|
</MenuItem> |
|
<MenuItem Header="Open from _GAC" Click="OpenFromGac_Click" /> |
|
<MenuItem Command="Refresh" Header="_Reload"> |
|
<MenuItem.Icon> |
|
<Image Width="16" Height="16" Source="Images/Refresh.png" /> |
|
</MenuItem.Icon> |
|
</MenuItem> |
|
<Separator /> |
|
<MenuItem Header="_Save Code" Click="saveCode_Click"> |
|
<MenuItem.Icon> |
|
<Image Width="16" Height="16" Source="Images/SaveFile.png" /> |
|
</MenuItem.Icon> |
|
</MenuItem> |
|
<Separator /> |
|
<MenuItem Header="E_xit" Click="ExitClick" /> |
|
</MenuItem> |
|
<MenuItem Header="_View"> |
|
<MenuItem Header="Show _internal types and members" IsCheckable="True" IsChecked="{Binding FilterSettings.ShowInternalApi}"> |
|
<MenuItem.Icon> |
|
<Image Width="16" Height="16" Source="Images/PrivateInternal.png" /> |
|
</MenuItem.Icon> |
|
</MenuItem> |
|
</MenuItem> |
|
<MenuItem Header="_Debugger"> |
|
<MenuItem x:Name="AttachMenuItem" Header="Attach to _running application" Command="routedCommands:RoutedUICommands.AttachToProcess"> |
|
<MenuItem.Icon> |
|
<Image Width="16" Height="16" Source="Images/bug.png" /> |
|
</MenuItem.Icon> |
|
</MenuItem> |
|
<MenuItem x:Name="DetachMenuItem" IsEnabled="False" Header="Detach from running application" Command="routedCommands:RoutedUICommands.DetachFromProcess"/> |
|
</MenuItem> |
|
<MenuItem Header="_Help"> |
|
<MenuItem Header="_About" Click="AboutClick" /> |
|
</MenuItem> |
|
</Menu> |
|
<!-- ToolBar --> |
|
<ToolBar |
|
Name="toolBar" |
|
DockPanel.Dock="Top"> |
|
<ToolBar.Resources> |
|
<!-- Make images transparent if menu command is disabled --> |
|
<Style TargetType="{x:Type Image}"> |
|
<Style.Triggers> |
|
<DataTrigger |
|
Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" |
|
Value="False"> |
|
<Setter Property="Opacity" Value="0.30" /> |
|
</DataTrigger> |
|
</Style.Triggers> |
|
</Style> |
|
</ToolBar.Resources> |
|
<Button Command="Open" ToolTip="Open"> |
|
<Image Width="16" Height="16" Source="Images/Open.png" /> |
|
</Button> |
|
<Button Command="Refresh" ToolTip="Reload all assemblies"> |
|
<Image Width="16" Height="16" Source="Images/Refresh.png" /> |
|
</Button> |
|
<Separator /> |
|
<CheckBox IsChecked="{Binding FilterSettings.ShowInternalApi}" ToolTip="Show internal types and members"> |
|
<Image Width="16" Height="16" Source="Images/PrivateInternal.png" /> |
|
</CheckBox> |
|
<Separator /> |
|
<ComboBox Name="languageComboBox" DisplayMemberPath="Name" Width="100" |
|
ItemsSource="{x:Static local:Languages.AllLanguages}" |
|
SelectedItem="{Binding FilterSettings.Language}" /> |
|
<Separator /> |
|
<Button x:Name="AttachButton" Command="routedCommands:RoutedUICommands.AttachToProcess" ToolTip="Attach to running process..."> |
|
<Image Width="16" Height="16" Source="Images/bug.png" /> |
|
</Button> |
|
</ToolBar> |
|
<!-- Main grid separating left pane (treeView) from main pane (textEditor) --> |
|
<Grid> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition |
|
Name="leftColumn" |
|
MinWidth="100" |
|
Width="0.4*" /> |
|
<ColumnDefinition |
|
Width="3" /> |
|
<ColumnDefinition |
|
Name="rightColumn" |
|
MinWidth="100" |
|
Width="0.6*" /> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition |
|
Height="*" /> |
|
</Grid.RowDefinitions> |
|
<!-- Left pane: Search bar + Tree View --> |
|
<DockPanel> |
|
<!-- Search bar --> |
|
<controls:SearchBox DockPanel.Dock="Top" WatermarkText="Search" WatermarkColor="Gray" ToolTip="Search" |
|
Text="{Binding FilterSettings.SearchTerm, UpdateSourceTrigger=PropertyChanged}" /> |
|
<!-- Tree View of assemblies and classes --> |
|
<tv:SharpTreeView |
|
Name="treeView" |
|
SelectionChanged="TreeView_SelectionChanged" |
|
ShowRoot="False" |
|
AllowDropOrder="True" |
|
AllowDrop="True" /> |
|
</DockPanel> |
|
<GridSplitter |
|
Grid.ZIndex="1" |
|
Grid.Column="1" |
|
Margin="-2,0" |
|
BorderThickness="2,0" |
|
BorderBrush="Transparent" |
|
HorizontalAlignment="Stretch" /> |
|
<!-- Right pane: Text Editor --> |
|
<DockPanel |
|
Grid.Column="2"> |
|
|
|
<Border BorderBrush="Black" BorderThickness="1" DockPanel.Dock="Top" Name="updateAvailablePanel" Visibility="Collapsed"> |
|
<DockPanel> |
|
<Button DockPanel.Dock="Right" Click="updateAvailablePanelCloseButtonClick" MinWidth="0">X</Button> |
|
<StackPanel Orientation="Horizontal"> |
|
<TextBlock Margin="4,0" VerticalAlignment="Center">A new ILSpy version is available.</TextBlock> |
|
<Button Click="downloadUpdateButtonClick">Download</Button> |
|
</StackPanel> |
|
</DockPanel> |
|
</Border> |
|
|
|
<textView:DecompilerTextView x:Name="decompilerTextView" /> |
|
</DockPanel> |
|
</Grid> |
|
</DockPanel> |
|
</Window> |