private void OnWindowClosing()
 {
     LogHelper.Debug(nameof(MonitorViewModel) + " Closing");
     FourVideoVM.Stop();
     SimpleIoc.Default.Unregister <PoseInfoVM>();
     SimpleIoc.Default.Unregister <BaseFourVideoVM>();
 }
        private void OnWindowLoaded()
        {
            if (this.FourVideoVM is FourVideoViewModel)
            {
                if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 0)
                {
                    FourVideoVM.Url1 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[0].VideoAddress;
                    if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 1)
                    {
                        FourVideoVM.Url2 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[1].VideoAddress;
                    }
                    if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 2)
                    {
                        FourVideoVM.Url3 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[2].VideoAddress;
                    }
                    if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 3)
                    {
                        FourVideoVM.Url4 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[3].VideoAddress;
                    }
                }
            }
            else if (this.FourVideoVM is HuoChaiRenFourVideoVM)
            {
                HuoChaiRenFourVideoVM huoChaiRenFourVideoVM = FourVideoVM as HuoChaiRenFourVideoVM;
                huoChaiRenFourVideoVM.RoomId = (uint)PoseInfo.AgesInfo.RoomInfoId;
                if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 0)
                {
                    huoChaiRenFourVideoVM.Url1 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[0].Id.ToString();
                    if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 1)
                    {
                        huoChaiRenFourVideoVM.Url2 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[1].Id.ToString();
                    }
                    if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 2)
                    {
                        huoChaiRenFourVideoVM.Url3 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[2].Id.ToString();
                    }
                    if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count > 3)
                    {
                        huoChaiRenFourVideoVM.Url4 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[3].Id.ToString();
                    }
                }
            }
            else if (this.FourVideoVM is HuoChaiAndOriginVideoVM)
            {
                HuoChaiAndOriginVideoVM huoChaiAndOriginVideoVM = FourVideoVM as HuoChaiAndOriginVideoVM;
                huoChaiAndOriginVideoVM.RoomId = (uint)PoseInfo.AgesInfo.RoomInfoId;
                if (PoseInfo.AgesInfo.RoomInfo.CameraInfos.Count == 1)
                {
                    huoChaiAndOriginVideoVM.Url1 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[0].Id.ToString();
                    //huoChaiAndOriginVideoVM.Url2 = PoseInfo.AgesInfo.RoomInfo.CameraInfos[0].VideoAddress;
                }
                else
                {
                    System.Console.WriteLine("当前不支持一个房间多个摄像头");
                }
            }
            else
            {
            }

            FourVideoVM.Start();
        }