2019-07-13 00:04:14 +00:00
|
|
|
<!--
|
|
|
|
Copyright 2019 faddenSoft
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
2019-07-20 20:28:10 +00:00
|
|
|
<Window x:Class="SourceGen.Tools.WpfGui.HexDumpViewer"
|
2019-07-13 00:04:14 +00:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
2019-07-20 20:28:10 +00:00
|
|
|
xmlns:local="clr-namespace:SourceGen.WpfGui"
|
2019-07-13 00:04:14 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Hex Dump Viewer"
|
2019-08-16 22:38:31 +00:00
|
|
|
Width="542" Height="600" MinWidth="542" MinHeight="180" ResizeMode="CanResizeWithGrip"
|
2019-07-15 01:12:03 +00:00
|
|
|
ShowInTaskbar="True"
|
2019-07-13 00:04:14 +00:00
|
|
|
Loaded="Window_Loaded">
|
|
|
|
|
|
|
|
<Window.Resources>
|
2019-08-16 22:38:31 +00:00
|
|
|
<system:String x:Key="str_AsciiOnly">Plain ASCII only</system:String>
|
|
|
|
<system:String x:Key="str_LowHighAscii">Low/High ASCII</system:String>
|
|
|
|
<system:String x:Key="str_C64Petscii">C64 PETSCII</system:String>
|
|
|
|
<system:String x:Key="str_C64ScreenCode">C64 Screen Code</system:String>
|
2019-07-13 00:04:14 +00:00
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
<Grid Margin="8">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- DataGrid gives us Ctrl+A select-all and Ctrl+C text-copy built in. -->
|
|
|
|
<DataGrid Name="hexDumpData" Grid.Row="0"
|
|
|
|
IsReadOnly="True"
|
|
|
|
ItemsSource="{Binding HexDumpLines}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
GridLinesVisibility="None"
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
CanUserSortColumns="False"
|
|
|
|
SelectionMode="Extended"
|
|
|
|
EnableRowVirtualization="True"
|
|
|
|
ScrollViewer.CanContentScroll="True"
|
|
|
|
VerticalScrollBarVisibility="Visible">
|
|
|
|
<DataGrid.Columns>
|
2019-08-16 22:38:31 +00:00
|
|
|
<DataGridTextColumn Header="Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F Text"
|
2019-07-13 00:04:14 +00:00
|
|
|
Width="491" Binding="{Binding}"/>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="1" Margin="0,5,0,0" Orientation="Horizontal">
|
|
|
|
<TextBlock Text="Character conversion:" Margin="0,3,0,0"/>
|
|
|
|
<ComboBox Name="charConvComboBox" Width="120" Margin="4,0,0,0"
|
|
|
|
ItemsSource="{Binding CharConvItems}" DisplayMemberPath="Name"
|
|
|
|
SelectionChanged="CharConvComboBox_SelectionChanged"/>
|
|
|
|
|
|
|
|
<CheckBox Content="ASCII-only dump" Margin="16,4,0,0" IsChecked="{Binding AsciiOnlyDump}"/>
|
|
|
|
|
|
|
|
<!-- Bind the checkbox directly to the window's Topmost property. -->
|
|
|
|
<CheckBox Content="Always on top" Margin="16,4,0,0" IsChecked="{Binding Path=Topmost}"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|