Commit 4da8a85c by Neo Turing

优化

parent 8ef7f384
......@@ -124,7 +124,7 @@ namespace Kivii.Sample.ImageUploader
//cbxResolution.Items.Clear();
currentCameraIndex = 0;
cameraQuantity = 0;
gbCamView.Text = "相机视图";
//gbCamView.Text = "相机视图";
tbxReportId.Text = string.Empty;
outputMessage(string.Empty, true);
//lbCurrentReportId.Text = "__________";
......@@ -541,6 +541,8 @@ namespace Kivii.Sample.ImageUploader
{
if (videoDevice != null && vspCamView.IsRunning)
{
try
{
// 捕获当前帧
Bitmap bitmap = (Bitmap)vspCamView.GetCurrentVideoFrame().Clone();
var picName = string.Empty;
......@@ -560,6 +562,12 @@ namespace Kivii.Sample.ImageUploader
Thread.Sleep(50);
showSnapshot(photo);
}
catch(Exception ex)
{
MessageBox.Show("相机模组未初始化完成,稍后重试");
}
}
else
{
MessageBox.Show("没有找到视频采集设备");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment