mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
163 lines
6.3 KiB
XML
163 lines
6.3 KiB
XML
<Window
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:m="clr-namespace:Mesen"
|
|
xmlns:vm="using:Mesen.ViewModels"
|
|
xmlns:sys="using:System"
|
|
xmlns:cfg="using:Mesen.Config"
|
|
xmlns:c="using:Mesen.Controls"
|
|
xmlns:dc="using:Mesen.Debugger.Controls"
|
|
xmlns:du="using:Mesen.Debugger.Utilities"
|
|
xmlns:u="using:Mesen.Utilities"
|
|
xmlns:v="using:Mesen.Debugger.Views"
|
|
xmlns:i="using:Mesen.Interop"
|
|
xmlns:l="using:Mesen.Localization"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:dvm="using:Mesen.Debugger.ViewModels"
|
|
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="600"
|
|
x:Class="Mesen.Debugger.Windows.EventViewerWindow"
|
|
x:DataType="dvm:EventViewerViewModel"
|
|
Width="600" Height="600"
|
|
Icon="/Assets/EventViewer.png"
|
|
Title="{l:Translate wndTitle}"
|
|
>
|
|
<Design.DataContext>
|
|
<dvm:EventViewerViewModel />
|
|
</Design.DataContext>
|
|
|
|
<Window.Resources>
|
|
<du:GridLengthConverter x:Key="GridLengthConverter" />
|
|
<u:ArgbColorToBrushConverter x:Key="ArgbColorToBrushConverter"/>
|
|
</Window.Resources>
|
|
|
|
<Window.DataTemplates>
|
|
<DataTemplate DataType="{x:Type cfg:SnesEventViewerConfig}">
|
|
<v:SnesEventViewerConfigView />
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type cfg:NesEventViewerConfig}">
|
|
<v:NesEventViewerConfigView />
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type cfg:GbEventViewerConfig}">
|
|
<v:GbEventViewerConfigView />
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type cfg:GbaEventViewerConfig}">
|
|
<v:GbaEventViewerConfigView />
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type cfg:PceEventViewerConfig}">
|
|
<v:PceEventViewerConfigView />
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type cfg:SmsEventViewerConfig}">
|
|
<v:SmsEventViewerConfigView />
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type cfg:WsEventViewerConfig}">
|
|
<v:WsEventViewerConfigView />
|
|
</DataTemplate>
|
|
</Window.DataTemplates>
|
|
|
|
<DockPanel>
|
|
<Panel DockPanel.Dock="Top">
|
|
<c:MesenMenu DockPanel.Dock="Top" Name="ActionMenu">
|
|
<MenuItem Header="{l:Translate mnuFile}" ItemsSource="{Binding FileMenuItems}" />
|
|
<MenuItem Header="{l:Translate mnuDebug}" ItemsSource="{Binding DebugMenuItems}" />
|
|
<MenuItem Header="{l:Translate mnuView}" ItemsSource="{Binding ViewMenuItems}" />
|
|
</c:MesenMenu>
|
|
<c:IconButton
|
|
HorizontalAlignment="Right"
|
|
DockPanel.Dock="Right"
|
|
ToolTip.Tip="{l:Translate btnToggleSettings}"
|
|
Click="OnSettingsClick"
|
|
Icon="Assets/Settings.png"
|
|
/>
|
|
</Panel>
|
|
|
|
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" IsVisible="{Binding Config.ShowToolbar}">
|
|
<dc:ActionToolbar Items="{Binding ToolbarItems}" />
|
|
</StackPanel>
|
|
|
|
<Panel DockPanel.Dock="Right" Margin="3" IsVisible="{Binding Config.ShowSettingsPanel}">
|
|
<ScrollViewer VerticalAlignment="Top">
|
|
<StackPanel>
|
|
<ContentControl Content="{Binding ConsoleConfig}" />
|
|
<CheckBox Content="{l:Translate chkShowListView}" IsChecked="{Binding ShowListView}" />
|
|
<StackPanel Orientation="Horizontal" Margin="0 10 0 0">
|
|
<Button Command="{Binding EnableAllEventTypes}" Content="{l:Translate btnSelectAll}" />
|
|
<Button Command="{Binding DisableAllEventTypes}" Content="{l:Translate btnDeselectAll}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Panel>
|
|
|
|
<Grid ColumnDefinitions="*">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition MinHeight="200" Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition
|
|
MinHeight="{Binding MinListViewHeight}"
|
|
Height="{Binding ListViewHeight, Mode=TwoWay, Converter={StaticResource GridLengthConverter}}"
|
|
/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<dc:ScrollPictureViewer
|
|
x:Name="picViewer"
|
|
Grid.Row="0"
|
|
Source="{Binding ViewerBitmap}"
|
|
Zoom="{Binding Config.ImageScale}"
|
|
ShowMousePosition="False"
|
|
AllowSelection="False"
|
|
SelectionRect="{Binding SelectionRect}"
|
|
GridHighlight="{Binding GridHighlightPoint}"
|
|
/>
|
|
|
|
<GridSplitter
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Stretch"
|
|
IsVisible="{Binding Config.ShowListView}"
|
|
/>
|
|
|
|
<Border BorderBrush="Gray" BorderThickness="1" Grid.Row="2">
|
|
<DataBox
|
|
Name="lstEvents"
|
|
Items="{Binding ListView.DebugEvents}"
|
|
Selection="{Binding ListView.Selection}"
|
|
SortMode="Multiple"
|
|
SortCommand="{Binding ListView.SortCommand}"
|
|
SortState="{Binding ListView.SortState}"
|
|
GridLinesVisibility="All"
|
|
ColumnWidths="{Binding ListView.ColumnWidths}"
|
|
>
|
|
<DataBox.Styles>
|
|
<Style Selector="TextBlock">
|
|
<Setter Property="Margin" Value="3 0 0 0" />
|
|
</Style>
|
|
</DataBox.Styles>
|
|
|
|
<DataBox.Columns>
|
|
<DataBoxTemplateColumn
|
|
Header=""
|
|
ColumnName="Color"
|
|
InitialWidth="16"
|
|
>
|
|
<DataTemplate>
|
|
<Border
|
|
BorderBrush="{DynamicResource MesenBlackBorderColor}"
|
|
BorderThickness="1"
|
|
Background="{Binding Color, Converter={StaticResource ArgbColorToBrushConverter}, DataType={x:Type dvm:DebugEventViewModel}}"
|
|
Width="12"
|
|
Height="12"
|
|
/>
|
|
</DataTemplate>
|
|
</DataBoxTemplateColumn>
|
|
<DataBoxTextColumn Header="{l:Translate colScanline}" ColumnName="Scanline" InitialWidth="88" Binding="{Binding Scanline, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
<DataBoxTextColumn Header="{l:Translate colCycle}" ColumnName="Cycle" InitialWidth="77" Binding="{Binding Cycle, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
<DataBoxTextColumn Header="{l:Translate colPc}" ColumnName="ProgramCounter" InitialWidth="62" Binding="{Binding ProgramCounter, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
<DataBoxTextColumn Header="{l:Translate colType}" ColumnName="Type" InitialWidth="77" Binding="{Binding Type, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
<DataBoxTextColumn Header="{l:Translate colAddress}" ColumnName="Address" InitialWidth="68" Binding="{Binding Address, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
<DataBoxTextColumn Header="{l:Translate colValue}" ColumnName="Value" InitialWidth="50" Binding="{Binding Value, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
<DataBoxTextColumn Header="{l:Translate colDetails}" CanUserSort="False" InitialWidth="416" Binding="{Binding Details, DataType={x:Type dvm:DebugEventViewModel}}" />
|
|
</DataBox.Columns>
|
|
</DataBox>
|
|
</Border>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Window>
|