From 230f49b2788b268987394cce1e2f36b11c347dfc Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Wed, 15 Oct 2025 09:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Wpf_AiSportsMicrospace/Views/Main.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Wpf_AiSportsMicrospace/Views/Main.xaml.cs b/Wpf_AiSportsMicrospace/Views/Main.xaml.cs index 5fcb2e2..f541293 100644 --- a/Wpf_AiSportsMicrospace/Views/Main.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/Main.xaml.cs @@ -57,6 +57,12 @@ namespace Wpf_AiSportsMicrospace.Views } private void StartFrameProcessing() { + if (WebcamClient == null) + { + HandyControl.Controls.MessageBox.Show("摄像头网络异常,请重新连接!"); + return; + } + WebcamClient.OnExtractFrame += frame => { _frameQueue.Enqueue(frame);