[Chore] Run solution code cleanup (#20584)

This commit is contained in:
Andrey Nekrasov
2022-09-16 11:54:58 +03:00
committed by GitHub
parent 09f4dead7f
commit ca3c758046
133 changed files with 108 additions and 359 deletions

View File

@@ -18,9 +18,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(PowerAccentShortcutControl), new PropertyMetadata(default(string)));
#pragma warning disable CA2227 // Collection properties should be read only
public List<object> Keys
#pragma warning restore CA2227 // Collection properties should be read only
{
get { return (List<object>)GetValue(KeysProperty); }
set { SetValue(KeysProperty, value); }

View File

@@ -35,9 +35,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
set => SetValue(ModuleImageSourceProperty, value);
}
#pragma warning disable CA2227 // Collection properties should be read only
public ObservableCollection<PageLink> PrimaryLinks
#pragma warning restore CA2227 // Collection properties should be read only
{
get => (ObservableCollection<PageLink>)GetValue(PrimaryLinksProperty);
set => SetValue(PrimaryLinksProperty, value);
@@ -49,9 +47,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
set { SetValue(SecondaryLinksHeaderProperty, value); }
}
#pragma warning disable CA2227 // Collection properties should be read only
public ObservableCollection<PageLink> SecondaryLinks
#pragma warning restore CA2227 // Collection properties should be read only
{
get => (ObservableCollection<PageLink>)GetValue(SecondaryLinksProperty);
set => SetValue(SecondaryLinksProperty, value);

View File

@@ -305,9 +305,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
return _isActive;
}
#pragma warning disable CA1801 // Review unused parameters
private void ShortcutDialog_Opened(ContentDialog sender, ContentDialogOpenedEventArgs args)
#pragma warning restore CA1801 // Review unused parameters
{
if (!ComboIsValid(hotkeySettings))
{
@@ -340,9 +338,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
await shortcutDialog.ShowAsync();
}
#pragma warning disable CA1801 // Review unused parameters
private void ShortcutDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
#pragma warning restore CA1801 // Review unused parameters
{
if (ComboIsValid(lastValidSettings))
{
@@ -366,9 +362,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
}
}
#pragma warning disable CA1801 // Review unused parameters
private void ShortcutDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args)
#pragma warning restore CA1801 // Review unused parameters
{
_isActive = false;
}

View File

@@ -15,9 +15,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
this.InitializeComponent();
}
#pragma warning disable CA2227 // Collection properties should be read only
public List<object> Keys
#pragma warning restore CA2227 // Collection properties should be read only
{
get { return (List<object>)GetValue(KeysProperty); }
set { SetValue(KeysProperty, value); }

View File

@@ -18,9 +18,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(ShortcutWithTextLabelControl), new PropertyMetadata(default(string)));
#pragma warning disable CA2227 // Collection properties should be read only
public List<object> Keys
#pragma warning restore CA2227 // Collection properties should be read only
{
get { return (List<object>)GetValue(KeysProperty); }
set { SetValue(KeysProperty, value); }