private void btnPlay2_Click(object sender, EventArgs e) { if (btnStepPlayE.Enabled == true) { btnStepPlayE_Click(null, null); } switch (btnPlay2.Tag.ToString()) { case ">": if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Play) == true) { btnPlay2.Tag = "||"; play2State(); timerGetPlayInfo.Enabled = true; } break; case "||": if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Pause) == true) { btnPlay2.Tag = ">"; btnPlay2.Image = global::bykomDahua.Properties.Resources.play16x16; timerGetPlayInfo.Enabled = false; pause2State(); } break; case "x": //se presionó stop procesoStopPlayBack(); procesoPlay2(); break; } }
/// <summary> /// 停止按钮按下 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnStop_Click(object sender, EventArgs e) { if (DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.Stop) == false)//停止回放 { MessageBox.Show("停止回放失败!", pMsgTitle); } //画面按钮有效性控制 gpbPlayBackControl.Enabled = false; btnPlay.Enabled = false; btnSlow.Enabled = false; btnStop.Enabled = false; btnFast.Enabled = false; btnSetpPlayS.Enabled = false; hsbPlayBack.Enabled = false; btnPlayBackByTime.Enabled = true; btnPlayByRecordFile.Enabled = true; if (picRealPlay != null) { picRealPlay.Refresh(); picRealPlay.BackColor = SystemColors.Control; } else { picRealPlay15.Refresh(); picRealPlay.BackColor = SystemColors.Control; } }
private void procesoStopPlayBack() { if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Stop) == false) { //MessageBox.Show("Ocurrió un error al detener la reproducción", "error"); } }
private void btnCancelar_Click(object sender, EventArgs e) { DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Stop); pictureBoxPlayback.Refresh(); stop2State(); timerGetPlayInfo.Enabled = false; }
private void btnStop_Click(object sender, EventArgs e) { if (DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.Stop) == false)//停止回放 { MessageBox.Show("停止回放失败!", pMsgTitle); } groupBox1.Text = "请重新请求视频信号"; btnVideo1.Enabled = true; btnVideo2.Enabled = true; btnVideo3.Enabled = true; btnAisle.Enabled = true; btnControlroom.Enabled = true; groupVadioDownload.Enabled = true; //画面按钮有效性控制 gpbPlayBackControl.Enabled = false; btnPlay.Enabled = false; btnSlow.Enabled = false; btnStop.Enabled = false; btnFast.Enabled = false; btnSetpPlayS.Enabled = false; hsbPlayBack.Enabled = false; btnPlayBackByTime.Enabled = true; btnPlayByRecordFile.Enabled = true; if (picRealPlay != null) { picRealPlay.Refresh(); picRealPlay.BackColor = SystemColors.Control; } else { picRealPlay1.Refresh(); picRealPlay.BackColor = SystemColors.Control; } }
private void btnStop2_Click(object sender, EventArgs e) { if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Stop) == false)//停止回放 { MessageBox.Show("Ocurrió un error al detener la grabación", pMsgTitle); } btnCancelar_Click(null, null); }
/// <summary> /// 快放按钮按下 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnFast_Click(object sender, EventArgs e) { //停止步进播放 if (btnStepPlayE.Enabled == true) { btnStepPlayE_Click(null, null); } DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.Fast);//快放控制 }
private void btnFast_Click(object sender, EventArgs e) { if (playRecordFile > 0) { if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Fast) == false) { MessageBox.Show("No se pudo aplicar la operación", "error"); } } }
private void btnGrabaciones_Click(object sender, EventArgs e) { DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Stop); frm_PlayBackByFileSet fpf = new frm_PlayBackByFileSet(); fpf.gLoginID = pLoginID; fpf.ipDispositivo = this.ip;//pasa el ip actual //carga canales en combochanel de grabaciones fpf.cmbChannelSelect.Items.Clear(); for (int i = 0; i < deviceInfo.byChanNum; i++) { fpf.cmbChannelSelect.Items.Add((i + 1).ToString()); } //setea el combochanel de grabaciones en el canal actual fpf.cmbChannelSelect.SelectedIndex = comboBoxCamaras.SelectedIndex; //setea el textbox chanel en el canal actual fpf.channelActual = comboBoxCamaras.SelectedIndex.ToString(); fpf.ShowDialog(this); /* * if (fpf.blnOKEnter == true) * { * pPlayBackChannelID = int.Parse(fpf.txtChannelID.Text.ToString()); * fileInfo = fpf.gFileInfo; * playRecordFile = DHClient.DHPlayBackByRecordFile(pLoginID, ref fileInfo, picRecord.Handle, null, IntPtr.Zero); * if (playRecordFile == 0) * { * MessageBox.Show("Ocurrió un error con al cargar la grabación", pMsgTitle); * btnCancelar_Click(null, null); * } * else * { * btnPlay2.Text = "||"; * groupBoxVentanas1.Visible = false; * groupBoxVentanas4.Visible = false; * groupBoxVentanas9.Visible = false; * groupBoxVentanas16.Visible = false; * groupBoxRecord.Visible = true; * gpbPlayBackControl.Enabled = true; * btnTomarFoto.Enabled = false; * groupBox5.Enabled = false; * groupBox4.Enabled = false; * btnStop.Enabled = false; * btnPlay.Enabled = false; * } * } * */ }
/// <summary> /// 步进播放停止 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnStepPlayE_Click(object sender, EventArgs e) { try { if (DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.StepStop) == false)//单步播放停止 { MessageBox.Show("单步播放停止错误!", pMsgTitle); } } catch { MessageBox.Show(DHClient.LastOperationInfo.ToString(pErrInfoFormatStyle), pMsgTitle); } btnStepPlayE.Enabled = false; }
private void btnStepPlayE_Click_1(object sender, EventArgs e) { try { if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.StepStop) == false)//单步播放停止 { // MessageBox.Show("Ocurrió un error al reproducir la grabación", "Error"); } } catch { MessageBox.Show(DHClient.LastOperationInfo.ToString(), "Error"); } btnStepPlayE.Enabled = false; }
private void btnSetpPlayS_Click(object sender, EventArgs e) { try { if (DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.StepPlay) == true) { btnStepPlayE.Enabled = true; } else { MessageBox.Show("Ocurrió un error al ejecutar operación", "Error"); } } catch { MessageBox.Show(DHClient.LastOperationInfo.ToString(), "Error"); } }
private void trbPlayFrames_MouseUp(object sender, MouseEventArgs e) { if (DHPlay.DHPlayControl(PLAY_COMMAND.ReSume, 0)) { btnPlay2.Tag = "||"; play2State(); } else { MessageBox.Show("Problema al ejecutar operación", "Error"); } if (!DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.SeekByBit, (uint)(trbPlayFrames.Value * (fileInfo.size / 100)))) { MessageBox.Show("Problema al ejecutar operación", "Error"); } positionValue = trbPlayFrames.Value; timerGetPlayInfo.Start(); timerGetPlayInfo.Enabled = true; }
private void btnCancelar_Click(object sender, EventArgs e) { picRecord.Refresh(); picRecord.BackColor = SystemColors.Control; DHClient.DHPlayBackControl(playRecordFile, PLAY_CONTROL.Stop); groupBoxVentanas1.Visible = false; groupBoxVentanas4.Visible = false; groupBoxVentanas9.Visible = false; groupBoxVentanas16.Visible = false; groupBoxRecord.Visible = false; btnTomarFoto.Enabled = true; groupBox5.Enabled = true; groupBox4.Enabled = true; btnStop.Enabled = true; btnPlay.Enabled = false; cantidadVentanas = Int16.Parse(comboBoxVentanas.SelectedItem + ""); this.inicializarVentanas(cantidadVentanas); }
/// <summary> /// 拖放 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void hsbPlayBack_ValueChanged(object sender, EventArgs e) { //停止步进播放 if (btnStepPlayE.Enabled == true) { btnStepPlayE_Click(null, null); } #region << 拖拽功能 >> switch (playBy) //播放方式0:按文件播放;1:按时间播放 { case 0: //按文件播放:按字节偏移播放回放 DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.SeekByBit, (uint)(hsbPlayBack.Value * (fileInfo.size / 100))); break; case 1: //按时间播放:按时间编移播放回放 DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.SeekByTime, (uint)(hsbPlayBack.Value * ((fileInfo.endtime.ToDateTime().TimeOfDay.TotalSeconds - fileInfo.starttime.ToDateTime().TimeOfDay.TotalSeconds) / 100))); break; } #endregion }
/// <summary> /// 播放暂停按钮按下 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPlay_Click(object sender, EventArgs e) { //停止步进播放 if (btnStepPlayE.Enabled == true) { btnStepPlayE_Click(null, null); } switch (btnPlay.Text.ToString()) { case ">": //播放控制 if (DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.Play) == true) //播放 { btnPlay.Text = "||"; } break; case "||": //暂停控制 if (DHClient.DHPlayBackControl(pPlayBackHandle[pPlayBackChannelID], PLAY_CONTROL.Pause) == true) //暂停 { btnPlay.Text = ">"; } break; } }