2019-07-07 00:24:42 +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.EditLabel"
|
2019-07-07 00:24:42 +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-11-13 01:24:41 +00:00
|
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
2019-07-20 20:28:10 +00:00
|
|
|
xmlns:local="clr-namespace:SourceGen.WpfGui"
|
2019-07-07 00:24:42 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Edit Label"
|
|
|
|
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
|
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
2019-07-07 20:28:45 +00:00
|
|
|
Loaded="Window_Loaded"
|
|
|
|
ContentRendered="Window_ContentRendered">
|
2019-11-13 01:24:41 +00:00
|
|
|
|
|
|
|
<Window.Resources>
|
|
|
|
<system:String x:Key="str_NonUniqueLocalFmt">_Non-unique local ('{0}')</system:String>
|
|
|
|
</Window.Resources>
|
|
|
|
|
2019-07-07 00:24:42 +00:00
|
|
|
<Grid Margin="8">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
|
|
|
|
<TextBlock Text="Enter label:"/>
|
|
|
|
<TextBox Name="labelTextBox" Margin="0,2,0,0" FontFamily="{StaticResource GeneralMonoFont}"
|
2019-07-08 20:40:28 +00:00
|
|
|
Text="{Binding LabelText, UpdateSourceTrigger=PropertyChanged}"/>
|
2019-07-07 00:24:42 +00:00
|
|
|
<TextBlock Name="maxLengthLabel" Text="• Must be 2-32 characters long (or blank to remove)"
|
2019-07-07 20:28:45 +00:00
|
|
|
Margin="0,7,0,0"/>
|
2019-07-07 00:24:42 +00:00
|
|
|
<TextBlock Name="firstLetterLabel" Text="• Must start with a letter or underscore"/>
|
|
|
|
<TextBlock Name="validCharsLabel" Text="• Valid characters are ASCII letters, numbers, and underscore"/>
|
|
|
|
<TextBlock Name="notDuplicateLabel" Text="• Must not be a duplicate of an existing label"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
2019-11-13 01:24:41 +00:00
|
|
|
<GroupBox Grid.Column="0" Grid.Row="1" Header="Label Type" Padding="2,4" Margin="0,12,0,0">
|
2019-07-07 00:24:42 +00:00
|
|
|
<StackPanel>
|
2019-11-13 01:24:41 +00:00
|
|
|
<RadioButton Content="{Binding NonUniqueButtonLabel, FallbackValue=_Non-unique local (\'!\')}"
|
|
|
|
IsChecked="{Binding IsNonUniqueChecked}" IsEnabled="{Binding IsNonUniqueEnabled}"/>
|
2019-11-19 01:45:41 +00:00
|
|
|
<RadioButton Content="Unique _local" Margin="0,4,0,0"
|
2019-11-13 01:24:41 +00:00
|
|
|
IsChecked="{Binding IsLocalChecked}" IsEnabled="{Binding IsLocalEnabled}"/>
|
|
|
|
<RadioButton Content="_Global" Margin="0,4,0,0"
|
|
|
|
IsChecked="{Binding IsGlobalChecked}" IsEnabled="{Binding IsGlobalEnabled}"/>
|
2019-11-19 01:45:41 +00:00
|
|
|
<RadioButton Content="Global, marked for _export" Margin="0,4,0,0"
|
2019-11-13 01:24:41 +00:00
|
|
|
IsChecked="{Binding IsExportedChecked}" IsEnabled="{Binding IsExportedEnabled}"/>
|
2019-07-07 00:24:42 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<DockPanel Grid.Column="1" Grid.Row="1" LastChildFill="False">
|
2019-11-13 01:24:41 +00:00
|
|
|
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right"
|
|
|
|
Margin="0,0,0,1">
|
|
|
|
<Button Content="OK" Width="70" IsDefault="True" Margin="8,0,0,0"
|
|
|
|
IsEnabled="{Binding IsValid}" Click="OkButton_Click"/>
|
2019-07-07 00:24:42 +00:00
|
|
|
<Button Content="Cancel" Width="70" IsCancel="True" Margin="4,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</DockPanel>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|