private void btnEndReal_Click(object sender, EventArgs e) { try { int iCode = IVS_API.IVS_SDK_StopRealPlay(ApplicationEvent.iSession, (UInt32)ulRealPlayHandle); if (iCode == 0) { isPlay = false; } else { WriteLogText("停止实况失败"); } } catch (Exception ex) { WriteLogText("停止实况失败"); } }
private void btnEndReal_Click(object sender, EventArgs e) { try { int iCode = IVS_API.IVS_SDK_StopRealPlay(ApplicationEvent.iSession, (UInt32)ulRealPlayHandle); if (iCode == 0) { isPlay = false; } else { LB_MSG.Text = "停止实况失败"; } } catch (Exception ex) { log4net.WriteLogFile("停止实况失败", LogType.ERROR); } }
private void timAfter_Tick(object sender, EventArgs e) { timAfter.Enabled = false; int iCode = 0; try { iCode = IVS_API.IVS_SDK_StopRealPlay(ApplicationEvent.iSession, (UInt32)ulRealPlayHandle); } catch (Exception ex) { log4net.WriteLogFile("IVS_SDK_StopRealPlay失败!"); } try { String cORG_ID = INIConfig.ReadString("Config", AppConfig.ORG_ID); if (getTaskCameraCode(cORG_ID)) { log4net.WriteLogFile("剩余任务:" + ActiveLeftCount + ",当前任务:" + ActiveDevice_ID); int idx = CAMEAR_CODE_LIST.IndexOf(ActiveDevice_ID); if (idx == -1) { log4net.WriteLogFile("未找到匹配的摄像机!"); } else { Object objInfo = CAMEAR_INF_LIST[idx]; IVS_CAMERA_BRIEF_INFO rowKey = (IVS_CAMERA_BRIEF_INFO)objInfo; IVS_REALPLAY_PARAM para = new IVS_REALPLAY_PARAM(); para.bDirectFirst = false; para.bMultiCast = false; para.uiProtocolType = 2; para.uiStreamType = 1; ActiveCameraCode = rowKey.cCode; ActiveCameraName = rowKey.cName; this.txtCameraName.Text = ActiveCameraName; this.btnStartReal_Click(null, null); ArrayList YWZList = Camera_YZW_List(ActiveCameraCode); YWZ_TXT_LIST.Items.Clear(); YWZ_VAL_LIST.Clear(); // for (int i = 0; (YWZList != null) && (i < YWZList.Count); i++) if (YWZList.Count > 0) { for (int i = YWZList.Count - 1; i >= 0; i--) { IVS_PTZ_PRESET vPreset = (IVS_PTZ_PRESET)YWZList[i]; YWZ_TXT_LIST.Items.Add(vPreset.uiPresetIndex + ":" + vPreset.cPresetName); YWZ_VAL_LIST.Add(vPreset); } } } } } catch (Exception ex) { log4net.WriteLogFile(ActiveCameraName + "[" + ActiveCameraCode + "]" + ":" + ex.Message); } finally { timPreset.Enabled = true; } }