mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-01 09:24:58 +00:00
code_style: remove all IDE warnings
This commit is contained in:
parent
9ac550242e
commit
a807aa9e12
94 changed files with 785 additions and 807 deletions
|
@ -5,13 +5,12 @@
|
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:m="using:SourceGit.Models"
|
||||
xmlns:c="using:SourceGit.Converters"
|
||||
xmlns:ac="using:Avalonia.Controls.Converters"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
xmlns:v="using:SourceGit.Views"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.Preference"
|
||||
x:DataType="vm:Preference"
|
||||
x:Name="me"
|
||||
x:Name="ThisControl"
|
||||
Icon="/App.ico"
|
||||
Title="{DynamicResource Text.Preference}"
|
||||
Width="600" SizeToContent="Height"
|
||||
|
@ -123,16 +122,7 @@
|
|||
IsSnapToTickEnabled="True"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Brush.Border1}"
|
||||
Value="{Binding MaxHistoryCommits, Mode=TwoWay}">
|
||||
<Slider.Resources>
|
||||
<Thickness x:Key="SliderTopHeaderMargin">0,0,0,4</Thickness>
|
||||
<GridLength x:Key="SliderPreContentMargin">0</GridLength>
|
||||
<GridLength x:Key="SliderPostContentMargin">0</GridLength>
|
||||
<CornerRadius x:Key="SliderThumbCornerRadius">8</CornerRadius>
|
||||
<x:Double x:Key="SliderHorizontalThumbWidth">16</x:Double>
|
||||
<x:Double x:Key="SliderHorizontalThumbHeight">16</x:Double>
|
||||
</Slider.Resources>
|
||||
</Slider>
|
||||
Value="{Binding MaxHistoryCommits, Mode=TwoWay}"/>
|
||||
|
||||
<TextBlock Grid.Column="1"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
|
@ -186,7 +176,7 @@
|
|||
MinHeight="28"
|
||||
Padding="8,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding #me.InstalledFonts}"
|
||||
ItemsSource="{Binding #ThisControl.InstalledFonts}"
|
||||
SelectedItem="{Binding DefaultFont, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="FontFamily">
|
||||
|
@ -205,7 +195,7 @@
|
|||
MinHeight="28"
|
||||
Padding="8,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding #me.InstalledMonospaceFonts}"
|
||||
ItemsSource="{Binding #ThisControl.InstalledMonospaceFonts}"
|
||||
SelectedItem="{Binding MonospaceFont, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="FontFamily">
|
||||
|
@ -273,12 +263,12 @@
|
|||
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
|
||||
<TextBlock Classes="monospace"
|
||||
Margin="0,0,8,0"
|
||||
Text="{Binding #me.GitVersion}"
|
||||
IsVisible="{Binding #me.GitVersion, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
Text="{Binding #ThisControl.GitVersion}"
|
||||
IsVisible="{Binding #ThisControl.GitVersion, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
|
||||
<Border Background="Transparent"
|
||||
ToolTip.Tip="{DynamicResource Text.Preference.Git.Invalid}"
|
||||
IsVisible="{Binding #me.GitVersion, Converter={x:Static c:StringConverters.UnderRecommendGitVersion}}">
|
||||
IsVisible="{Binding #ThisControl.GitVersion, Converter={x:Static c:StringConverters.UnderRecommendGitVersion}}">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
@ -344,7 +334,7 @@
|
|||
<TextBox Grid.Row="4" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding #me.DefaultUser, Mode=TwoWay}"
|
||||
Text="{Binding #ThisControl.DefaultUser, Mode=TwoWay}"
|
||||
Watermark="{DynamicResource Text.Preference.Git.User.Placeholder}"/>
|
||||
|
||||
<TextBlock Grid.Row="5" Grid.Column="0"
|
||||
|
@ -354,7 +344,7 @@
|
|||
<TextBox Grid.Row="5" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding #me.DefaultEmail, Mode=TwoWay}"
|
||||
Text="{Binding #ThisControl.DefaultEmail, Mode=TwoWay}"
|
||||
Watermark="{DynamicResource Text.Preference.Git.Email.Placeholder}"/>
|
||||
|
||||
<TextBlock Grid.Row="6" Grid.Column="0"
|
||||
|
@ -366,7 +356,7 @@
|
|||
Padding="8,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding Source={x:Static m:CRLFMode.Supported}}"
|
||||
SelectedItem="{Binding #me.CRLFMode, Mode=TwoWay}">
|
||||
SelectedItem="{Binding #ThisControl.CRLFMode, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="{x:Type m:CRLFMode}">
|
||||
<Grid ColumnDefinitions="64,*">
|
||||
|
@ -409,10 +399,6 @@
|
|||
<TabItem.Header>
|
||||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.GPG}"/>
|
||||
</TabItem.Header>
|
||||
|
||||
<TabItem.Resources>
|
||||
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
|
||||
</TabItem.Resources>
|
||||
|
||||
<Grid Margin="8" RowDefinitions="32,Auto,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
|
@ -424,7 +410,7 @@
|
|||
Padding="8,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding Source={x:Static m:GPGFormat.Supported}}"
|
||||
SelectedItem="{Binding #me.GPGFormat, Mode=TwoWay}">
|
||||
SelectedItem="{Binding #ThisControl.GPGFormat, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="{x:Type m:GPGFormat}">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
|
@ -439,13 +425,13 @@
|
|||
Text="{DynamicResource Text.Preference.GPG.Path}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"
|
||||
IsVisible="{Binding #me.GPGFormat.NeedFindProgram}"/>
|
||||
IsVisible="{Binding #ThisControl.GPGFormat.NeedFindProgram}"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding #me.GPGExecutableFile, Mode=TwoWay}"
|
||||
Text="{Binding #ThisControl.GPGExecutableFile, Mode=TwoWay}"
|
||||
Watermark="{DynamicResource Text.Preference.GPG.Path.Placeholder}"
|
||||
IsVisible="{Binding #me.GPGFormat.NeedFindProgram}">
|
||||
IsVisible="{Binding #ThisControl.GPGFormat.NeedFindProgram}">
|
||||
<TextBox.InnerRightContent>
|
||||
<Button Classes="icon_button" Width="30" Height="30" Click="SelectGPGExecutable">
|
||||
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
|
||||
|
@ -460,16 +446,16 @@
|
|||
<TextBox Grid.Row="2" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding #me.GPGUserKey, Mode=TwoWay}"
|
||||
Text="{Binding #ThisControl.GPGUserKey, Mode=TwoWay}"
|
||||
Watermark="{DynamicResource Text.Preference.GPG.UserKey.Placeholder}"/>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="1"
|
||||
Content="{DynamicResource Text.Preference.GPG.CommitEnabled}"
|
||||
IsChecked="{Binding #me.EnableGPGCommitSigning, Mode=TwoWay}"/>
|
||||
IsChecked="{Binding #ThisControl.EnableGPGCommitSigning, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
Content="{DynamicResource Text.Preference.GPG.TagEnabled}"
|
||||
IsChecked="{Binding #me.EnableGPGTagSigning, Mode=TwoWay}"/>
|
||||
IsChecked="{Binding #ThisControl.EnableGPGTagSigning, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue