From ceaf7dabd3e66f5af44b2b6ec9fa3acd54351c75 Mon Sep 17 00:00:00 2001 From: Geoffroy BONNEVILLE Date: Thu, 14 May 2020 17:06:39 +0200 Subject: [PATCH] Fix Sonar issues --- ModernKeePass.Domain/Enums/EntryFieldName.cs | 2 +- ModernKeePass/Package.appxmanifest | 2 +- .../SettingsGeneralPage.xaml.cs | 2 +- .../SettingsHistoryPage.xaml.cs | 2 +- .../SettingsRecycleBinPage.xaml.cs | 21 +++---------------- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/ModernKeePass.Domain/Enums/EntryFieldName.cs b/ModernKeePass.Domain/Enums/EntryFieldName.cs index 0c9ed66..9c91e57 100644 --- a/ModernKeePass.Domain/Enums/EntryFieldName.cs +++ b/ModernKeePass.Domain/Enums/EntryFieldName.cs @@ -15,7 +15,7 @@ namespace ModernKeePass.Domain.Enums public const string BackgroundColor = nameof(BackgroundColor); public const string ForegroundColor = nameof(ForegroundColor); - public static IEnumerable StandardFieldNames = new[] + public static IEnumerable StandardFieldNames => new[] { Title, UserName, diff --git a/ModernKeePass/Package.appxmanifest b/ModernKeePass/Package.appxmanifest index 1fd7f8a..3ad51c8 100644 --- a/ModernKeePass/Package.appxmanifest +++ b/ModernKeePass/Package.appxmanifest @@ -1,6 +1,6 @@  - + ModernKeePass wismna diff --git a/ModernKeePass/Views/SettingsPageFrames/SettingsGeneralPage.xaml.cs b/ModernKeePass/Views/SettingsPageFrames/SettingsGeneralPage.xaml.cs index 2a8432b..0d6c587 100644 --- a/ModernKeePass/Views/SettingsPageFrames/SettingsGeneralPage.xaml.cs +++ b/ModernKeePass/Views/SettingsPageFrames/SettingsGeneralPage.xaml.cs @@ -17,7 +17,7 @@ namespace ModernKeePass.Views private void UIElement_OnKeyDown(object sender, KeyRoutedEventArgs e) { - if ((e.Key < VirtualKey.NumberPad0 || e.Key > VirtualKey.NumberPad9) & (e.Key < VirtualKey.Number0 || e.Key > VirtualKey.Number9)) + if ((e.Key < VirtualKey.NumberPad0 || e.Key > VirtualKey.NumberPad9) && (e.Key < VirtualKey.Number0 || e.Key > VirtualKey.Number9)) { e.Handled = true; } diff --git a/ModernKeePass/Views/SettingsPageFrames/SettingsHistoryPage.xaml.cs b/ModernKeePass/Views/SettingsPageFrames/SettingsHistoryPage.xaml.cs index 5a3987b..fc20896 100644 --- a/ModernKeePass/Views/SettingsPageFrames/SettingsHistoryPage.xaml.cs +++ b/ModernKeePass/Views/SettingsPageFrames/SettingsHistoryPage.xaml.cs @@ -17,7 +17,7 @@ namespace ModernKeePass.Views.SettingsPageFrames private void UIElement_OnKeyDown(object sender, KeyRoutedEventArgs e) { - if ((e.Key < VirtualKey.NumberPad0 || e.Key > VirtualKey.NumberPad9) & (e.Key < VirtualKey.Number0 || e.Key > VirtualKey.Number9)) + if ((e.Key < VirtualKey.NumberPad0 || e.Key > VirtualKey.NumberPad9) && (e.Key < VirtualKey.Number0 || e.Key > VirtualKey.Number9)) { e.Handled = true; } diff --git a/ModernKeePass/Views/SettingsPageFrames/SettingsRecycleBinPage.xaml.cs b/ModernKeePass/Views/SettingsPageFrames/SettingsRecycleBinPage.xaml.cs index a24fafe..3399c24 100644 --- a/ModernKeePass/Views/SettingsPageFrames/SettingsRecycleBinPage.xaml.cs +++ b/ModernKeePass/Views/SettingsPageFrames/SettingsRecycleBinPage.xaml.cs @@ -1,30 +1,15 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 namespace ModernKeePass.Views.SettingsPageFrames { /// /// An empty page that can be used on its own or navigated to within a Frame. /// - public sealed partial class SettingsRecycleBinPage : Page + public sealed partial class SettingsRecycleBinPage { public SettingsRecycleBinPage() { - this.InitializeComponent(); + InitializeComponent(); } } }