Exemplo n.º 1
0
 public FormHome()
 {
     try
     {
         InitializeComponent();
     }
     catch (Exception ex)
     {
         Utilitiy.write_error(this.GetType().FullName, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex, DataType.eErrors.Exeption);
     }
 }
Exemplo n.º 2
0
        public frmProduction()
        {
            try
            {
                InitializeComponent();
                //cam = new Camera("abedCam");
                cam = new Camera("DirectShow", "[0] Logitech HD Pro Webcam C920");
                // [0] Lenovo EasyCamera
                // cam = new Camera();

                //Window = hWindowControl1.HalconWindow;
            }
            catch (Exception ex)
            {
                Utilitiy.write_error(this.GetType().FullName, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex, DataType.eErrors.Exeption);
            }
        }
Exemplo n.º 3
0
        private void btnGrabImage_Click(object sender, EventArgs e)
        {
            try
            {
                //cam.GrabImage().DispObj(Window);
                hWndView1.dispObject(cam.GrabImage());

                /*
                 * String fileName = "particle";
                 * HImage image = new HImage(fileName);
                 * hWndView1.dispObject(image);
                 */
            }
            catch (Exception ex)
            {
                Utilitiy.write_error(this.GetType().FullName, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex, DataType.eErrors.Exeption);
            }
        }
Exemplo n.º 4
0
 private void btnGrabImage_Click(object sender, EventArgs e)
 {
     try
     {
         //CoreCV.DeviceManager.cam = new Camera("DirectShow", "[0] Logitech HD Pro Webcam C920");
         string path = Directory.GetCurrentDirectory();
         CoreCV.DeviceManager.cam = new Camera("File", "Default", "test", path + @"\dataRep\Vision\Cameras\default\test");
         //CoreCV.DeviceManager.cam = new Camera("CASS2");
         hWndView1.dispObject(CoreCV.DeviceManager.cam.GrabImage());
         hWndView1.listBoxDiagnostic.Items.Add(CoreCV.DeviceManager.cam.CameraName);
         CoreCV.DeviceManager.cam.Dispose();
         CoreCV.DeviceManager.cam = null;
     }
     catch (HOperatorException ex)
     {
         Utilitiy.write_error(this.GetType().FullName, System.Reflection.MethodBase.GetCurrentMethod().ToString(), ex, DataType.eErrors.Exeption);
         hWndView1.listBoxDiagnostic.Items.Add(ex.ToString());
     }
 }