コード例 #1
0
        private void tsbVido_Click(object sender, EventArgs e)
        {
            if (CommHandle.Instance.IsLink)
            {
                Util.Notify(Level.Err, "正在运行中不能连续采集图像!");
                return;
            }
            if (isTestMode == true)
            {
                //不能弹窗,会造成窗体不响应
                //MessageBox.Show("连续测试中 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (cameraSelect == null || !cameraSelect.IsLink)
            {
                MessageBox.Show($"相机{tscobCameraSelect.SelectedIndex + 1}未连接", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //修改关联的运行按钮状态
            btnRun.Text      = "运行";
            btnRun.BackColor = SystemColors.Control;
            btnRun.Visible   = true;
            //cameraSelect.OneShot();
            //return;
            if (cameraSelect.IsContinuousShot)
            {
                cameraSelect.ContinuousShotStop();
                //camera1.SetExtTrigger();
                timerContinuousShotEnd.Stop();
            }
            else
            {
                if (CameraShowUnitDic.ContainsKey(cameraSelect.CameraIndex))
                {
                    CameraShowUnitDic[cameraSelect.CameraIndex].HWndUnit.IsResultLabelDisplay = false;
                }
                cameraSelect.ContinuousShot();
                if (timerContinuousShotEnd.Enabled == false)
                {
                    timerContinuousShotEnd.Start();
                }
            }
        }
コード例 #2
0
ファイル: FormCameraSearch.cs プロジェクト: JC-NB/Jet_System
 private void btnStopLive_Click(object sender, EventArgs e)
 {
     camera.ContinuousShotStop();
     ShowButtonState(true, true, true, false, true, true, true, true, true, true);
 }