|
527 | 527 | </StackPanel>
|
528 | 528 | </TabItem>
|
529 | 529 |
|
| 530 | + <TabItem> |
| 531 | + <TabItem.Header> |
| 532 | + <TextBlock Classes="tab_header" Text="{DynamicResource Text.Configure.CustomAction}"/> |
| 533 | + </TabItem.Header> |
| 534 | + |
| 535 | + <Grid MinHeight="340" Margin="0,8,0,16"> |
| 536 | + <Grid.ColumnDefinitions> |
| 537 | + <ColumnDefinition Width="200"/> |
| 538 | + <ColumnDefinition Width="*" MaxWidth="400"/> |
| 539 | + </Grid.ColumnDefinitions> |
| 540 | + |
| 541 | + <Border Grid.Column="0" |
| 542 | + BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}" |
| 543 | + Background="{DynamicResource Brush.Contents}"> |
| 544 | + <Grid RowDefinitions="*,1,Auto"> |
| 545 | + <ListBox Grid.Row="0" |
| 546 | + Background="Transparent" |
| 547 | + ItemsSource="{Binding CustomActions}" |
| 548 | + SelectedItem="{Binding #ThisControl.SelectedCustomAction, Mode=TwoWay}" |
| 549 | + SelectionMode="Single"> |
| 550 | + <ListBox.Styles> |
| 551 | + <Style Selector="ListBoxItem"> |
| 552 | + <Setter Property="MinHeight" Value="0"/> |
| 553 | + <Setter Property="Height" Value="26"/> |
| 554 | + <Setter Property="Padding" Value="4,2"/> |
| 555 | + </Style> |
| 556 | + </ListBox.Styles> |
| 557 | + |
| 558 | + <ListBox.ItemsPanel> |
| 559 | + <ItemsPanelTemplate> |
| 560 | + <StackPanel Orientation="Vertical"/> |
| 561 | + </ItemsPanelTemplate> |
| 562 | + </ListBox.ItemsPanel> |
| 563 | + |
| 564 | + <ListBox.ItemTemplate> |
| 565 | + <DataTemplate DataType="m:CustomAction"> |
| 566 | + <Grid Margin="4,0" ColumnDefinitions="Auto,*"> |
| 567 | + <Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Action}" Fill="{DynamicResource Brush.FG1}"/> |
| 568 | + <TextBlock Grid.Column="1" Text="{Binding Name}" Margin="6,0,0,0" TextTrimming="CharacterEllipsis"/> |
| 569 | + </Grid> |
| 570 | + </DataTemplate> |
| 571 | + </ListBox.ItemTemplate> |
| 572 | + </ListBox> |
| 573 | + |
| 574 | + <Rectangle Grid.Row="1" Height="1" Fill="{DynamicResource Brush.Border2}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/> |
| 575 | + |
| 576 | + <StackPanel Grid.Row="2" Orientation="Horizontal" Background="{DynamicResource Brush.ToolBar}"> |
| 577 | + <Button Classes="icon_button" Click="OnAddCustomAction"> |
| 578 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Plus}"/> |
| 579 | + </Button> |
| 580 | + |
| 581 | + <Rectangle Width="1" Fill="{DynamicResource Brush.Border2}" HorizontalAlignment="Left" VerticalAlignment="Stretch"/> |
| 582 | + |
| 583 | + <Button Classes="icon_button" Click="OnRemoveSelectedCustomAction"> |
| 584 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Window.Minimize}"/> |
| 585 | + </Button> |
| 586 | + |
| 587 | + <Rectangle Width="1" Fill="{DynamicResource Brush.Border2}" HorizontalAlignment="Left" VerticalAlignment="Stretch"/> |
| 588 | + </StackPanel> |
| 589 | + </Grid> |
| 590 | + </Border> |
| 591 | + |
| 592 | + <ContentControl Grid.Column="1" Margin="16,0,0,0"> |
| 593 | + <ContentControl.Content> |
| 594 | + <Binding Path="SelectedCustomAction" ElementName="ThisControl"> |
| 595 | + <Binding.TargetNullValue> |
| 596 | + <Path Width="64" Height="64" |
| 597 | + HorizontalAlignment="Center" |
| 598 | + VerticalAlignment="Center" |
| 599 | + Fill="{DynamicResource Brush.FG2}" |
| 600 | + Data="{StaticResource Icons.Empty}"/> |
| 601 | + </Binding.TargetNullValue> |
| 602 | + </Binding> |
| 603 | + </ContentControl.Content> |
| 604 | + |
| 605 | + <ContentControl.DataTemplates> |
| 606 | + <DataTemplate DataType="m:CustomAction"> |
| 607 | + <StackPanel Orientation="Vertical"> |
| 608 | + <TextBlock Text="{DynamicResource Text.Configure.CustomAction.Name}"/> |
| 609 | + <TextBox Margin="0,4,0,0" CornerRadius="3" Height="28" Text="{Binding Name, Mode=TwoWay}"/> |
| 610 | + |
| 611 | + <TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Configure.CustomAction.Scope}"/> |
| 612 | + <ComboBox Margin="0,4,0,0" Height="28" HorizontalAlignment="Stretch" SelectedIndex="{Binding Scope, Mode=TwoWay}"> |
| 613 | + <ComboBoxItem Content="{DynamicResource Text.Configure.CustomAction.Scope.Repository}"/> |
| 614 | + <ComboBoxItem Content="{DynamicResource Text.Configure.CustomAction.Scope.Commit}"/> |
| 615 | + <ComboBoxItem Content="{DynamicResource Text.Configure.CustomAction.Scope.Branch}"/> |
| 616 | + </ComboBox> |
| 617 | + |
| 618 | + <TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Configure.CustomAction.Executable}"/> |
| 619 | + <TextBox Margin="0,4,0,0" Height="28" CornerRadius="3" Text="{Binding Executable, Mode=TwoWay}"> |
| 620 | + <TextBox.InnerRightContent> |
| 621 | + <Button Classes="icon_button" Width="30" Height="30" Click="SelectExecutableForCustomAction"> |
| 622 | + <Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/> |
| 623 | + </Button> |
| 624 | + </TextBox.InnerRightContent> |
| 625 | + </TextBox> |
| 626 | + |
| 627 | + <TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.Configure.CustomAction.Arguments}"/> |
| 628 | + <TextBox Margin="0,4,0,0" CornerRadius="3" Height="28" Text="{Binding Arguments, Mode=TwoWay}"/> |
| 629 | + <TextBlock Margin="0,2,0,0" TextWrapping="Wrap" Text="{DynamicResource Text.Configure.CustomAction.Arguments.Tip}" Foreground="{DynamicResource Brush.FG2}"/> |
| 630 | + |
| 631 | + <CheckBox Margin="0,8,0,0" Content="{DynamicResource Text.Configure.CustomAction.WaitForExit}" IsChecked="{Binding WaitForExit, Mode=TwoWay}"/> |
| 632 | + </StackPanel> |
| 633 | + </DataTemplate> |
| 634 | + </ContentControl.DataTemplates> |
| 635 | + </ContentControl> |
| 636 | + </Grid> |
| 637 | + </TabItem> |
| 638 | + |
530 | 639 | <TabItem>
|
531 | 640 | <TabItem.Header>
|
532 | 641 | <TextBlock Classes="tab_header" Text="{DynamicResource Text.Preferences.AI}"/>
|
533 | 642 | </TabItem.Header>
|
534 | 643 |
|
535 |
| - <Grid ColumnDefinitions="200,*" Margin="0,8,0,16" MinHeight="400"> |
| 644 | + <Grid Margin="0,8,0,16" MinHeight="400"> |
| 645 | + <Grid.ColumnDefinitions> |
| 646 | + <ColumnDefinition Width="200"/> |
| 647 | + <ColumnDefinition Width="*" MaxWidth="400"/> |
| 648 | + </Grid.ColumnDefinitions> |
| 649 | + |
536 | 650 | <Border Grid.Column="0"
|
537 | 651 | BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
|
538 | 652 | Background="{DynamicResource Brush.Contents}">
|
|
0 commit comments