This commit is contained in:
龙腾猫跃 committed 2026-06-22 20:22:22 +08:00
1 parent 1508b58a9b
commit 7ce6a6abc0
2 files changed
+7 -13

No files matched your search

+7 -2
View File
@@ -157,8 +157,13 @@ public static class PathUtils {
/// 统一路径格式,以便比较。 /// 统一路径格式,以便比较。
/// <para/>具体而言:将短路径展开,去除前导的 <c>\\?\</c>,将分隔符改为 \,去除末尾的分隔符。 /// <para/>具体而言:将短路径展开,去除前导的 <c>\\?\</c>,将分隔符改为 \,去除末尾的分隔符。
/// </summary> /// </summary>
public static string ForCompare(string pathName) public static string ForCompare(string pathName) {
=> PathUtils.RemoveSlashSuffix(PathUtils.RemoveExtendedPrefix(Path.GetFullPath(pathName)).Replace("/", @"\")); try {
return PathUtils.RemoveSlashSuffix(PathUtils.RemoveExtendedPrefix(Path.GetFullPath(pathName)).Replace("/", @"\"));
} catch (ArgumentException ex) {
throw new ArgumentException($"路径不正确:{pathName}", ex);
}
}
/// <summary> /// <summary>
/// 将路径转换为兼容各种 Windows API 的格式。 /// 将路径转换为兼容各种 Windows API 的格式。
-11
View File
@@ -124,17 +124,6 @@ public static class ModernTooltipService {
private static void OnMouseLeave(object sender, MouseEventArgs e) { private static void OnMouseLeave(object sender, MouseEventArgs e) {
if (sender is not FrameworkElement owner || !ReferenceEquals(owner, currentOwner)) return; if (sender is not FrameworkElement owner || !ReferenceEquals(owner, currentOwner)) return;
if (sender is TextBox box) {
Logger.Warn("MOUSELEAVE: " + (
$"Leave: IsMouseOver={box.IsMouseOver}, " +
$"Captured={Mouse.Captured}, " +
$"DirectlyOver={Mouse.DirectlyOver}, " +
$"OriginalSource={e.OriginalSource}"), LogBehavior.None);
}
Logger.Warn("MOUSELEAVE: " + sender.GetType().Name + ", " +
$"Captured={Mouse.Captured}, " +
$"DirectlyOver={Mouse.DirectlyOver}, " +
$"OriginalSource={e.OriginalSource}", LogBehavior.None);
if (!(owner.IsEnabled || !ToolTipService.GetShowOnDisabled(owner) || !IsPointInside(owner, Mouse.GetPosition(owner)))) return; if (!(owner.IsEnabled || !ToolTipService.GetShowOnDisabled(owner) || !IsPointInside(owner, Mouse.GetPosition(owner)))) return;