1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-05-31 22:41:37 +00:00
6502bench/SourceGen/WpfGui/EditProjectProperties.xaml
Andy McFadden 7bbe5692bd Add C64 encodings to instruction and data operand editors
Both dialogs got a couple extra radio buttons for selection of
single character operands.  The data operand editor got a combo box
that lets you specify how it scans for viable strings.

Various string scanning methods were made more generic.  This got a
little strange with auto-detection of low/high ASCII, but that was
mostly a matter of keeping the previous code around as a special
case.

Made C64 Screen Code DCI strings a thing that works.
2019-08-15 17:53:12 -07:00

252 lines
14 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="SourceGen.WpfGui.EditProjectProperties"
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:SourceGen.WpfGui"
mc:Ignorable="d"
Title="Edit Project Properties"
Width="600" Height="400" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
Loaded="Window_Loaded">
<Window.Resources>
<!-- don't center the column headers -->
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
<!-- strings for combo boxes -->
<system:String x:Key="str_6502">MOS 6502</system:String>
<system:String x:Key="str_65C02">WDC W65C02S</system:String>
<system:String x:Key="str_65816">WDC W65C816S</system:String>
<system:String x:Key="str_DisableStringScan">None (disabled)</system:String>
<system:String x:Key="str_AutoLabelSimple">Simple ("L1234")</system:String>
<system:String x:Key="str_AutoLabelAnnotated">Annotated ("W_1234")</system:String>
<system:String x:Key="str_AutoLabelFullyAnnotated">Fully Annotated ("DWR_1234")</system:String>
</Window.Resources>
<DockPanel Margin="8">
<DockPanel DockPanel.Dock="Bottom">
<Button DockPanel.Dock="Right" Name="cancelButton" Content="Cancel" IsCancel="True"
Width="70" Margin="4,0,0,0"/>
<Button DockPanel.Dock="Right" Name="okButton" Content="OK" IsDefault="True"
Width="70" Click="OkButton_Click"/>
<Button DockPanel.Dock="Right" Name="applyButton" Content="Apply" Margin="0,0,20,0"
Width="70" IsEnabled="{Binding IsDirty}" Click="ApplyButton_Click"/>
<TextBlock DockPanel.Dock="Left" Text="NOTE: changes are added to the undo/redo buffer"/>
</DockPanel>
<TabControl Name="tabControl" DockPanel.Dock="Top" Margin="0,0,0,8">
<TabItem Name="generalTab" Header="General">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<GroupBox Header="CPU" Grid.Column="0" Grid.Row="0" Padding="2,4">
<StackPanel>
<ComboBox Name="cpuComboBox" ItemsSource="{Binding CpuItems}" DisplayMemberPath="Name"
SelectionChanged="CpuComboBox_SelectionChanged"/>
<CheckBox Margin="0,4,0,0" Content="Enable undocumented instructions"
IsChecked="{Binding IncludeUndocumentedInstr}"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Entry Flags" Grid.Column="0" Grid.Row="1" Padding="2,4">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Flags:"/>
<TextBlock Name="currentFlagsText" Margin="4,2,0,0"
Text="N- V- M- X- D- I- Z- C- E-"
FontFamily="{StaticResource GeneralMonoFont}"/>
</StackPanel>
<Button Width="75" Content="Change" Margin="0,4,0,0"
HorizontalAlignment="Left" Click="ChangeFlagButton_Click"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Analysis Parameters" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
Margin="4,0,0,0" Padding="2,4">
<StackPanel>
<CheckBox Name="analyzeUncategorizedCheckBox" Content="Analyze uncategorized data"
IsChecked="{Binding AnalyzeUncategorizedData}"/>
<CheckBox Name="seekAltTargetCheckBox" Margin="0,4,0,0" Content="Seek nearby targets"
IsChecked="{Binding SeekNearbyTargets}"/>
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
<TextBlock Margin="0,3,0,0" Text="Default text encoding:"/>
<ComboBox Name="defaultTextEncComboBox" Margin="8,2,0,0"
Width="142"
ItemsSource="{Binding DefaultTextScanModeItems}" DisplayMemberPath="Name"
SelectionChanged="DefaultTextEncComboBox_SelectionChanged"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
<TextBlock Margin="0,3,0,0" Text="Min chars for string detection:"/>
<ComboBox Name="minStringCharsComboBox" Margin="8,2,0,0" Width="100"
ItemsSource="{Binding MinCharsItems}" DisplayMemberPath="Name"
SelectionChanged="MinStringCharsComboBox_SelectionChanged"/>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="Miscellaneous" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"
Padding="2,4">
<DockPanel>
<TextBlock DockPanel.Dock="Left" Text="Auto-label style:" Margin="0,2,8,0"/>
<ComboBox DockPanel.Dock="Left" Name="autoLabelStyleComboBox"
Width="300" HorizontalAlignment="Left"
ItemsSource="{Binding AutoLabelItems}" DisplayMemberPath="Name"
SelectionChanged="AutoLabelStyleComboBox_SelectionChanged"/>
</DockPanel>
</GroupBox>
</Grid>
</TabItem>
<TabItem Name="projectSymbolsTab" Header="Project Symbols">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Margin="4,0,0,0" Text="Symbols defined in project:"/>
<ListView Name="projectSymbolsListView" Grid.Column="0" Grid.Row="1" Margin="4,4,4,0"
FontFamily="{StaticResource GeneralMonoFont}"
ItemsSource="{Binding ProjectSymbols}"
SnapsToDevicePixels="True" SelectionMode="Single"
SelectionChanged="List_SelectionChanged"
MouseDoubleClick="ProjectSymbolsListView_MouseDoubleClick">
<ListView.Resources>
<Style TargetType="TextBlock">
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
</Style>
</ListView.Resources>
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn Header="Name" Width="118" DisplayMemberBinding="{Binding Label}"/>
<GridViewColumn Header="Value" Width="72" DisplayMemberBinding="{Binding Value}"/>
<GridViewColumn Header="Type" Width="45" DisplayMemberBinding="{Binding Type}"/>
<GridViewColumn Header="Comment" Width="300" DisplayMemberBinding="{Binding Comment}"/>
</GridView>
</ListView.View>
</ListView>
<StackPanel Grid.Column="1" Grid.Row="1">
<Button Name="newSymbolButton" Width="120" Margin="4" Content="_New Symbol..."
Click="NewSymbolButton_Click"/>
<Button Name="editSymbolButton" Width="120" Margin="4,4" Content="_Edit Symbol..."
Click="EditSymbolButton_Click"/>
<Button Name="removeSymbolButton" Width="120" Margin="4,4" Content="_Remove"
Click="RemoveSymbolButton_Click"/>
<Button Name="importSymbolsButton" Width="120" Margin="4,20,4,0" Content="_Import..."
Click="ImportSymbolsButton_Click"/>
</StackPanel>
</Grid>
</TabItem>
<TabItem Name="symbolFilesTab" Header="Symbol Files">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Margin="4,0,0,0"
Text="Currently configured symbol files:"/>
<ListBox Name="symbolFilesListBox" Grid.Column="0" Grid.Row="1" Margin="4"
SelectionMode="Extended"
ItemsSource="{Binding PlatformSymbolIdentifiers}"
SelectionChanged="List_SelectionChanged"/>
<Button Grid.Column="0" Grid.Row="2" Width="120" HorizontalAlignment="Left"
Margin="4" Content="Add Symbol Files..."
Click="AddSymbolFilesButton_Click"/>
<StackPanel Grid.Column="2" Grid.Row="1">
<Button Name="symbolFileUpButton" Width="75" Margin="4" Content="_Up"
Click="SymbolFileUpButton_Click"/>
<Button Name="symbolFileDownButton" Width="75" Margin="4,4" Content="_Down"
Click="SymbolFileDownButton_Click"/>
<Button Name="symbolFileRemoveButton" Width="75" Margin="4,20,4,0" Content="_Remove"
Click="SymbolFileRemoveButton_Click"/>
</StackPanel>
</Grid>
</TabItem>
<TabItem Name="extensionScriptsTab" Header="Extension Scripts">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Margin="4,0,0,0"
Text="Currently configured symbol files:"/>
<ListBox Name="extensionScriptsListBox" Grid.Column="0" Grid.Row="1" Margin="4"
SelectionMode="Extended"
ItemsSource="{Binding ExtensionScriptIdentifiers}"
SelectionChanged="List_SelectionChanged"/>
<Button Grid.Column="0" Grid.Row="3" Width="120" HorizontalAlignment="Left"
Margin="4" Content="Add Scripts..."
Click="AddExtensionScriptsButton_Click"/>
<StackPanel Grid.Column="1" Grid.Row="1">
<Button Name="extensionScriptRemoveButton" Width="75" Margin="4" Content="_Remove"
Click="ExtensionScriptRemoveButton_Click"/>
</StackPanel>
</Grid>
</TabItem>
</TabControl>
</DockPanel>
</Window>