mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
[Analyzers] Update StyleCop and enable SA1200 (#22707)
* update StyleCop and enable SA1200 * Fix merge issues * fix build and added using rule
This commit is contained in:
committed by
GitHub
parent
617150cf50
commit
6d138e80fb
@@ -2,12 +2,12 @@
|
||||
// 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 PowerToys.PowerAccentKeyboardService;
|
||||
using Windows.Globalization;
|
||||
|
||||
namespace PowerAccent.Core
|
||||
{
|
||||
using System;
|
||||
using PowerToys.PowerAccentKeyboardService;
|
||||
using Windows.Globalization;
|
||||
|
||||
public enum Language
|
||||
{
|
||||
ALL,
|
||||
|
||||
@@ -100,7 +100,8 @@ public class PowerAccent : IDisposable
|
||||
{
|
||||
OnChangeDisplay?.Invoke(true, _characters);
|
||||
}
|
||||
}, TaskScheduler.FromCurrentSynchronizationContext());
|
||||
},
|
||||
TaskScheduler.FromCurrentSynchronizationContext());
|
||||
}
|
||||
|
||||
private string GetCharacterDescription(string character)
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace PowerAccent.Core.Services;
|
||||
|
||||
using System.IO.Abstractions;
|
||||
using System.Text.Json;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
using PowerToys.PowerAccentKeyboardService;
|
||||
using System.IO.Abstractions;
|
||||
using System.Text.Json;
|
||||
using static Vanara.PInvoke.LANGID;
|
||||
|
||||
namespace PowerAccent.Core.Services;
|
||||
public class SettingsService
|
||||
{
|
||||
private const string PowerAccentModuleName = "QuickAccent";
|
||||
|
||||
@@ -41,7 +41,7 @@ internal static class WindowsFunctions
|
||||
|
||||
public static Point GetCaretPosition()
|
||||
{
|
||||
User32.GUITHREADINFO guiInfo = new ();
|
||||
User32.GUITHREADINFO guiInfo = default;
|
||||
guiInfo.cbSize = (uint)Marshal.SizeOf(guiInfo);
|
||||
User32.GetGUIThreadInfo(0, ref guiInfo);
|
||||
POINT caretPosition = new POINT(guiInfo.rcCaret.left, guiInfo.rcCaret.top);
|
||||
@@ -59,12 +59,12 @@ internal static class WindowsFunctions
|
||||
|
||||
public static (Point Location, Size Size, double Dpi) GetActiveDisplay()
|
||||
{
|
||||
User32.GUITHREADINFO guiInfo = new ();
|
||||
User32.GUITHREADINFO guiInfo = default;
|
||||
guiInfo.cbSize = (uint)Marshal.SizeOf(guiInfo);
|
||||
User32.GetGUIThreadInfo(0, ref guiInfo);
|
||||
var res = User32.MonitorFromWindow(guiInfo.hwndActive, User32.MonitorFlags.MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
User32.MONITORINFO monitorInfo = new ();
|
||||
User32.MONITORINFO monitorInfo = default;
|
||||
monitorInfo.cbSize = (uint)Marshal.SizeOf(monitorInfo);
|
||||
User32.GetMonitorInfo(res, ref monitorInfo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user