-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/clean do not take all document (#22)
* Clean Now take all document * Update deisng of regex management Co-authored-by: arnaud7394 <marcille.arnaud@gmail.com>
- Loading branch information
1 parent
a6f228d
commit b48f667
Showing
8 changed files
with
348 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<UserControl | ||
x:Class="EmptyLineExtension22.Options.RegexItem" | ||
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:local="clr-namespace:EmptyLineExtension22.Options" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:DesignHeight="40" | ||
d:DesignWidth="800" | ||
mc:Ignorable="d"> | ||
<UserControl.Resources> | ||
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" /> | ||
</UserControl.Resources> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="auto" /> | ||
<RowDefinition /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="4*" /> | ||
<ColumnDefinition Width="4*" /> | ||
<ColumnDefinition /> | ||
<ColumnDefinition /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Separator Grid.ColumnSpan="5" IsTabStop="False" /> | ||
<TextBox | ||
Grid.Row="1" | ||
Grid.Column="0" | ||
Margin="8,0,8,0" | ||
VerticalAlignment="Center" | ||
Text="{Binding Key}" /> | ||
<TextBox | ||
x:Name="tbx_AllowedLines" | ||
Grid.Row="1" | ||
Grid.Column="1" | ||
Margin="8,0,8,0" | ||
VerticalAlignment="Center" | ||
PreviewTextInput="tbx_AllowedLines_PreviewTextInput" | ||
Text="{Binding Value}" /> | ||
|
||
<Button | ||
Grid.Row="1" | ||
Grid.Column="2" | ||
Margin="8,0,8,0" | ||
Command="{Binding UpCommand}" | ||
Cursor="Hand" | ||
IsTabStop="False" | ||
Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}}"> | ||
<Button.Template> | ||
<ControlTemplate TargetType="{x:Type Button}"> | ||
<Path | ||
Width="15" | ||
Height="15" | ||
Data="M263.169,3.051c-2.015-1.976-4.73-3.073-7.552-3.051l0,0c-2.834,0.001-5.551,1.129-7.552,3.136 L35.286,216.555c-4.112,4.218-4.026,10.972,0.192,15.084c1.971,1.921,4.608,3.006,7.36,3.028h117.333v266.667 c0,5.891,4.776,10.667,10.667,10.667h170.667c5.891,0,10.667-4.776,10.667-10.667V234.667h116.885 c5.891,0.011,10.675-4.757,10.686-10.648c0.005-2.84-1.123-5.565-3.134-7.571L263.169,3.051z" | ||
Fill="Black" | ||
Stretch="Fill" /> | ||
</ControlTemplate> | ||
</Button.Template> | ||
</Button> | ||
<Button | ||
Grid.Row="1" | ||
Grid.Column="3" | ||
Margin="8,0,8,0" | ||
Command="{Binding DownCommand}" | ||
Cursor="Hand" | ||
IsTabStop="False" | ||
Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}}"> | ||
<Button.Template> | ||
<ControlTemplate TargetType="{x:Type Button}"> | ||
<Path | ||
Width="15" | ||
Height="15" | ||
Data="M469.205,277.333H352.341V10.667C352.341,4.776,347.566,0,341.675,0H171.008 c-5.891,0-10.667,4.776-10.667,10.667v266.667H43.008c-5.891,0.001-10.666,4.778-10.664,10.669c0.001,2.822,1.12,5.53,3.112,7.528 l212.8,213.504c2.001,2.007,4.718,3.135,7.552,3.136l0,0c2.831,0.005,5.548-1.115,7.552-3.115l213.333-213.504 c4.171-4.16,4.179-10.914,0.019-15.085C474.722,278.472,472.023,277.345,469.205,277.333z" | ||
Fill="Black" | ||
Stretch="Fill" /> | ||
</ControlTemplate> | ||
</Button.Template> | ||
</Button> | ||
<Button | ||
Grid.Row="1" | ||
Grid.Column="4" | ||
Margin="5" | ||
Command="{Binding DeleteCommand}" | ||
Cursor="Hand" | ||
IsTabStop="False"> | ||
<Button.Template> | ||
<ControlTemplate TargetType="{x:Type Button}"> | ||
<Path | ||
Width="15" | ||
Height="15" | ||
Data="F1 M348.333,348.334z M0,0z M336.559,68.611L231.016,174.165 336.559,279.714C352.258,295.419 352.258,320.859 336.559,336.564 328.715,344.408 318.431,348.333 308.152,348.333 297.856,348.333 287.571,344.414 279.733,336.564L174.167,231.003 68.609,336.563C60.766,344.407 50.481,348.332 40.193,348.332 29.908,348.332 19.63,344.413 11.78,336.563 -3.919,320.865 -3.919,295.424 11.78,279.713L117.32,174.164 11.774,68.611C-3.925,52.912 -3.925,27.466 11.774,11.767 27.47,-3.92 52.901,-3.92 68.603,11.767L174.166,117.321 279.721,11.767C295.426,-3.92 320.86,-3.92 336.553,11.767 352.258,27.466 352.258,52.912 336.559,68.611z" | ||
Fill="Red" | ||
Stretch="Fill" /> | ||
</ControlTemplate> | ||
</Button.Template> | ||
</Button> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Text.RegularExpressions; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace EmptyLineExtension22.Options | ||
{ | ||
/// <summary> | ||
/// Interaction logic for RegexItem.xaml | ||
/// </summary> | ||
public partial class RegexItem : UserControl | ||
{ | ||
public RegexItem() | ||
{ | ||
|
||
InitializeComponent(); | ||
} | ||
|
||
private void tbx_AllowedLines_PreviewTextInput(object sender, TextCompositionEventArgs e) | ||
{ | ||
Regex regex = new Regex("[^0-9]+"); | ||
e.Handled = regex.IsMatch(e.Text); | ||
} | ||
} | ||
} |
Oops, something went wrong.