mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Build] Upgraded NetAnalyzers to 7.0.1 (#24792)
* upgraded NetAnalyzers to 7.0.1 * fix spellcheck * Microsoft.CodeAnalysis.NetAnalyzers 7.0.1 * rebase and fix
This commit is contained in:
committed by
GitHub
parent
5492b4ae62
commit
5cbe9dd911
@@ -24,7 +24,7 @@ using BitmapDecoder = Windows.Graphics.Imaging.BitmapDecoder;
|
||||
|
||||
namespace PowerOCR;
|
||||
|
||||
internal class ImageMethods
|
||||
internal sealed class ImageMethods
|
||||
{
|
||||
internal static ImageSource GetWindowBoundsImage(Window passedWindow)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace PowerOCR.Keyboard
|
||||
/// This class handles the interaction model when running from PowerToys Run.
|
||||
/// Handles activation through the event sent by the runner.
|
||||
/// </summary>
|
||||
internal class EventMonitor
|
||||
internal sealed class EventMonitor
|
||||
{
|
||||
public EventMonitor(System.Windows.Threading.Dispatcher dispatcher, System.Threading.CancellationToken exitToken)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using static PowerOCR.OSInterop;
|
||||
|
||||
namespace PowerOCR.Keyboard;
|
||||
|
||||
internal class GlobalKeyboardHook : IDisposable
|
||||
internal sealed class GlobalKeyboardHook : IDisposable
|
||||
{
|
||||
private IntPtr _windowsHookHandle;
|
||||
private IntPtr _user32LibraryHandle;
|
||||
@@ -39,7 +39,7 @@ internal class GlobalKeyboardHook : IDisposable
|
||||
|
||||
internal event EventHandler<GlobalKeyboardHookEventArgs>? KeyboardPressed;
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
public void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using static PowerOCR.OSInterop;
|
||||
|
||||
namespace PowerOCR.Keyboard;
|
||||
|
||||
internal class GlobalKeyboardHookEventArgs : HandledEventArgs
|
||||
internal sealed class GlobalKeyboardHookEventArgs : HandledEventArgs
|
||||
{
|
||||
internal GlobalKeyboardHook.KeyboardState KeyboardState { get; private set; }
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public partial class OCROverlay : Window
|
||||
|
||||
private Point GetMousePos() => PointToScreen(Mouse.GetPosition(this));
|
||||
|
||||
private Language? selectedLanguage = null;
|
||||
private Language? selectedLanguage;
|
||||
private MenuItem cancelMenuItem;
|
||||
|
||||
private System.Windows.Forms.Screen? CurrentScreen
|
||||
@@ -70,8 +70,8 @@ public partial class OCROverlay : Window
|
||||
foreach (Language language in possibleOcrLanguages)
|
||||
{
|
||||
MenuItem menuItem = new MenuItem() { Header = language.NativeName, Tag = language, IsCheckable = true };
|
||||
menuItem.IsChecked = language.DisplayName.Equals(selectedLanguageName);
|
||||
if (language.DisplayName.Equals(selectedLanguageName))
|
||||
menuItem.IsChecked = language.DisplayName.Equals(selectedLanguageName, StringComparison.Ordinal);
|
||||
if (language.DisplayName.Equals(selectedLanguageName, StringComparison.Ordinal))
|
||||
{
|
||||
selectedLanguage = language;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user