[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

@@ -6,12 +6,9 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
namespace PowerLauncher.Converters
{
@@ -19,9 +16,7 @@ namespace PowerLauncher.Converters
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
#pragma warning disable CA1062 // Validate arguments of public methods
var text = values[0] as string;
#pragma warning restore CA1062 // Validate arguments of public methods
var highlightData = values[1] as List<int>;
var selected = values[2] as bool? == true;

View File

@@ -2,9 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Controls;

View File

@@ -3,12 +3,9 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Globalization;
using System.Windows;
using System.Windows.Threading;
using NLog;
using Wox.Infrastructure;
using Wox.Infrastructure.Exception;
using Wox.Plugin;

View File

@@ -7,7 +7,6 @@ using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using Microsoft.Win32.SafeHandles;
using static PowerLauncher.Helper.WindowsInteropHelper;
// http://blogs.microsoft.co.il/arik/2010/05/28/wpf-single-instance-application/

View File

@@ -11,7 +11,6 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using interop;
// http://blogs.microsoft.co.il/arik/2010/05/28/wpf-single-instance-application/
// modified to allow single instance restart

View File

@@ -124,9 +124,7 @@ namespace PowerLauncher
private const string EnvironmentChangeType = "Environment";
#pragma warning disable CA1801 // Review unused parameters
public IntPtr ProcessWindowMessages(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled)
#pragma warning restore CA1801 // Review unused parameters
{
switch ((WM)msg)
{

View File

@@ -481,9 +481,7 @@ namespace PowerLauncher.ViewModel
private void QueryHistory()
{
// Using CurrentCulture since query is received from user and used in downstream comparisons using CurrentCulture
#pragma warning disable CA1308 // Normalize strings to uppercase
var query = QueryText.ToLower(CultureInfo.CurrentCulture).Trim();
#pragma warning restore CA1308 // Normalize strings to uppercase
History.Clear();
var results = new List<Result>();
@@ -768,9 +766,7 @@ namespace PowerLauncher.ViewModel
return selected;
}
#pragma warning disable CA1801 // Review unused parameters
internal bool ProcessHotKeyMessages(IntPtr wparam, IntPtr lparam)
#pragma warning restore CA1801 // Review unused parameters
{
if (wparam.ToInt32() == _globalHotKeyId)
{