Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
        private void FrmMain_Shown(object sender, EventArgs e)
        {
            int intCount = 0;

            while (SDK_SKNVideo.SDK_NSK_CLIENT_is_online() == 0 && intCount < 10)
            {
                CommonMethod.Common.Delay_Millisecond(1000);
                intCount++;
            }
            if (intCount < 10)
            {
                WriteEvent("登陆服务器成功");
            }
            else
            {
                WriteEvent("登陆服务器失败");
            }

            foreach (Control c in pnlChannel.Controls)
            {
                ChannelRemotePlaybackInfo cbInfo = (ChannelRemotePlaybackInfo)c;
                if (cbInfo.CurrentRemotePlaybackInfo.ChnnelInfo.Channel == ProgPara.CurrentProgPara.Channel)
                {
                    cbInfo.Checked = true;
                }
            }
            remoteBackplayControl1.SetCurrentPositionDateTime(ProgPara.CurrentProgPara.PlaybackTime);
        }
Exemplo n.º 3
0
 public void RefreshPlaybackInfo()
 {
     foreach (Control c in pnlChannel.Controls)
     {
         ChannelRemotePlaybackInfo cbInfo = (ChannelRemotePlaybackInfo)c;
         cbInfo.SetRemotePlaybackInfo(cbInfo.CurrentRemotePlaybackInfo);
     }
 }
Exemplo n.º 4
0
        private void CbInfo_CheckedChanged(object sender, EventArgs e)
        {
            ChannelRemotePlaybackInfo cbInfo = (ChannelRemotePlaybackInfo)sender;

            if (cbInfo.Checked)
            {
                VideoEnvironment_SKN.DownLoadDoneEvent += VideoEnvironment_SKN_DownLoadDoneEvent;
                CameraInfo cInfo = cbInfo.CurrentRemotePlaybackInfo.ChnnelInfo;
                WriteEvent("开始获取[" + cInfo.CameraName + "]录像文件映射");
                PubMethod.DownloadFileMap(cInfo);
            }
        }
Exemplo n.º 5
0
        public void SetVideoInfo_Control(VideoInfo vInfo)
        {
            List <RemotePlaybackFileInfo> lstBackplayInfo = new List <RemotePlaybackFileInfo>();

            pnlChannel.Controls.Clear();
            int intCount = 0;

            foreach (CameraInfo cInfo in vInfo.Cameras.Values)
            {
                ChannelRemotePlaybackInfo cbInfo = new ChannelRemotePlaybackInfo();
                cbInfo.CurrentRemotePlaybackInfo = null;
                cbInfo.Location = new System.Drawing.Point(3, 3 + (18 * intCount));
                cbInfo.Name     = "channelRemoteBackplayInfo_" + cInfo.Channel;
                cbInfo.Size     = new System.Drawing.Size(700, 18);
                pnlChannel.Controls.Add(cbInfo);
                cbInfo.Paint += CbInfo_Paint;
                cbInfo.SetRemotePlaybackInfo(GetVideoChannelRemoteBackplayInfo(cInfo, lstBackplayInfo));
                intCount++;
                cbInfo.CheckedChanged += CbInfo_CheckedChanged;
                cbInfo.SetToolTip(toolTip1, cInfo.CameraName);
            }
        }