mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
103 lines
5.1 KiB
XML
103 lines
5.1 KiB
XML
<windowManager:ManagedWindow 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:windowManager="clr-namespace:Iciclecreek.Avalonia.WindowManager;assembly=Iciclecreek.Avalonia.WindowManager"
|
|
x:Class="Aaru.Tui.Views.Windows.HexViewWindow"
|
|
WindowState="FullScreen"
|
|
CanResize="False">
|
|
<Design.DataContext>
|
|
<windows:HexViewWindowViewModel />
|
|
</Design.DataContext>
|
|
<DockPanel>
|
|
<Menu DockPanel.Dock="Bottom">
|
|
<MenuItem Header="ESC Back"
|
|
HotKey="Escape"
|
|
Command="{Binding BackCommand, Mode=OneWay}" />
|
|
<MenuItem Header="F1 Help"
|
|
Command="{Binding HelpCommand, Mode=OneWay}"
|
|
HotKey="F1" />
|
|
<MenuItem Header="F2 Next"
|
|
Command="{Binding NextSectorCommand, Mode=OneWay}"
|
|
HotKey="F2" />
|
|
<MenuItem Header="F3 Prev"
|
|
Command="{Binding PreviousSectorCommand, Mode=OneWay}"
|
|
HotKey="F3" />
|
|
<MenuItem Header="F4 GoTo"
|
|
Command="{Binding GoToCommand, Mode=OneWay}"
|
|
HotKey="F4" />
|
|
<MenuItem Header="F5 Long"
|
|
Command="{Binding ToggleLongCommand, Mode=OneWay}"
|
|
HotKey="F5" />
|
|
<MenuItem Header="F10 Exit"
|
|
HotKey="F10"
|
|
Command="{Binding ExitCommand, Mode=OneWay}" />
|
|
</Menu>
|
|
<Border BorderThickness="1">
|
|
<Border.BorderBrush>
|
|
<console:LineBrush LineStyle="DoubleLine"
|
|
Brush="Blue" />
|
|
</Border.BorderBrush>
|
|
<Grid RowDefinitions="Auto,Auto,*,Auto">
|
|
<TextBlock Grid.Row="0"
|
|
Foreground="Green"
|
|
Text="{Binding FilePath, Mode=OneWay}" />
|
|
<!-- Header -->
|
|
<Grid Grid.Row="1"
|
|
ColumnDefinitions="Auto,*,Auto">
|
|
<TextBlock Grid.Column="0"
|
|
Text="Offset"
|
|
HorizontalAlignment="Left"
|
|
Foreground="Cyan"
|
|
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="Cyan"
|
|
FontWeight="Bold" />
|
|
<TextBlock Grid.Column="2"
|
|
Text="ASCII "
|
|
HorizontalAlignment="Left"
|
|
Foreground="Cyan"
|
|
FontWeight="Bold" />
|
|
</Grid>
|
|
|
|
<!-- Hex View Content -->
|
|
<ScrollViewer Grid.Row="2"
|
|
Background="Transparent"
|
|
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="Yellow" />
|
|
|
|
<!-- Hex Column -->
|
|
<TextBlock Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
Text="{Binding HexString, Mode=OneWay}"
|
|
Foreground="White" />
|
|
|
|
<!-- ASCII Column -->
|
|
<TextBlock Grid.Column="2"
|
|
Text="{Binding AsciiString, Mode=OneWay}"
|
|
Foreground="LightGreen" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
<StackPanel Orientation="Horizontal"
|
|
Grid.Row="3">
|
|
<TextBlock Foreground="SlateBlue"
|
|
Text="Current sector: " />
|
|
<TextBlock Foreground="Lime"
|
|
Text="{Binding CurrentSector, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DockPanel>
|
|
</windowManager:ManagedWindow> |