using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Threading; using EC.Util.CameraSDK; using EC.Util.Common; using EC.Util.Port; using JiLinApp.Biz.TransmitAlarm; using JiLinApp.Components; using JiLinApp.Core; using JiLinApp.Core.App; using JiLinApp.Core.Avalonia; using JiLinApp.Docking.FenceAlarm; using JiLinApp.Docking.Military; using JiLinApp.Docking.Ptz; using JiLinApp.Docking.VibrateAlarm; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO.Ports; using System.Linq; using System.Text.RegularExpressions; using System.Threading; namespace JiLinApp.Pages.PtzServer; public partial class Ptz : UserControl { #region Fields private AppConfig AppConfig { get; } = Global.AppConfig; private MilitaryService MilitaryService { get; } = Global.MilitaryService; private List CameraLinkageList { get; set; } = new(); private ConcurrentDictionary CameraSdkDict { get; } = new(); private ConcurrentDictionary RealPlayDict { get; } = new(); private Window? _win; private Window? Wdw { get { _win ??= ControlsUtil.GetWindow(this); return _win; } } #endregion Fields public Ptz() { InitializeComponent(); //绑定串口服务开关响应事件 OpenComBtn.Click += OpenComBtn_Click; CloseComBtn.Click += CloseComBtn_Click; //绑定实时视频响应事件 ShowLiveVideoBtn.Click += ShowLiveVideoBtn_Click; //绑定云台响应事件 List