private void BtnPlay2_Click(object sender, EventArgs e) { if (CameraObj2.m_hCamera > 0) { if (BtnPlay2.Text == "Play") { MvApi.CameraPlay(CameraObj2.m_hCamera); BtnPlay2.Text = "Pause"; } else { MvApi.CameraPause(CameraObj2.m_hCamera); BtnPlay2.Text = "Play"; } } }
private void BtnPlay_Click(object sender, EventArgs e) { if (m_hCamera1 != 0) { if (BtnPlay.Text == "Play") { MvApi.CameraPlay(m_hCamera1); BtnPlay.Text = "Pause"; } else { MvApi.CameraPause(m_hCamera1); BtnPlay.Text = "Play"; } } }
private void BtnPlay_Click(object sender, EventArgs e) { if (m_hCamera < 1)//还未初始化相机 { if (InitCamera() == true) { MvApi.CameraPlay(m_hCamera); BtnPlay.Text = "Pause"; } } else//已经初始化 { if (BtnPlay.Text == "Play") { MvApi.CameraPlay(m_hCamera); BtnPlay.Text = "Pause"; } else { MvApi.CameraPause(m_hCamera); BtnPlay.Text = "Play"; } } }