mirror of
https://github.com/fadden/6502bench.git
synced 2024-08-09 02:29:27 +00:00
I'm planning to rework the dialog, so I didn't bother WPFing it up. Also, explicitly recreate the contents of the Symbols window when applying changes. This used to happen implicitly via SymbolTableSubset and the "change serial" in SymbolTable, but that approach doesn't make sense for a DataGrid.
94 lines
5.3 KiB
XML
94 lines
5.3 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.EditInstructionOperand"
|
|
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:local="clr-namespace:SourceGenWPF.WpfGui"
|
|
mc:Ignorable="d"
|
|
Title="Edit Instruction Operand"
|
|
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
|
Loaded="Window_Loaded"
|
|
ContentRendered="Window_ContentRendered">
|
|
<StackPanel Margin="8">
|
|
<TextBlock Text="Select operand format:"/>
|
|
<RadioButton Name="defaultButton" GroupName="Format" Content="Default" Margin="0,2,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="MainGroup_CheckedChanged"/>
|
|
<RadioButton Name="hexButton" GroupName="Format" Content="Hexadecimal" Margin="0,2,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="MainGroup_CheckedChanged"/>
|
|
<RadioButton Name="decimalButton" GroupName="Format" Content="Decimal" Margin="0,2,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="MainGroup_CheckedChanged"/>
|
|
<RadioButton Name="binaryButton" GroupName="Format" Content="Binary" Margin="0,2,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="MainGroup_CheckedChanged"/>
|
|
<RadioButton Name="asciiButton" GroupName="Format" Content="ASCII character" Margin="0,2,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="MainGroup_CheckedChanged"/>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<RadioButton Name="symbolButton" Grid.Column="0" Grid.Row="0" Margin="0,2,0,0"
|
|
GroupName="Format" Content="Symbol"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="MainGroup_CheckedChanged"/>
|
|
<TextBox Name="symbolTextBox" Grid.Column="1" Grid.Row="0" Margin="8,1,0,0"
|
|
FontFamily="{StaticResource GeneralMonoFont}" TextChanged="SymbolTextBox_TextChanged"/>
|
|
<StackPanel Name="symbolPartPanel" Grid.Column="1" Grid.Row="1" Orientation="Horizontal" Margin="8,4,0,0">
|
|
<RadioButton Name="lowButton" GroupName="Part" Content="Low"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="PartGroup_CheckedChanged"/>
|
|
<RadioButton Name="highButton" GroupName="Part" Content="High" Margin="8,0,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="PartGroup_CheckedChanged"/>
|
|
<RadioButton Name="bankButton" GroupName="Part" Content="Bank" Margin="8,0,0,0"
|
|
Checked="MainGroup_CheckedChanged" Unchecked="PartGroup_CheckedChanged"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<DockPanel Margin="0,8,0,0">
|
|
<TextBlock DockPanel.Dock="Left" Text="Preview:"/>
|
|
<TextBox Name="previewTextBox" DockPanel.Dock="Right" IsReadOnly="True" Margin="8,1,0,0"
|
|
FontFamily="{StaticResource GeneralMonoFont}"/>
|
|
</DockPanel>
|
|
|
|
<GroupBox Name="symbolShortcutsGroupBox" Header="Symbol Shortcuts" Margin="0,12,0,0">
|
|
<StackPanel>
|
|
<RadioButton Name="operandOnlyButton" GroupName="Shortcut" Margin="0,2,0,0"
|
|
Content="_Just set the operand (default)"/>
|
|
<RadioButton Name="labelInsteadButton" GroupName="Shortcut" Margin="0,2,0,0"
|
|
Content="_Create label at target address instead"/>
|
|
|
|
<RadioButton Name="operandAndLabelButton" GroupName="Shortcut" Margin="0,2,0,0"
|
|
Content="Set _operand AND create label at target address"/>
|
|
<RadioButton Name="operandAndProjButton" GroupName="Shortcut" Margin="0,2,0,0"
|
|
Content="Set operand AND create _project symbol"/>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
|
|
<StackPanel 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>
|
|
|
|
</StackPanel>
|
|
</Window>
|