示例#1
0
        public Biz(MainWindow mainWindow)
        {
            propertyGrid = mainWindow.PropertyGrid;
            window       = mainWindow;
            LoadParams();
            propertyGrid.SelectedObject = DetectParam;
            serialComm = new SerialComm(SerialParam, DetectParam.CameraNo);
            AlarmRecord.TotalLoopCount = AlarmParam.TotalLoopCount;
            m_FrameCallback            = new pfnCameraGrabberFrameCallback(CameraGrabberFrameCallback);
            if (InitCamera())
            {
                mainWindow.RectBorder.Visibility = System.Windows.Visibility.Collapsed;
                GPIO.Init(m_hCamera);
            }
            else
            {
                InitLocalCamera();
            }

            StartDetect();
            Task.Run(() =>
            {
                Algorithm.svm_start();
                AutoDeletePics();
            });
        }
示例#2
0
        public tearToolsForm()
        {
            InitializeComponent();

            this.Load += TearToolsForm_Load;
            int handle = InitCamera();

            if (handle >= 0)
            {
                GPIO.Init(handle);
            }
        }