feature<Preference>: query git version after selecting git path

This commit is contained in:
李通洲 2021-09-07 10:52:48 +08:00
parent 1a5fdc540c
commit ebc2fc6b91
6 changed files with 70 additions and 33 deletions

View file

@ -73,6 +73,7 @@
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="8"/>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>
@ -230,13 +231,24 @@
Icon="{StaticResource Icon.Folder.Open}"/>
</Grid>
<!-- Default Clone Dir -->
<!-- Git Version -->
<TextBlock
Grid.Row="13" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Version}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<TextBlock
Grid.Row="13" Grid.Column="1"
x:Name="textGitVersion"
Text="{Binding ElementName=me, Path=Version}"/>
<!-- Default Clone Dir -->
<TextBlock
Grid.Row="14" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Dir}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<Grid Grid.Row="13" Grid.Column="1">
<Grid Grid.Row="14" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
@ -259,12 +271,12 @@
<!-- User -->
<TextBlock
Grid.Row="14" Grid.Column="0"
Grid.Row="15" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.User}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<controls:TextEdit
Grid.Row="14" Grid.Column="1"
Grid.Row="15" Grid.Column="1"
x:Name="editGitUser"
Height="24"
Text="{Binding ElementName=me, Path=User, Mode=TwoWay}"
@ -272,12 +284,12 @@
<!-- Email -->
<TextBlock
Grid.Row="15" Grid.Column="0"
Grid.Row="16" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.Email}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<controls:TextEdit
Grid.Row="15" Grid.Column="1"
Grid.Row="16" Grid.Column="1"
x:Name="editGitEmail"
Height="24"
Text="{Binding ElementName=me, Path=Email, Mode=TwoWay}"
@ -285,12 +297,12 @@
<!-- CRLF -->
<TextBlock
Grid.Row="16" Grid.Column="0"
Grid.Row="17" Grid.Column="0"
Text="{DynamicResource Text.Preference.Git.CRLF}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<ComboBox
Grid.Row="16" Grid.Column="1"
Grid.Row="17" Grid.Column="1"
x:Name="editGitCrlf"
Height="24"
ItemsSource="{Binding Source={x:Static models:CRLFOption.Supported}}"
@ -308,19 +320,19 @@
<!-- Merge Tool Group -->
<TextBlock
Grid.Row="18" Grid.Column="0" Grid.ColumnSpan="2"
Grid.Row="19" Grid.Column="0" Grid.ColumnSpan="2"
Text="{DynamicResource Text.Preference.Merger}"
FontSize="17" FontWeight="DemiBold"
Foreground="{DynamicResource Brush.FG2}"/>
<!-- Merge Tool Type -->
<TextBlock
Grid.Row="19" Grid.Column="0"
Grid.Row="20" Grid.Column="0"
Text="{DynamicResource Text.Preference.Merger.Type}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<ComboBox
Grid.Row="19" Grid.Column="1"
Grid.Row="20" Grid.Column="1"
Height="24"
ItemsSource="{Binding Source={x:Static models:MergeTool.Supported}}"
DisplayMemberPath="Name"
@ -330,11 +342,11 @@
<!-- Merge Tool Executable Path -->
<TextBlock
Grid.Row="20" Grid.Column="0"
Grid.Row="21" Grid.Column="0"
Text="{DynamicResource Text.Preference.Merger.Path}"
HorizontalAlignment="Right"
Margin="0,0,8,0"/>
<Grid Grid.Row="20" Grid.Column="1">
<Grid Grid.Row="21" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>