mirror of
https://github.com/fadden/6502bench.git
synced 2024-11-30 01:50:10 +00:00
0eeb36f59a
This involved adding a list to the DisasmProject, creating a new UndoableChange type, and writing the project file serialization code. While doing the latter I realized that the new Width field was redundant with the FormatDescriptor Length field, and removed it. I added a placeholder line type, but we're not yet showing the table in the display list. (To edit the tables you just have to know where they are.)
94 lines
4.5 KiB
XML
94 lines
4.5 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.EditLocalVariableTable"
|
|
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 Local Variable Table"
|
|
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
|
Loaded="Window_Loaded">
|
|
|
|
<Window.Resources>
|
|
<system:String x:Key="str_ConfirmDelete">Are you sure you want to delete the entire table?</system:String>
|
|
<system:String x:Key="str_ConfirmDeleteCaption">Confirm Deletion</system:String>
|
|
</Window.Resources>
|
|
|
|
<Grid Margin="8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
|
Margin="0,4,0,0" Text="Symbols defined in project:"/>
|
|
|
|
<ListView Name="symbolsListView" Grid.Column="0" Grid.Row="1" Margin="0,4,4,0"
|
|
Height="300"
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
ItemsSource="{Binding Variables}"
|
|
SnapsToDevicePixels="True" SelectionMode="Single"
|
|
SelectionChanged="SymbolsListView_SelectionChanged"
|
|
MouseDoubleClick="SymbolsListView_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="Width" Width="45" DisplayMemberBinding="{Binding Width}"/>
|
|
<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"/>
|
|
</StackPanel>
|
|
|
|
<CheckBox Grid.Column="0" Grid.Row="2" Margin="0,4" IsChecked="{Binding ClearPrevious}"
|
|
Content="Clear values from previous tables"/>
|
|
|
|
<DockPanel Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Margin="0,8,0,0" LastChildFill="False">
|
|
<Button DockPanel.Dock="Left" Content="Delete Table" Width="120" IsEnabled="{Binding IsNotNewTable}"
|
|
Click="DeleteTableButton_Click"/>
|
|
<Button DockPanel.Dock="Right" Content="Cancel" Width="70" Margin="8,0,0,0" IsCancel="True"/>
|
|
<Button DockPanel.Dock="Right" Grid.Column="1" Content="OK" Width="70"
|
|
IsDefault="True" Click="OkButton_Click"/>
|
|
</DockPanel>
|
|
</Grid>
|
|
</Window>
|