|
38 | 38 | <BitmapImage x:Key="ShowLinesNumbers" UriSource="Resources/line_numbers.png"/> |
39 | 39 | <BitmapImage x:Key="ShowSpaces" UriSource="Resources/space.png"/> |
40 | 40 | <BitmapImage x:Key="ShowReturns" UriSource="Resources/return.png"/> |
| 41 | + <BitmapImage x:Key="Play" UriSource="Resources/control_play_blue.png"/> |
41 | 42 |
|
42 | 43 | <Style TargetType="Image"> |
43 | 44 | <Style.Triggers> |
|
280 | 281 | <MenuItem Name="cmiRegexIndent" Header="Auto Indent and set IgnorePatternWhitespace" Click="CmiRegexIndent_Click"/> |
281 | 282 | <MenuItem Name="cmiRegexSetOnOneLine" Header="Set on one line" Click="CmiRegexSetOnOneLine_Click"/> |
282 | 283 | <Separator /> |
283 | | - <MenuItem Name="cmiRegexCut" Header="Cut" Click="CmiRegexCut_Click"/> |
284 | | - <MenuItem Name="cmiRegexCopy" Header="Copy" Click="CmiRegexCopy_Click"/> |
285 | | - <MenuItem Name="cmiRegexPaste" Header="Paste" Click="CmiRegexPaste_Click"/> |
| 284 | + <MenuItem Header="Cut" Command="ApplicationCommands.Cut"/> |
| 285 | + <MenuItem Header="Copy" Command="ApplicationCommands.Copy"/> |
| 286 | + <MenuItem Header="Paste" Command="ApplicationCommands.Paste"/> |
286 | 287 | <Separator/> |
287 | 288 | <MenuItem Name="cmiRegexCopyForOnOneLine" Header="Copy on one line" Click="CmiRegexCopyForOnOneLine_Click"/> |
288 | 289 | <MenuItem Name="cmiRegexCopyForXml" Header="Copy for XML" Click="CmiRegexCopyForXml_Click"/> |
289 | 290 | <MenuItem Name="cmiRegexPasteFromXml" Header="Paste from XML" Click="CmiRegexPasteFromXml_Click"/> |
290 | 291 | <Separator /> |
291 | | - <MenuItem Name="cmiRegexSelectAll" Header="Select All" Click="CmiRegexSelectAll_Click"/> |
| 292 | + <MenuItem Header="Select All" Command="ApplicationCommands.SelectAll"/> |
292 | 293 | </ContextMenu> |
293 | 294 | </avalonEdit:TextEditor.ContextMenu> |
294 | 295 | </avalonEdit:TextEditor> |
|
346 | 347 | <TextBlock>- <Bold>fileIndex</Bold> : (If in directory search) the index of the file</TextBlock> |
347 | 348 | <TextBlock Margin="0,5,0,0">You can add specific usings between <Bold>#usings</Bold> and <Bold>#usings</Bold></TextBlock> |
348 | 349 | <TextBlock>You can declare shared variables, properties or methods putting code between <Bold>#global</Bold> and <Bold>#endglobal</Bold></TextBlock> |
349 | | - <TextBlock>Between <Bold>#before</Bold> and <Bold>#endbefore</Bold> you get the <Bold>text</Bold> and the<Bold>fileName</Bold> before it is used as input of the regex by returning a string you can redefine it.</TextBlock> |
350 | | - <TextBlock>Between <Bold>#after</Bold> and <Bold>#endafter</Bold> you get the <Bold>text</Bold> and the<Bold>fileName</Bold> after it is processed by the regex by returning a string you can modify it a last time.</TextBlock> |
| 350 | + <TextBlock>Between <Bold>#before</Bold> and <Bold>#endbefore</Bold> you get the <Bold>text</Bold> and the <Bold>fileName</Bold> before it is used as input of the regex by returning a string you can redefine it.</TextBlock> |
| 351 | + <TextBlock>Between <Bold>#after</Bold> and <Bold>#endafter</Bold> you get the <Bold>text</Bold> and the <Bold>fileName</Bold> after it is processed by the regex by returning a string you can modify it a last time.</TextBlock> |
351 | 352 | </StackPanel> |
352 | 353 | </CheckBox.ToolTip> |
353 | 354 | </CheckBox> |
|
368 | 369 | </i:Interaction.Behaviors> |
369 | 370 | <avalonEdit:TextEditor.ContextMenu> |
370 | 371 | <ContextMenu Name="cmReplacefieldContextMenu"> |
371 | | - <MenuItem Name="cmiReplaceGroupByNumber" Header="Groups by number" > |
| 372 | + <MenuItem Name="cmiReplaceGroupByNumber" Header="Groups by number" Visibility="{Binding CSharpReplaceMode, Converter={converters:CustomBoolToVisibilityConverter TrueValue=Collapsed, FalseValue=Visible}}"> |
372 | 373 | <MenuItem.Style> |
373 | 374 | <Style TargetType="{x:Type MenuItem}"> |
374 | 375 | <EventSetter Event="Click" Handler="InsertInReplaceFromContextMenu_Click" /> |
375 | 376 | </Style> |
376 | 377 | </MenuItem.Style> |
377 | 378 | </MenuItem> |
378 | | - <MenuItem Name="cmiReplaceGroupByName" Header="Groups by name" > |
| 379 | + <MenuItem Name="cmiReplaceGroupByName" Header="Groups by name" Visibility="{Binding CSharpReplaceMode, Converter={converters:CustomBoolToVisibilityConverter TrueValue=Collapsed, FalseValue=Visible}}"> |
379 | 380 | <MenuItem.Style> |
380 | 381 | <Style TargetType="{x:Type MenuItem}"> |
381 | 382 | <EventSetter Event="Click" Handler="InsertInReplaceFromContextMenu_Click" /> |
382 | 383 | </Style> |
383 | 384 | </MenuItem.Style> |
384 | 385 | </MenuItem> |
385 | | - <Separator/> |
386 | | - <MenuItem Name="cmiReplaceCut" Header="Cut" Click="CmiReplaceCut_Click"/> |
387 | | - <MenuItem Name="cmiReplaceCopy" Header="Copy" Click="CmiReplaceCopy_Click"/> |
388 | | - <MenuItem Name="cmiReplacePaste" Header="Paste" Click="CmiReplacePaste_Click"/> |
| 386 | + <Separator Visibility="{Binding CSharpReplaceMode, Converter={converters:CustomBoolToVisibilityConverter TrueValue=Collapsed, FalseValue=Visible}}"/> |
| 387 | + <MenuItem Header="Cut" Command="ApplicationCommands.Cut"/> |
| 388 | + <MenuItem Header="Copy" Command="ApplicationCommands.Copy"/> |
| 389 | + <MenuItem Header="Paste" Command="ApplicationCommands.Paste"/> |
389 | 390 | <Separator /> |
390 | | - <MenuItem Name="cmiReplaceSelectAll" Header="Select All" Click="CmiReplaceSelectAll_Click"/> |
| 391 | + <MenuItem Header="Select All" Command="ApplicationCommands.SelectAll"/> |
391 | 392 | </ContextMenu> |
392 | 393 | </avalonEdit:TextEditor.ContextMenu> |
393 | 394 | </avalonEdit:TextEditor> |
|
700 | 701 | <Image Source="{StaticResource ShowReturns}" Width="16" Height="16" ToolTip="Show/Hide end of lines" /> |
701 | 702 | </StackPanel> |
702 | 703 | </ToggleButton> |
703 | | - |
| 704 | + <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" /> |
| 705 | + <Button x:Name="TestCSharpTextSourceButton" |
| 706 | + Click="TestCSharpTextSourceButton_Click"> |
| 707 | + <Image Source="{StaticResource Play}" Width="16" Height="16" ToolTip="Test and show result" /> |
| 708 | + </Button> |
| 709 | + <CheckBox Content="In a new tab" |
| 710 | + VerticalAlignment="Center" |
| 711 | + IsChecked="{Binding ShowCSharpTextSourceTestInANewTab}"/> |
704 | 712 | </WrapPanel> |
705 | 713 | <Border BorderBrush="Gray" |
706 | 714 | BorderThickness="1"> |
|
711 | 719 | SyntaxHighlighting="C#" |
712 | 720 | ShowLineNumbers="{Binding ShowLinesNumbersCSharpTextSourceEditorOption}" |
713 | 721 | ScrollViewer.HorizontalScrollBarVisibility="Auto" > |
| 722 | + <avalonEdit:TextEditor.ContextMenu> |
| 723 | + <ContextMenu> |
| 724 | + <MenuItem Header="Cut" Command="ApplicationCommands.Cut"/> |
| 725 | + <MenuItem Header="Copy" Command="ApplicationCommands.Copy"/> |
| 726 | + <MenuItem Header="Paste" Command="ApplicationCommands.Paste"/> |
| 727 | + <Separator /> |
| 728 | + <MenuItem Header="Select All" Command="ApplicationCommands.SelectAll"/> |
| 729 | + </ContextMenu> |
| 730 | + </avalonEdit:TextEditor.ContextMenu> |
714 | 731 | <i:Interaction.Behaviors> |
| 732 | + <behaviors:SimplePropertyBindingBehavior PropertyName="Text" Value="{Binding CSharpTextSourceEditorText}" PropertyChangedTriggerEventName="TextChanged" /> |
715 | 733 | <behaviors:SimplePropertyBindingBehavior PropertyName="Options.ShowSpaces" Value="{Binding ShowSpaceCharsCSharpTextSourceEditorOption}" /> |
716 | 734 | <behaviors:SimplePropertyBindingBehavior PropertyName="Options.ShowTabs" Value="{Binding ShowSpaceCharsCSharpTextSourceEditorOption}" /> |
717 | 735 | <behaviors:SimplePropertyBindingBehavior PropertyName="Options.ShowEndOfLine" Value="{Binding ShowEndOfLinesCSharpTextSourceEditorOption}" /> |
|
0 commit comments