Ejemplo n.º 1
0
 void Cleanup()
 {
     if (camera != null)
     {
         camera.Close();
         camera = null;
     }
 }
Ejemplo n.º 2
0
        public MainDlg()
        {
            InitializeComponent();

            camera = new MikrotronCamera(settings);

            //  Configure the image display.
            displayImage = new VisionImage((ImageType)camera.Session.Attributes[ImaqStandardAttribute.ImageType].GetValue());
            imageViewer.Attach(displayImage);

            acquisitionWorker                     = new BackgroundWorker();
            acquisitionWorker.DoWork             += acquisitionWorker_DoWork;
            acquisitionWorker.RunWorkerCompleted += acquisitionWorker_RunWorkerCompleted;
            acquisitionWorker.ProgressChanged    += acquisitionWorker_ProgressChanged;

            acquisitionWorker.WorkerSupportsCancellation = true;
        }