2019-07-14 00:04:47 +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.EditNote"
|
2019-07-14 00:04:47 +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-14 00:04:47 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Edit Note"
|
|
|
|
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
|
|
|
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="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="0" Text="Enter note:"/>
|
|
|
|
|
|
|
|
<TextBox Name="inputTextBox" Grid.Row="1" Width="551" Height="120"
|
|
|
|
Text="{Binding UserInput, UpdateSourceTrigger=PropertyChanged,
|
|
|
|
FallbackValue=01234567890123456789012345678901234567890123456789012345678901234567890123456789}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
AcceptsReturn="True" TextWrapping="Wrap"/>
|
|
|
|
|
2020-03-13 20:58:52 +00:00
|
|
|
<GroupBox Grid.Row="2" Header="Select Highlight Color" Width="270" HorizontalAlignment="Left">
|
2019-07-14 00:04:47 +00:00
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<ColumnDefinition Width="8"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
2019-07-14 00:04:47 +00:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="*"/>
|
2019-07-14 00:04:47 +00:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorDefaultRadio" Grid.Column="0" Grid.Row="0" Margin="0,6,0,0"
|
2019-07-14 00:04:47 +00:00
|
|
|
Content="_None"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorGreenRadio" Grid.Column="0" Grid.Row="1" Margin="0,6,0,0"
|
2019-07-14 00:04:47 +00:00
|
|
|
Content="_Green" Background="LightGreen"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorBlueRadio" Grid.Column="0" Grid.Row="2" Margin="0,6,0,0"
|
2019-07-14 00:04:47 +00:00
|
|
|
Content="_Blue" Background="LightBlue"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorYellowRadio" Grid.Column="1" Grid.Row="0" Margin="0,6,0,0"
|
2019-07-14 00:04:47 +00:00
|
|
|
Content="_Yellow" Background="Yellow"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorPinkRadio" Grid.Column="1" Grid.Row="1" Margin="0,6,0,0"
|
2019-07-14 00:04:47 +00:00
|
|
|
Content="_Pink" Background="LightPink"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorOrangeRadio" Grid.Column="1" Grid.Row="2" Margin="0,6,0,0"
|
2019-07-14 00:04:47 +00:00
|
|
|
Content="_Orange" Background="Orange"/>
|
2020-03-13 20:58:52 +00:00
|
|
|
<RadioButton Name="colorCustomRadio" Grid.Column="3" Grid.Row="0" Margin="0,6,0,0"
|
|
|
|
Content="_Custom" IsChecked="{Binding IsCustomChecked}"/>
|
|
|
|
<TextBox Name="customColorBox" Grid.Column="3" Grid.Row="1" MaxLength="12" Width="100" Margin="18,2,0,0">
|
|
|
|
<TextBox.Text>
|
|
|
|
<Binding Path="CustomColorStr" UpdateSourceTrigger="PropertyChanged" FallbackValue="#008800">
|
|
|
|
<Binding.ValidationRules>
|
|
|
|
<local:ColorRule ValidatesOnTargetUpdated="True"/>
|
|
|
|
</Binding.ValidationRules>
|
|
|
|
</Binding>
|
|
|
|
</TextBox.Text>
|
|
|
|
</TextBox>
|
|
|
|
<Rectangle Grid.Column="3" Grid.Row="2" Fill="{Binding CustomColorBrush}" Margin="18,4,0,0"/>
|
2019-07-14 00:04:47 +00:00
|
|
|
</Grid>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Bottom">
|
|
|
|
<Button Content="OK" IsDefault="True" Width="70" Click="OkButton_Click"/>
|
|
|
|
<Button Content="Cancel" IsCancel="True" Width="70" Margin="4,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|