[mono] XenAdmin: MultiSelectTreeView: Disable HScroll manipulation

This hotfix disables the functionality that is a cause of exceptions throwing on Mono runtime. The expected negative impact is the probability to lose the horizontal scroll function somewhere.

Signed-off-by: Ilya Stolyarov <ila.embsys@gmail.com>
This commit is contained in:
Ilya Stolyarov 2024-05-01 21:28:18 +04:00
parent 91ac3b9f0c
commit 296e729462

View File

@ -1088,11 +1088,21 @@ namespace XenAdmin.Controls
{
get
{
return ScrollInfo(Win32.ScrollBarConstants.SB_HORZ);
if (System.Type.GetType("Mono.Runtime") == null)
{
return ScrollInfo(Win32.ScrollBarConstants.SB_HORZ);
}
else
{
return 0;
}
}
set
{
Win32.SendMessage(Handle, Win32.WM_HSCROLL, (IntPtr)(((int)Win32.ScrollBarCommands.SB_THUMBPOSITION) | (value << 16)), (IntPtr)0);
if (System.Type.GetType("Mono.Runtime") == null)
{
Win32.SendMessage(Handle, Win32.WM_HSCROLL, (IntPtr)(((int)Win32.ScrollBarCommands.SB_THUMBPOSITION) | (value << 16)), (IntPtr)0);
}
}
}