mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[Chore] Run solution code cleanup (#20584)
This commit is contained in:
@@ -27,12 +27,12 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
/// <param name="e">The arguments of this event</param>
|
||||
private void ColorPicker_ComboBox_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
/**
|
||||
* UWP hack
|
||||
* because UWP load the bound ItemSource of the ComboBox asynchronous,
|
||||
* so after InitializeComponent() the ItemSource is still empty and can't automatically select a entry.
|
||||
* Selection via SelectedItem and SelectedValue is still not working too
|
||||
*/
|
||||
/**
|
||||
* UWP hack
|
||||
* because UWP load the bound ItemSource of the ComboBox asynchronous,
|
||||
* so after InitializeComponent() the ItemSource is still empty and can't automatically select a entry.
|
||||
* Selection via SelectedItem and SelectedValue is still not working too
|
||||
*/
|
||||
var index = 0;
|
||||
|
||||
foreach (var item in ViewModel.SelectableColorRepresentations)
|
||||
|
||||
@@ -3,14 +3,12 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.ApplicationModel.Resources;
|
||||
using Windows.UI.Core;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
@@ -50,9 +49,9 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
dialog.Content = new TextBlock() { Text = resourceLoader.GetString("Delete_Dialog_Description") };
|
||||
dialog.PrimaryButtonClick += (s, args) =>
|
||||
{
|
||||
// Using InvariantCulture since this is internal and expected to be numerical
|
||||
bool success = int.TryParse(deleteRowButton?.CommandParameter?.ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture, out int rowNum);
|
||||
if (success)
|
||||
// Using InvariantCulture since this is internal and expected to be numerical
|
||||
bool success = int.TryParse(deleteRowButton?.CommandParameter?.ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture, out int rowNum);
|
||||
if (success)
|
||||
{
|
||||
ViewModel.DeleteImageSize(rowNum);
|
||||
}
|
||||
@@ -77,7 +76,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
}
|
||||
}
|
||||
|
||||
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "Params are required for event handler signature requirements.")]
|
||||
private void ImagesSizesListView_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
|
||||
{
|
||||
if (ViewModel.IsListViewFocusRequested)
|
||||
|
||||
@@ -10,7 +10,6 @@ using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.ApplicationModel.Resources;
|
||||
using Windows.UI.Core;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.PowerToys.Settings.UI.Services;
|
||||
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||
using Microsoft.UI.Xaml;
|
||||
@@ -167,8 +166,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
|
||||
private bool navigationViewInitialStateProcessed; // avoid announcing initial state of the navigation pane.
|
||||
|
||||
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "Params are required for event handler signature requirements.")]
|
||||
#pragma warning disable CA1822 // Mark members as static
|
||||
private void NavigationView_PaneOpened(Microsoft.UI.Xaml.Controls.NavigationView sender, object args)
|
||||
{
|
||||
if (!navigationViewInitialStateProcessed)
|
||||
@@ -194,7 +191,6 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
}
|
||||
}
|
||||
|
||||
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "Params are required for event handler signature requirements.")]
|
||||
private void NavigationView_PaneClosed(Microsoft.UI.Xaml.Controls.NavigationView sender, object args)
|
||||
{
|
||||
if (!navigationViewInitialStateProcessed)
|
||||
|
||||
Reference in New Issue
Block a user