示例#1
0
        /// <summary>
        /// 按文件回放按钮按下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlayByRecordFile_Click(object sender, EventArgs e)
        {
            playBy = 0;
            frm_PlayBackByFileSet fpf = new frm_PlayBackByFileSet();
            fpf.gLoginID = pLoginID;
            fpf.cmbChannelSelect.Items.Clear();
            for (int i = 0; i < deviceInfo.byChanNum; i++)
            {
                fpf.cmbChannelSelect.Items.Add(i.ToString());
            }
                fpf.ShowDialog(this);
            if (fpf.blnOKEnter == true)
            {

                if (picRealPlay == null)
                {
                    picRealPlay = picRealPlay15;
                }
                pPlayBackChannelID = int.Parse(fpf.txtChannelID.Text.ToString());
                fileInfo = fpf.gFileInfo;
                //**********按文件回放**********
                pPlayBackHandle[pPlayBackChannelID] = DHClient.DHPlayBackByRecordFile(pLoginID, ref fileInfo, picRealPlay.Handle, null, IntPtr.Zero);
                //******************************
                if (pPlayBackHandle[pPlayBackChannelID] == 0)
                {
                    MessageBox.Show("按时间回放失败!", pMsgTitle);
                }
                else
                {
                    //**********画面控制代码**********
                    btnPlay.Text = "||";
                    //画面按钮有效性控制
                    btnPlayBackByTime.Enabled = false;
                    gpbPlayBackControl.Enabled = true;
                    btnPlay.Enabled = true;
                    btnSlow.Enabled = true;
                    btnStop.Enabled = true;
                    btnFast.Enabled = true;
                    btnSetpPlayS.Enabled = true;
                    hsbPlayBack.Enabled = true;
                    btnPlayByRecordFile.Enabled = false;
                    //*********************************
                }
            }
        }
示例#2
0
        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;
                }
            }
             * */
        }
示例#3
0
        /// <summary>
        /// 按文件回放按钮按下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnPlayByRecordFile_Click(object sender, EventArgs e)
        {
            playBy = 0;
            frm_PlayBackByFileSet fpf = new frm_PlayBackByFileSet();

            fpf.gLoginID = pLoginID;
            fpf.cmbChannelSelect.Items.Clear();

            for (int i = 0; i < 5; i++)
            {
                fpf.cmbChannelSelect.Items.Add(i.ToString());
            }
            fpf.ShowDialog(this);
            if (fpf.blnOKEnter == true)
            {
                groupBox1.Text = "视频回放";
                if (picRealPlay == null)
                {
                    picRealPlay = picRealPlay6;
                }
                pPlayBackChannelID = int.Parse(fpf.txtChannelID.Text.ToString());
                fileInfo           = fpf.gFileInfo;
                //**********按文件回放**********
                //自己定义长度
                pPlayBackHandle = new int[5];

                picRealPlay1.Visible = false;
                picRealPlay2.Visible = false;
                picRealPlay3.Visible = false;
                picRealPlay4.Visible = false;
                picRealPlay5.Visible = false;
                picRealPlay6.Visible = true;

                pPlayBackHandle[pPlayBackChannelID] = DHClient.DHPlayBackByRecordFile(pLoginID, ref fileInfo, picRealPlay.Handle, null, IntPtr.Zero);
                //******************************
                if (pPlayBackHandle[pPlayBackChannelID] == 0)
                {
                    MessageBox.Show("按时间回放失败!", pMsgTitle);
                }
                else
                {
                    //**********画面控制代码**********
                    btnPlay.Text = "||";

                    btnVideo1.Enabled          = false;
                    btnVideo2.Enabled          = false;
                    btnVideo3.Enabled          = false;
                    btnAisle.Enabled           = false;
                    btnControlroom.Enabled     = false;
                    groupVadioDownload.Enabled = false;
                    //画面按钮有效性控制
                    btnPlayBackByTime.Enabled   = false;
                    gpbPlayBackControl.Enabled  = true;
                    btnPlay.Enabled             = true;
                    btnSlow.Enabled             = true;
                    btnStop.Enabled             = true;
                    btnFast.Enabled             = true;
                    btnSetpPlayS.Enabled        = true;
                    hsbPlayBack.Enabled         = true;
                    btnPlayByRecordFile.Enabled = false;
                    //*********************************
                }
            }
        }