async static public Task <bool> Init() { if (isExist) { return(true); } for (int i = 0; i < 5; i++) { try { CamVideo = await AudioVideoCaptureDevice.OpenForVideoOnlyAsync(CameraSensorLocation.Back, new Windows.Foundation.Size(640, 480)); CamVideo.GetProperty(KnownCameraAudioVideoProperties.VideoTorchMode); break; } catch { } } if (CamVideo == null) { MessageBox.Show(AppResources.Text_Error_Light, AppResources.Text_Error_Title, MessageBoxButton.OK); } return(isExist); }