Ejemplo n.º 1
0
        public void StopReplayProcess()
        {
            try
            {
                int result = 0;
                RecordDataInfoEntity record = replayUserControls.RecordList.SelectedItem as RecordDataInfoEntity;
                replayUserControls.RecordList.CommitEdit();//刷新数据的编辑

                if (replayUserControls.RecordType.SelectedIndex == 0)
                {
                    result = OcxHelper.OCX.IVS_OCX_StopPlatformPlayBack(Convert.ToInt32(record.WndID));
                }
                else
                {
                    result = OcxHelper.OCX.IVS_OCX_StopPUPlayBack(Convert.ToInt32(record.WndID));
                }
                if (result == 0)
                {
                    OcxHelper.MainWin.OperationInfo.Content = StringHelper.FindLanguageResource("StopReplay") + StringHelper.FindLanguageResource("Success");
                }
                else
                {
                    OcxHelper.MainWin.OperationInfo.Content = StringHelper.FindLanguageResource(result.ToString());
                }
                replayUserControls.eSDKCodeTextBlock.Text = @"var result = OcxHelper.OCX.IVS_OCX_StopBackupPlayBack(Convert.ToInt32(record.WndID));";
            }

            catch (Exception ex)
            {
                LogService.Error(ex.ToString());
                OcxHelper.MainWin.OperationInfo.Content = ex.ToString();
                return;
            }
        }
Ejemplo n.º 2
0
 private void CopyProcess()
 {
     try
     {
         RecordDataInfoEntity record = (replayUserControls.RecordList.SelectedItem as RecordDataInfoEntity);
         if (record != null)
         {
             OcxHelper.MainWin.downloadAndCaptureUserControls.CameraCode.Text = record.CameraCode;
             OcxHelper.MainWin.downloadAndCaptureUserControls.StartTime.Text  = Convert.ToDateTime(record.LocalStartTime).ToString("yyyyMMddHHmmss");
             OcxHelper.MainWin.downloadAndCaptureUserControls.EndTime.Text    = Convert.ToDateTime(record.LocalEndTime).ToString("yyyyMMddHHmmss");
         }
     }
     catch (Exception ex)
     {
         LogService.Error(ex.ToString());
     }
 }
Ejemplo n.º 3
0
        public void StartReplayProcess()
        {
            try
            {
                RecordDataInfoEntity record = replayUserControls.RecordList.SelectedItem as RecordDataInfoEntity;
                replayUserControls.RecordList.CommitEdit();//刷新数据的编辑
                OcxHelper.InitOcxPaneState(Convert.ToInt32(record.WndID));

                PlaybackParam para = new PlaybackParam();
                para.StartTime    = record.StartTime;
                para.EndTime      = record.EndTime;
                para.NVRCode      = record.NvrCode;
                para.ProtocolType = "2";
                para.Speed        = "1";

                var requestXml = XmlHelper.SerializeToXml(para);
                requestXml = XmlHelper.GetContentXml(requestXml);

                int result = 0;
                if (replayUserControls.RecordType.SelectedIndex == 0)
                {
                    result = OcxHelper.OCX.IVS_OCX_StartPlatformPlayBack(record.CameraCode, requestXml, Convert.ToInt32(record.WndID));
                }
                else
                {
                    result = OcxHelper.OCX.IVS_OCX_StartPUPlayBack(record.CameraCode, requestXml, Convert.ToInt32(record.WndID));
                }
                if (result == 0)
                {
                    OcxHelper.MainWin.OperationInfo.Content = StringHelper.FindLanguageResource("StartReplay") + StringHelper.FindLanguageResource("Success");
                }
                else
                {
                    OcxHelper.MainWin.OperationInfo.Content = StringHelper.FindLanguageResource(result.ToString());
                }
                replayUserControls.eSDKCodeTextBlock.Text = @"var result = OcxHelper.OCX.IVS_OCX_StartPlatformPlayBack(inrecord.CameraCode, requestXml, Convert.ToInt32(record.WndID));";
            }
            catch (Exception ex)
            {
                LogService.Error(ex.ToString());
                OcxHelper.MainWin.OperationInfo.Content = ex.ToString();
                return;
            }
        }