问题描述
我过去曾在Windows Phone 7应用程序中使用但它们似乎没有适用于Windows 8的新更新,所以我不确定它现在是内置的还是什么。
这就是我用来库的价格。
  ;  Parallel.Invoke(()=> Dispose());
$
public void Dispose()
{
if(photoCamera!= null)
{
photoCamera.Dispose();
photoCamera.Initialized - = PhotoCameraOnInitialized;
photoCamera.AutoFocusCompleted - = PhotoCameraOnAutoFocusCompleted;
photoCamera = null;
$
     recScanArea.Visibility = Visibility.Collapsed;
}
}
I have used in the past for Windows Phone 7 apps the System.Threading.Tasks.3.0.1 library but they don't seem to have a new update that works with Windows 8, so I am not sure if it is now built in or what.
This is what I use to do with the library
Parallel.Invoke(() => Dispose());
public void Dispose()
{
if (photoCamera != null)
{
photoCamera.Dispose();
photoCamera.Initialized -= PhotoCameraOnInitialized;
photoCamera.AutoFocusCompleted -= PhotoCameraOnAutoFocusCompleted;
photoCamera = null;
recScanArea.Visibility = Visibility.Collapsed;
}
}
基本上我使用的是Xzing条形码扫描程序库,如果用户离开运行条形码扫描代码的视图,我想要相机(即条形码扫描仪)在后台关闭。
Basically I am using the Xzing barcode scanner library and if a user moves away from the view that runs the barcode scanning code, I want the Camera(ie barcode scanner) to shutdown in the background.
推荐答案
这篇关于在Windows Phone 8中并行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!