using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Platform; using Avalonia.Threading; using EC.Util.CameraSDK; using EC.Util.Platform; using JiLinApp.Core.Avalonia; using JiLinApp.Docking.Ptz; using System; using System.Collections.Generic; using System.Runtime.InteropServices; namespace JiLinApp.Components; public partial class CameraRealPlay : Window { #region private ICameraSdk? CameraSdk { get; set; } #endregion public CameraRealPlay() { InitializeComponent(); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { IPlatformHandle? pfHandle = TryGetPlatformHandle(); if (pfHandle != null) WinUtil.DisableMinMaximizeButton(pfHandle.Handle); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && PlatformImpl != null) { IntPtr _display = ControlsUtil.GetDisplay(PlatformImpl); IntPtr _handle = ControlsUtil.GetHandle(PlatformImpl); IntPtr _atom = ControlsUtil.GetAtom(PlatformImpl, "_MOTIF_WM_HINTS"); LinuxUtil.DisableMinMaximizeButton(_display, _handle, _atom); } //绑定云台响应事件 List