2019-07-05 21:53:45 +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.WpfGui.EditDefSymbol"
|
2019-07-05 21:53:45 +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"
|
2019-07-20 20:28:10 +00:00
|
|
|
xmlns:local="clr-namespace:SourceGen.WpfGui"
|
2019-07-05 21:53:45 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Edit Symbol"
|
|
|
|
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
|
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
|
|
|
Loaded="Window_Loaded">
|
|
|
|
<Grid Margin="8">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
2019-08-26 00:25:15 +00:00
|
|
|
<RowDefinition Height="Auto"/>
|
2019-07-05 21:53:45 +00:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="0" Text="Label:"/>
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="0">
|
2019-08-26 00:25:15 +00:00
|
|
|
<TextBox Name="labelTextBox" Margin="0,1,0,0" Text="{Binding Label, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"/>
|
2019-07-05 21:53:45 +00:00
|
|
|
<TextBlock Name="labelNotesLabel" Text="• 2+ alphanumerics, starting with letter" Margin="0,4,0,0"/>
|
2019-08-26 00:25:15 +00:00
|
|
|
<TextBlock Name="projectLabelUniqueLabel" Text="• Unique among project symbols" Margin="0,4,0,16"/>
|
|
|
|
<TextBlock Name="labelUniqueLabel" Text="• Unique" Margin="0,4,0,16"/>
|
2019-07-05 21:53:45 +00:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="1" Text="Value:"/>
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="1">
|
2019-08-26 00:25:15 +00:00
|
|
|
<TextBox Margin="0,1,0,0" Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"/>
|
2019-08-29 20:32:45 +00:00
|
|
|
<TextBlock Name="valueRangeLabel" Text="• Value between 0-255, including width" Margin="0,4,0,0"/>
|
2019-08-29 00:34:29 +00:00
|
|
|
<TextBlock Name="valueUniqueLabel" Text="• Values in table must not overlap" Margin="0,4,0,0"/>
|
2019-07-05 21:53:45 +00:00
|
|
|
<TextBlock Name="valueNotesLabel" Text="• Decimal, hex ($), or binary (%)" Margin="0,4,0,16"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
2019-08-26 00:25:15 +00:00
|
|
|
<TextBlock Name="widthEntry1" Grid.Column="0" Grid.Row="2" Text="Width:"/>
|
|
|
|
<StackPanel Name="widthEntry2" Grid.Column="1" Grid.Row="2">
|
|
|
|
<TextBox Margin="0,1,0,0" Text="{Binding VarWidth, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"/>
|
2019-08-27 23:45:37 +00:00
|
|
|
<TextBlock Name="widthNotesLabel" Text="• Decimal value, 1-4" Margin="0,4,0,16"/>
|
2019-08-26 00:25:15 +00:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="3" Text="Comment:" Margin="0,0,8,0"/>
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="3">
|
|
|
|
<TextBox Margin="0,1,0,0" Text="{Binding Comment, UpdateSourceTrigger=PropertyChanged}"
|
2019-07-05 21:53:45 +00:00
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"/>
|
|
|
|
<TextBlock Text="• Optional" Margin="0,4,0,16"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
2019-08-26 00:25:15 +00:00
|
|
|
<GroupBox Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Header="Symbol Type" Padding="4">
|
2019-07-05 21:53:45 +00:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2019-08-29 00:34:29 +00:00
|
|
|
<RadioButton Content="Address" IsChecked="{Binding IsAddress}"/>
|
|
|
|
<RadioButton Content="Constant" Margin="24,0,0,0" IsChecked="{Binding IsConstant}"/>
|
2019-07-05 21:53:45 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
2019-08-26 00:25:15 +00:00
|
|
|
<StackPanel Grid.Column="1" Grid.Row="5" Margin="0,16,0,0"
|
2019-07-05 21:53:45 +00:00
|
|
|
Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
|
<Button Content="OK" Width="70" IsDefault="True" IsEnabled="{Binding IsValid}"
|
|
|
|
Click="OkButton_Click"/>
|
|
|
|
<Button Content="Cancel" Width="70" IsCancel="True" Margin="8,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|