mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
109 lines
6.1 KiB
XML
109 lines
6.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:console="https://github.com/jinek/consolonia"
|
|
xmlns:windows="clr-namespace:Aaru.Tui.ViewModels.Windows"
|
|
xmlns:localization="clr-namespace:Aaru.Tui.Localization"
|
|
xmlns:mvvm="http://prismlibrary.com/"
|
|
x:Class="Aaru.Tui.Views.Windows.HexViewWindow"
|
|
x:DataType="windows:HexViewWindowViewModel"
|
|
mvvm:ViewModelLocator.AutoWireViewModel="True">
|
|
<Design.DataContext>
|
|
<windows:HexViewWindowViewModel />
|
|
</Design.DataContext>
|
|
<DockPanel Background="{DynamicResource CyberBackgroundPrimaryBrush}">
|
|
<Menu DockPanel.Dock="Bottom"
|
|
Background="{DynamicResource CyberBackgroundPrimaryBrush}"
|
|
Foreground="{DynamicResource CyberNeonCyanBrush}"
|
|
HorizontalAlignment="Stretch">
|
|
<MenuItem Header="{x:Static localization:Resources.Back_Header}"
|
|
HotKey="Escape"
|
|
Command="{Binding BackCommand, Mode=OneWay}" />
|
|
<MenuItem Header="{x:Static localization:Resources.Help_Header}"
|
|
Command="{Binding HelpCommand, Mode=OneWay}"
|
|
HotKey="F1" />
|
|
<MenuItem Header="{x:Static localization:Resources.Next_Header}"
|
|
Command="{Binding NextSectorCommand, Mode=OneWay}"
|
|
HotKey="F2" />
|
|
<MenuItem Header="{x:Static localization:Resources.Prev_Header}"
|
|
Command="{Binding PreviousSectorCommand, Mode=OneWay}"
|
|
HotKey="F3" />
|
|
<MenuItem Header="{x:Static localization:Resources.GoTo_Header}"
|
|
Command="{Binding GoToCommand, Mode=OneWay}"
|
|
HotKey="F4" />
|
|
<MenuItem Header="{x:Static localization:Resources.Long_Header}"
|
|
Command="{Binding ToggleLongCommand, Mode=OneWay}"
|
|
HotKey="F5" />
|
|
<MenuItem Header="{x:Static localization:Resources.Exit_Header}"
|
|
HotKey="F10"
|
|
Command="{Binding ExitCommand, Mode=OneWay}" />
|
|
</Menu>
|
|
<Border BorderThickness="1"
|
|
Background="{DynamicResource CyberBackgroundPrimaryBrush}">
|
|
<Border.BorderBrush>
|
|
<console:LineBrush LineStyle="DoubleLine"
|
|
Brush="Cyan" />
|
|
</Border.BorderBrush>
|
|
<Grid RowDefinitions="Auto,Auto,*,Auto">
|
|
<TextBlock Grid.Row="0"
|
|
Foreground="{DynamicResource CyberNeonLimeBrush}"
|
|
Text="{Binding FilePath, Mode=OneWay}" />
|
|
<!-- Header -->
|
|
<Grid Grid.Row="1"
|
|
ColumnDefinitions="Auto,*,Auto">
|
|
<TextBlock Grid.Column="0"
|
|
Text="{x:Static localization:Resources.Offset_Text}"
|
|
HorizontalAlignment="Left"
|
|
Foreground="{DynamicResource CyberNeonCyanBrush}"
|
|
FontWeight="Bold" />
|
|
<TextBlock Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
Text="00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F"
|
|
Foreground="{DynamicResource CyberNeonCyanBrush}"
|
|
FontWeight="Bold" />
|
|
<TextBlock Grid.Column="2"
|
|
Text="{x:Static localization:Resources.ASCII_Text}"
|
|
HorizontalAlignment="Left"
|
|
Foreground="{DynamicResource CyberNeonCyanBrush}"
|
|
FontWeight="Bold" />
|
|
</Grid>
|
|
|
|
<!-- Hex View Content -->
|
|
<ScrollViewer Grid.Row="2"
|
|
Background="{DynamicResource CyberBackgroundPrimaryBrush}"
|
|
x:Name="HexScrollViewer">
|
|
<ItemsControl ItemsSource="{Binding Lines, Mode=OneWay}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="windows:HexViewLine">
|
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
|
<!-- Offset Column -->
|
|
<TextBlock Grid.Column="0"
|
|
Text="{Binding OffsetString, Mode=OneWay}"
|
|
Foreground="{DynamicResource CyberNeonYellowBrush}" />
|
|
|
|
<!-- Hex Column -->
|
|
<TextBlock Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
Text="{Binding HexString, Mode=OneWay}"
|
|
Foreground="{DynamicResource CyberNeonMagentaBrush}" />
|
|
|
|
<!-- ASCII Column -->
|
|
<TextBlock Grid.Column="2"
|
|
Text="{Binding AsciiString, Mode=OneWay}"
|
|
Foreground="{DynamicResource CyberNeonLimeBrush}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
<StackPanel Orientation="Horizontal"
|
|
Grid.Row="3"
|
|
Background="{DynamicResource CyberBackgroundPrimaryBrush}">
|
|
<TextBlock Foreground="{DynamicResource CyberNeonCyanBrush}"
|
|
Text="{x:Static localization:Resources.CurrentSector_Text}" />
|
|
<TextBlock Foreground="{DynamicResource CyberNeonLimeBrush}"
|
|
Text="{Binding CurrentSector, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DockPanel>
|
|
</UserControl> |