Use idea from PUMA to configure global user name and email

This commit is contained in:
leo 2020-07-04 17:18:15 +08:00
parent 38227b1d57
commit d0f6077dc9
3 changed files with 90 additions and 9 deletions

View file

@ -8,7 +8,7 @@
xmlns:app="clr-namespace:SourceGit"
xmlns:git="clr-namespace:SourceGit.Git"
mc:Ignorable="d"
Height="362" Width="500">
Height="472" Width="500">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="36"/>
@ -21,6 +21,10 @@
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="18"/>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="18"/>
<RowDefinition Height="32"/>
@ -75,11 +79,18 @@
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
</Button>
</Grid>
<!-- Global User -->
<Label Grid.Row="7" Grid.ColumnSpan="2" Content="Global User" FontSize="18"/>
<Label Grid.Row="8" Grid.Column="0" Content="Name :" HorizontalAlignment="Right"/>
<TextBox Grid.Row="8" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
<Label Grid.Row="9" Grid.Column="0" Content="Email :" HorizontalAlignment="Right"/>
<TextBox Grid.Row="9" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
<!-- 合并工具配置 -->
<Label Grid.Row="7" Grid.ColumnSpan="2" Content="Merge Tool" FontSize="18"/>
<Label Grid.Row="8" Grid.Column="0" Content="Choose Merger :" HorizontalAlignment="Right"/>
<ComboBox Grid.Row="8" Grid.Column="1"
<Label Grid.Row="11" Grid.ColumnSpan="2" Content="Merge Tool" FontSize="18"/>
<Label Grid.Row="12" Grid.Column="0" Content="Choose Merger :" HorizontalAlignment="Right"/>
<ComboBox Grid.Row="12" Grid.Column="1"
Height="24"
Padding="2,0,0,0"
HorizontalContentAlignment="Left"
@ -88,8 +99,8 @@
ItemsSource="{Binding Source={x:Static git:MergeTool.Supported}}"
DisplayMemberPath="Name"
SelectionChanged="ChangeMergeTool"/>
<Label Grid.Row="9" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
<Grid Grid.Row="9" Grid.Column="1">
<Label Grid.Row="13" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
<Grid Grid.Row="13" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="28"/>
@ -104,13 +115,13 @@
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
</Button>
</Grid>
<Label Grid.Row="10" Grid.Column="0" Content="Command :" HorizontalAlignment="Right"/>
<TextBlock Grid.Row="10" Grid.Column="1"
<Label Grid.Row="14" Grid.Column="0" Content="Command :" HorizontalAlignment="Right"/>
<TextBlock Grid.Row="14" Grid.Column="1"
x:Name="txtMergeParam"
VerticalAlignment="Center"
Foreground="{StaticResource Brush.FG2}"/>
<Button Grid.Row="12" Grid.Column="1"
<Button Grid.Row="16" Grid.Column="1"
Content="CLOSE"
Click="Close"
Width="80"