2019-07-07 23:18:46 +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.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<Window x:Class="SourceGenWPF.WpfGui.EditLongComment"
|
|
|
|
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 Long Comment"
|
|
|
|
Width="584" Height="700" MinWidth="584" MinHeight="600" ResizeMode="CanResizeWithGrip"
|
|
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
|
|
|
Loaded="Window_Loaded"
|
|
|
|
Closing="Window_Closing">
|
|
|
|
|
|
|
|
<Window.Resources>
|
|
|
|
<RoutedUICommand x:Key="CloseCmd">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+Enter</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
|
|
|
</Window.Resources>
|
|
|
|
<Window.CommandBindings>
|
|
|
|
<CommandBinding Command="{StaticResource CloseCmd}" Executed="CloseCmd_Executed"/>
|
|
|
|
</Window.CommandBindings>
|
|
|
|
|
|
|
|
<Grid Margin="8">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="0" Text="Enter comment text:"/>
|
|
|
|
|
|
|
|
<TextBox Name="entryTextBox" Grid.Row="1"
|
|
|
|
Text="{Binding UserInput, UpdateSourceTrigger=PropertyChanged,
|
|
|
|
FallbackValue=01234567890123456789012345678901234567890123456789012345678901234567890123456789}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}" VerticalScrollBarVisibility="Visible"
|
|
|
|
AcceptsReturn="True" TextWrapping="Wrap"/>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,20,0,0">
|
|
|
|
<TextBlock Text="Maximum line width:"/>
|
|
|
|
<ComboBox Name="maxWidthComboBox" Width="75" Margin="8,0,0,0"
|
|
|
|
ItemsSource="{Binding LineWidthItems}" SelectionChanged="MaxWidthComboBox_SelectionChanged"/>
|
|
|
|
<CheckBox Content="Render in box" Margin="40,1,0,0" IsChecked="{Binding RenderInBox}"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="3" Text="Expected output:" Margin="0,20,0,0"/>
|
|
|
|
<TextBox Name="displayTextBox" Grid.Row="4"
|
|
|
|
Text="{Binding TextOutput,
|
|
|
|
FallbackValue=01234567890123456789012345678901234567890123456789012345678901234567890123456789}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}" VerticalScrollBarVisibility="Visible"
|
|
|
|
IsReadOnly="True"/>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,0,0">
|
2019-07-14 00:04:47 +00:00
|
|
|
<Button Content="OK" IsDefault="True" Width="70" Click="OkButton_Click"/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<Button Content="Cancel" IsCancel="True" Width="70" Margin="4,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|