using EC.Entity.Video; using ECMonitor.Code.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ECMonitor.Code { public class ShowVideoManager { public int UCVideoIndex = 0; public List UCVideoList = new List(); public VideoShowModel CreateVideoShowModel(string cameraIp) { VideoShowModel ucVideoShowModel = new VideoShowModel(); ucVideoShowModel.CameraIp = cameraIp; ucVideoShowModel.UCName = "UCRegVideo" + UCVideoIndex++; MonitorCamera camera = CameraManager.GetCamera(cameraIp); if (camera != null) { ucVideoShowModel.Camera = camera; } else { ucVideoShowModel.Message = "没有视频"; } UCVideoList.Add(ucVideoShowModel); return ucVideoShowModel; } /// /// 获取显示模块 /// /// /// public VideoShowModel GetVideoShowModel(string cameraIp) { return UCVideoList.Find(c => c.CameraIp == cameraIp); } internal void Remove(VideoShowModel videoShow) { UCVideoList.Remove(videoShow); } } }