1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-08-09 02:29:27 +00:00
6502bench/SourceGenWPF/WpfGui/FormatSplitAddress.xaml

140 lines
6.9 KiB
XML

<!--
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.
-->
<Window x:Class="SourceGenWPF.WpfGui.FormatSplitAddress"
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"
xmlns:local="clr-namespace:SourceGenWPF.WpfGui"
mc:Ignorable="d"
Title="Format Split-Address Table"
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
Loaded="Window_Loaded">
<Window.Resources>
<system:String x:Key="str_SingleByte">One byte is selected</system:String>
<system:String x:Key="str_SingleGroup">There are {0} bytes selected</system:String>
<system:String x:Key="str_MultiGroup">There are {0} bytes selected, across {1} groups</system:String>
</Window.Resources>
<Grid Margin="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Text="{StaticResource str_MultiGroup}"/>
<StackPanel Grid.Column="0" Grid.Row="1" Margin="0,8,8,0">
<GroupBox Header="Address Characteristics">
<StackPanel>
<RadioButton Name="width16Radio" GroupName="Addr" Margin="0,4,0,0"
Content="16-bit"/>
<RadioButton Name="width24Radio" GroupName="Addr" Margin="0,4,0,0"
Content="24-bit"/>
<CheckBox Margin="0,4,0,0" Content="Adjusted for RTS/RTL (target - 1)"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Low Bytes">
<StackPanel>
<RadioButton Name="lowFirstPartRadio" GroupName="Low" Margin="0,4,0,0"
Content="First part of selection"/>
<RadioButton Name="lowSecondPartRadio" GroupName="Low" Margin="0,4,0,0"
Content="Second part of selection"/>
<RadioButton Name="lowThirdPartRadio" GroupName="Low" Margin="0,4,0,0"
Content="Third part of selection"/>
</StackPanel>
</GroupBox>
<GroupBox Header="High Bytes">
<StackPanel>
<RadioButton Name="highFirstPartRadio" GroupName="High" Margin="0,4,0,0"
Content="First part of selection"/>
<RadioButton Name="highSecondPartRadio" GroupName="High" Margin="0,4,0,0"
Content="Second part of selection"/>
<RadioButton Name="highThirdPartRadio" GroupName="High" Margin="0,4,0,0"
Content="Third part of selection"/>
<StackPanel Orientation="Horizontal">
<RadioButton Name="highConstantRadio" GroupName="High" Margin="0,4,0,0"
Content="Constant:"/>
<TextBox Name="highConstantTextBox" Width="100" Margin="8,1,0,0"/>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="Bank Bytes">
<StackPanel>
<RadioButton Name="bankNthPartRadio" GroupName="Bank" Margin="0,4,0,0"
Content="Nth part of selection"/>
<StackPanel Orientation="Horizontal">
<RadioButton Name="bankConstantRadio" GroupName="Bank" Margin="0,4,0,0"
Content="Constant:"/>
<TextBox Name="bankConstantTextBox" Width="100" Margin="8,1,0,0"/>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="Options">
<StackPanel>
<CheckBox Content="Add code entry hint if needed" Margin="0,4,0,0"/>
</StackPanel>
</GroupBox>
</StackPanel>
<DockPanel Grid.Column="1" Grid.Row="1" Margin="0,8,0,0">
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,0,0">
<Button Name="okButton" Content="OK" IsDefault="True" Width="70"
IsEnabled="{Binding IsValid}" Click="OkButton_Click"/>
<Button Name="cancelButton" Content="Cancel" IsCancel="True"
Width="70" Margin="4,0,0,0"/>
</StackPanel>
<GroupBox DockPanel.Dock="Top" Header="Generated Addresses">
<!-- We're currently auto-sizing everything outside this, so the width of
the columns determines the width of the window. Resizing the columns resizes
the window, even though the window isn't resizeable. "It's a feature." -->
<DataGrid Name="outputPreviewList"
Margin="0,2,0,0"
IsReadOnly="True"
ItemsSource="{Binding OutputPreviewList}"
FontFamily="{StaticResource GeneralMonoFont}"
SnapsToDevicePixels="True"
GridLinesVisibility="Vertical"
VerticalGridLinesBrush="#FF7F7F7F"
AutoGenerateColumns="False"
HeadersVisibility="Column"
CanUserReorderColumns="False"
SelectionMode="Single">
<DataGrid.Columns>
<DataGridTextColumn Header="Addr" Width="60" Binding="{Binding Addr}"/>
<DataGridTextColumn Header="Offset" Width="60" Binding="{Binding Offset}"/>
<DataGridTextColumn Header="Symbol" Width="180" Binding="{Binding Type}"/>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</DockPanel>
</Grid>
</Window>