Exemplo n.º 1
0
 private bool Snapshot(string imagePath, emDSFileType fileType)
 {
     if (this.IsOpen && (CGAPI.IsReceivingData(mDeviceHandle) == 1))
     {
         DeviceStatus devStatus = CGAPI.CaptureFile(mDeviceHandle, imagePath, fileType);
         return(devStatus == DeviceStatus.STATUS_OK);
     }
     return(false);
 }
 //拍照并且保存.
 private void Snapshot()
 {
     if (mDeviceHandle != DeviceHandle.Zero)
     {
         DeviceStatus devStatus = CGAPI.CaptureFile(mDeviceHandle, ImgPath, emDSFileType.FILE_PNG);
         if (DeviceStatus.STATUS_OK == devStatus)
         {
             //Debug.Log("保存成功! "+ImgPath);
             //MessageBox.Show(ImgPath, "保存成功");
         }
         else
         {
             MessageBox.Show(ImgPath, "保存失败");
         }
     }
 }