Exemplo n.º 1
0
 private void frm_CameraConfig_Load(object sender, EventArgs e)
 {
     this.cb_CamList.Items.AddRange(CameraEntiy.GetCameraList().ToArray());
     imageSet.ShowToolbar              = true;
     imageSet.ToolsShown               = (ViewerTools)((int)(ViewerTools.Rectangle) + (int)(ViewerTools.ZoomIn) + (int)(ViewerTools.ZoomOut) + (int)(ViewerTools.Selection) + (int)(ViewerTools.Pan) + (int)(ViewerTools.Line));
     imageSet.ZoomToFit                = true;
     imageSet.Image.BorderWidth        = 0;
     this.propertyGrid1.SelectedObject = CameraDefine.Instance.CameraList[this.module][camera];
 }
Exemplo n.º 2
0
        private void OpenCam_Click(object sender, EventArgs e)
        {
            if (entiy == null || !entiy.bOpen)
            {
                entiy = new CameraEntiy();

                entiy.Connectted(this.cb_CamList.Text);
            }

            if (!entiy.IsGrab && entiy.bOpen)
            {
                entiy.UIStartGrab(this.imageSet);
                this.bOpenCam.Text = "关闭";
            }
            else
            {
                entiy.StopGrab();
                entiy.Dispose();
                this.bOpenCam.Text = "实时";
            }
        }