[fxcop] Settings UI library (part 1) (#7187)

* Mark methods static and replace Count() with Length

* Use IsNullOrEmpty for null string checks

* Remove redundant initializations to default values

* Use nameof(property name) in place of string literals

* Add NativeMethods class

* Rename property getters in KeysDataModel & AppSpecificKeysDataModel

* Remove underscores from method names

* Mark Helper class static

* Address comments & typo fixes

* Add EncoderGuid property and fix failing build

* Update binding in GeneralPages.xaml
This commit is contained in:
Luthfi Mawarid
2020-10-09 17:58:52 -07:00
committed by GitHub
parent 8643bfc977
commit 889f20c4a7
17 changed files with 115 additions and 88 deletions

View File

@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation
// 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.Runtime.InteropServices;
using System.Text;
namespace Microsoft.PowerToys.Settings.UI.Lib.Utilities
{
internal static class NativeMethods
{
[DllImport("user32.dll")]
public static extern bool AllowSetForegroundWindow(int dwProcessId);
}
}