public void GetChannelByFileMapNameTest()
        {
            string strPath    = "/63-00F628C55D02-1812/FILE_MAP_02";
            int    intChannel = SDK_SKNVideo.GetChannelByFileMapPath(strPath);

            Assert.AreEqual(intChannel, 1);
        }
예제 #2
0
 private void VideoEnvironment_SKN_DownLoadDoneEvent(object sender, object value)
 {
     this.BeginInvoke(new EventHandler(delegate
     {
         CommonMethod.Common.Delay_Millisecond(5000);
         int intChannel   = SDK_SKNVideo.GetChannelByFileMapPath(Convert.ToString(value));
         CameraInfo cInfo = ProgPara.CurrentProgPara.VideoInfo.Cameras[intChannel];
         WriteEvent("[" + cInfo.CameraName + "]录像文件映射获取文件");
         string Temp_strPath = ProgPara.CurrentProgPara.DefaultSaveDir + SDK_SKNVideo.GetLocalFileMapPath(cInfo);
         List <RemotePlaybackFileInfo> Temp_lst = VideoPlayControl_RemotePlayback.PubMethod.GetRemotePlaybackFileInfo_SKN(Temp_strPath, ProgPara.CurrentProgPara.PlaybackTimeStart, ProgPara.CurrentProgPara.PlaybackTimeEnd);
         foreach (Control c in pnlChannel.Controls)
         {
             ChannelRemotePlaybackInfo cbInfo = (ChannelRemotePlaybackInfo)c;
             if (cbInfo.CurrentRemotePlaybackInfo.ChnnelInfo != cInfo)
             {
                 continue;
             }
             cbInfo.CurrentRemotePlaybackInfo.PlaybackFiles = Temp_lst.FindAll(item => item.WriteOK).ToList();
             //刷新录像信息
             remoteBackplayControl1.SetRemotePlaybackInfo(cbInfo.CurrentRemotePlaybackInfo);
             cbInfo.SetRemotePlaybackInfo(cbInfo.CurrentRemotePlaybackInfo);
             CommonMethod.Common.Delay_Millisecond(1500);
             WriteEvent("[" + cInfo.CameraName + "]刷新录像文件信息");
         }
     }));
     VideoEnvironment_SKN.DownLoadDoneEvent -= VideoEnvironment_SKN_DownLoadDoneEvent;
 }