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:
@@ -78,7 +78,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
private static bool KillProcessCommand(Window window)
|
||||
{
|
||||
// Validate process
|
||||
if (!window.IsWindow || !window.Process.DoesExist || !window.Process.Name.Equals(WindowProcess.GetProcessNameFromProcessID(window.Process.ProcessID), StringComparison.Ordinal) )
|
||||
if (!window.IsWindow || !window.Process.DoesExist || !window.Process.Name.Equals(WindowProcess.GetProcessNameFromProcessID(window.Process.ProcessID), StringComparison.Ordinal))
|
||||
{
|
||||
Log.Debug($"Can not kill process '{window.Process.Name}' ({window.Process.ProcessID}) of the window '{window.Title}' ({window.Hwnd}), because it doesn't exist.", typeof(ContextMenuHelper));
|
||||
return false;
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// <param name="text">The text to search inside of</param>
|
||||
/// <param name="searchText">the text to search for</param>
|
||||
/// <returns>returns the index location of each of the letters of the matches</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1814:Prefer jagged arrays over multidimensional", Justification = "matches does not waste space with the current implementation, however this could probably be optimized to store the indices of matches instead of boolean values. Currently there are no unit tests for this, but we could refactor if memory/perf becomes an issue. ")]
|
||||
internal static List<int> FindBestFuzzyMatch(string text, string searchText)
|
||||
{
|
||||
if (searchText == null)
|
||||
@@ -85,7 +84,6 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// a two dimensional array with the first dimension the text and the second
|
||||
/// one the search string and each cell marked as an intersection between the two</param>
|
||||
/// <returns>a list of the possible combinations that match the search text</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1814:Prefer jagged arrays over multidimensional", Justification = "matches does not waste space with the current implementation, however this could probably be optimized to store the indices of matches instead of boolean values. Currently there are no unit tests for this, but we could refactor if memory/perf becomes an issue. ")]
|
||||
internal static List<List<int>> GetAllMatchIndexes(bool[,] matches)
|
||||
{
|
||||
if (matches == null)
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// </summary>
|
||||
internal static class ResultHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of all results for the query.
|
||||
/// </summary>
|
||||
/// <param name="searchControllerResults">List with all search controller matches</param>
|
||||
/// <param name="icon">The path to the result icon</param>
|
||||
/// <returns>List of results</returns>
|
||||
/// <summary>
|
||||
/// Returns a list of all results for the query.
|
||||
/// </summary>
|
||||
/// <param name="searchControllerResults">List with all search controller matches</param>
|
||||
/// <param name="icon">The path to the result icon</param>
|
||||
/// <returns>List of results</returns>
|
||||
internal static List<Result> GetResultList(List<SearchResult> searchControllerResults, bool isKeywordSearch, string icon, string infoIcon)
|
||||
{
|
||||
bool addExplorerInfo = false;
|
||||
@@ -113,7 +113,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
|
||||
return new ToolTipData(window.Title, text);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
string text = $"hWnd: {window.Hwnd}\n" +
|
||||
$"Window class: {window.ClassName}\n" +
|
||||
@@ -134,7 +134,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
$"Is AllDesktops view: {window.Desktop.IsAllDesktopsView}";
|
||||
|
||||
return new ToolTipData(window.Title, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user