pascalabcnet/WeifenLuoLinux/WinFormsUI/Docking/Helpers/Win32Helper.cs
Mikhalkovich Stanislav 3072383106 Для Linux-версии исправлен DockContent, редактор (показ всплывающего окна)
Сделан новый проект VisualPABCLinux
И пришлось склонировать PluginsSupport, поскольку он вносит зависимость по редактору
Компоненты WeifenLuo для Linux надо после перекомпиляции скопировать в Libraries - подшить их к основному проекту просто не получилось
2022-06-30 09:47:11 +03:00

30 lines
922 B
C#

using System;
using System.Drawing;
using System.Windows.Forms;
namespace WeifenLuo.WinFormsUI.Docking
{
public static class Win32Helper
{
private static readonly bool _isRunningOnMono = Type.GetType("Mono.Runtime") != null;
public static bool IsRunningOnMono { get { return _isRunningOnMono; } }
internal static Control ControlAtPoint(Point pt)
{
return Control.FromChildHandle(NativeMethods.WindowFromPoint(pt));
}
internal static uint MakeLong(int low, int high)
{
return (uint)((high << 16) + low);
}
internal static uint HitTestCaption(Control control)
{
var captionRectangle = new Rectangle(0, 0, control.Width, control.ClientRectangle.Top - control.PointToClient(control.Location).X);
return captionRectangle.Contains(Control.MousePosition) ? (uint)2 : 0;
}
}
}