// ----------------------------------------------------------------------------------- // Main functions for fingerprint recognition management // ----------------------------------------------------------------------------------- // Initializes GrFinger ActiveX and all necessary utilities. public int InitializeGrFinger(AxGrFingerXLib.AxGrFingerXCtrl grfingerx) { GRConstants result; _grfingerx = grfingerx; //Check DataBase Class. if (_DB == null) { _DB = new DBClass(); } //Open DataBase if (_DB.openDB() == false) { return(ERR_CANT_OPEN_BD); } //Create a new Template if (_tpt == null) { _tpt = new TTemplate(); } //Create a new raw image _raw = new TRawImage(); //Initialize library result = (GRConstants)_grfingerx.Initialize(); if (result < 0) { return((int)result); } return((int)_grfingerx.CapInitialize()); }
/// <summary> /// 设置Image指定图片 /// </summary> /// <param name="trawimg">Image组件</param> /// <param name="texturename">纹理名</param> /// <param name="loadtype">资源加载类型</param> /// <param name="loadmethod">资源加载方式</param> /// <returns></returns> public void setRawImage(TRawImage trawimg, string texturename, ResourceLoadType loadtype = ResourceLoadType.NormalLoad, ResourceLoadMethod loadmethod = ResourceLoadMethod.Sync) { DIYLog.Assert(trawimg == null, "setRawImage不允许传空TRawImage!"); ResourceModuleManager.Singleton.requstResource(texturename, (abi) => { // 清除老的资源引用 if (trawimg.ABI != null && !string.IsNullOrEmpty(trawimg.TextureName)) { trawimg.ABI.releaseOwner(trawimg); } if (abi != null) { var texture = abi.getAsset <Texture>(trawimg, texturename); trawimg.texture = texture; } trawimg.ABI = abi; trawimg.TextureName = texturename; }, loadtype, loadmethod); }