Corrected some Sonar issues

Changed a little bit the Open and Set credentials User controls
This commit is contained in:
Geoffroy BONNEVILLE
2020-05-02 14:21:59 +02:00
parent 7b88461333
commit 654bd6b4e5
16 changed files with 16 additions and 98 deletions

View File

@@ -11,7 +11,7 @@
<Page.Resources>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</Page.Resources>
<Grid x:Name="Grid" Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />

View File

@@ -9,8 +9,6 @@ namespace ModernKeePass.Views
/// </summary>
public sealed partial class RecentDatabasesPage
{
private RecentVm Model => (RecentVm)DataContext;
public RecentDatabasesPage()
{
InitializeComponent();

View File

@@ -39,8 +39,7 @@
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding HasKeyFile, Mode=TwoWay}" />
<HyperlinkButton Grid.Row="1" Grid.Column="1" Margin="-15,0,0,0"
x:Name="HyperlinkButton"
Content="{Binding KeyFileText}"
IsEnabled="{Binding HasKeyFile}"
Content="{Binding KeyFileText}"
Click="KeyFileButton_Click" />
<Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2"

View File

@@ -55,6 +55,7 @@ namespace ModernKeePass.Views.UserControls
var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
Model.KeyFilePath = token;
Model.KeyFileText = file.Name;
Model.HasKeyFile = true;
}
}
}

View File

@@ -35,17 +35,13 @@
x:Uid="CompositeKeyPassword"
x:Name="PasswordBox"
Password="{Binding Password, Mode=TwoWay}"
IsPasswordRevealButtonEnabled="True" >
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="GotFocus">
<core:ChangePropertyAction TargetObject="{Binding}" PropertyName="HasPassword" Value="True" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</PasswordBox>
IsEnabled="{Binding HasPassword}"
IsPasswordRevealButtonEnabled="True" />
<PasswordBox Grid.Row="1" Grid.Column="1" Height="30"
x:Uid="CompositeKeyConfirmPassword"
x:Name="ConfirmPasswordBox"
Password="{Binding ConfirmPassword, Mode=TwoWay}"
IsEnabled="{Binding HasPassword}"
IsPasswordRevealButtonEnabled="True" />
<ProgressBar Grid.Row="1" Grid.Column="1"
Maximum="128" VerticalAlignment="Bottom"