mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
79 lines
3.3 KiB
XML
79 lines
3.3 KiB
XML
<controls:PopupWidget
|
|
x:Class="SourceGit.Views.Popups.CreateBranch"
|
|
x:Name="me"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
|
xmlns:converters="clr-namespace:SourceGit.Views.Converters"
|
|
xmlns:validations="clr-namespace:SourceGit.Views.Validations"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="500" Height="Auto">
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<converters:InverseBool x:Key="InverseBool"/>
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="32"/>
|
|
<RowDefinition Height="32"/>
|
|
<RowDefinition Height="32"/>
|
|
<RowDefinition Height="32"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="150"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0" Grid.Column="0"
|
|
Margin="0,0,8,0"
|
|
Text="{StaticResource Text.CreateBranch.BasedOn}"
|
|
HorizontalAlignment="Right"/>
|
|
<StackPanel
|
|
Grid.Row="0" Grid.Column="1"
|
|
Orientation="Horizontal"
|
|
VerticalAlignment="Center">
|
|
<Path x:Name="iconBased" Width="14" Height="14" Data="{StaticResource Icon.Branch}"/>
|
|
<TextBlock x:Name="txtBased" Margin="8,0,0,0"/>
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Grid.Row="1" Grid.Column="0"
|
|
Margin="0,0,8,0"
|
|
Text="{StaticResource Text.CreateBranch.Name}"
|
|
HorizontalAlignment="Right"/>
|
|
<controls:TextEdit
|
|
Grid.Row="1" Grid.Column="1"
|
|
x:Name="txtBranchName"
|
|
Height="24"
|
|
Placeholder="{StaticResource Text.CreateBranch.Name.Placeholder}">
|
|
<controls:TextEdit.Text>
|
|
<Binding ElementName="me" Path="BranchName" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
|
<Binding.ValidationRules>
|
|
<validations:BranchName x:Name="ruleBranch"/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</controls:TextEdit.Text>
|
|
</controls:TextEdit>
|
|
|
|
<TextBlock
|
|
Grid.Row="2" Grid.Column="0"
|
|
Margin="0,0,8,0"
|
|
Text="{StaticResource Text.CreateBranch.LocalChanges}"
|
|
HorizontalAlignment="Right"/>
|
|
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
|
<RadioButton Content="{StaticResource Text.CreateBranch.LocalChanges.StashAndReply}" GroupName="LocalChanges" IsChecked="{Binding AutoStash, ElementName=me}"/>
|
|
<RadioButton Content="{StaticResource Text.CreateBranch.LocalChanges.Discard}" Margin="8,0,0,0" GroupName="LocalChanges" IsChecked="{Binding AutoStash, ElementName=me, Mode=OneWay, Converter={StaticResource InverseBool}}"/>
|
|
</StackPanel>
|
|
|
|
<CheckBox
|
|
Grid.Row="3" Grid.Column="1"
|
|
x:Name="chkCheckout"
|
|
IsChecked="True"
|
|
Content="{StaticResource Text.CreateBranch.Checkout}"/>
|
|
</Grid>
|
|
</controls:PopupWidget>
|