Misc tweaks

no functional change
HaX popup now uses Task Dialog api for cleaner impl
This commit is contained in:
Kurt 2026-01-12 21:48:28 -06:00
parent 3489555f74
commit 19655ec2ec
5 changed files with 16 additions and 1 deletions

View File

@ -2,6 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using static System.Buffers.Binary.BinaryPrimitives;
#pragma warning disable CA1857
namespace PKHeX.Core;

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable CA1857
namespace PKHeX.Core;

View File

@ -3,6 +3,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using static System.Buffers.Binary.BinaryPrimitives;
#pragma warning disable CA1857
namespace PKHeX.Core;

View File

@ -15,14 +15,17 @@ public sealed class SlotChangeInfo<TCursor, TImageSource>
/// Gets or sets a value indicating whether the left mouse button is down.
/// </summary>
public bool IsLeftMouseDown { get; set; }
/// <summary>
/// Gets or sets a value indicating whether a drag-and-drop operation is in progress.
/// </summary>
public bool IsDragDropInProgress { get; set; }
/// <summary>
/// Gets or sets the current cursor.
/// </summary>
public TCursor? Cursor { get; set; }
/// <summary>
/// Gets or sets the current file path involved in the drag-and-drop operation.
/// </summary>

View File

@ -1353,6 +1353,15 @@ public void PromptBackup(string folder)
public void WarnBehavior()
{
WinFormsUtil.Alert(MsgProgramIllegalModeActive, MsgProgramIllegalModeBehave);
var page = new TaskDialogPage
{
Caption = MsgProgramIllegalModeActive,
Text = MsgProgramIllegalModeBehave,
Icon = TaskDialogIcon.Shield,
DefaultButton = TaskDialogButton.OK,
Buttons = [TaskDialogButton.OK],
AllowCancel = true,
};
TaskDialog.ShowDialog(this, page);
}
}