private void DoCreateTicketCamOper(object objData) { WinCall.ThreadBoolRet pData = (WinCall.ThreadBoolRet)objData; FaceDetect faceDetect = (FaceDetect)pData.pExtra; const int VIDEOWIDTH = 640; const int VIDEOHEIGHT = 480; const int VIDEOBITSPERPIXEL = 24; // BitsPerPixel values determined by device try { tickCamOper = new Capture(faceDetect.GetCamTicketID(), VIDEOWIDTH, VIDEOHEIGHT, VIDEOBITSPERPIXEL, tickPicCtrl); } catch (Exception ex) { WinCall.TraceException(ex); } bool bInit = (tickCamOper != null); if (!bInit) { PromptError("车票摄像头初始化失败!"); } pData.bResult = bInit; }
private bool InitVars() { PromptInfo("系统正在初始化,请稍候..."); faceDetect = new FaceDetect(); return(false); }