diff --git a/XplorePlane/Events/MeasurementToolEvent.cs b/XplorePlane/Events/MeasurementToolEvent.cs index 7d8b129..279af4a 100644 --- a/XplorePlane/Events/MeasurementToolEvent.cs +++ b/XplorePlane/Events/MeasurementToolEvent.cs @@ -11,7 +11,8 @@ namespace XplorePlane.Events PointDistance, PointLineDistance, Angle, - ThroughHoleFillRate + ThroughHoleFillRate, + BgaVoid } /// diff --git a/XplorePlane/ViewModels/Main/MainViewModel.cs b/XplorePlane/ViewModels/Main/MainViewModel.cs index b730afc..14f5ecb 100644 --- a/XplorePlane/ViewModels/Main/MainViewModel.cs +++ b/XplorePlane/ViewModels/Main/MainViewModel.cs @@ -87,6 +87,7 @@ namespace XplorePlane.ViewModels public DelegateCommand PointLineDistanceMeasureCommand { get; } public DelegateCommand AngleMeasureCommand { get; } public DelegateCommand ThroughHoleFillRateMeasureCommand { get; } + public DelegateCommand BgaVoidMeasureCommand { get; } // 辅助线命令 public DelegateCommand ToggleCrosshairCommand { get; } @@ -173,6 +174,7 @@ namespace XplorePlane.ViewModels PointLineDistanceMeasureCommand = new DelegateCommand(ExecutePointLineDistanceMeasure); AngleMeasureCommand = new DelegateCommand(ExecuteAngleMeasure); ThroughHoleFillRateMeasureCommand = new DelegateCommand(ExecuteThroughHoleFillRateMeasure); + BgaVoidMeasureCommand = new DelegateCommand(ExecuteBgaVoidMeasure); // 辅助线命令 ToggleCrosshairCommand = new DelegateCommand(() => @@ -471,6 +473,12 @@ namespace XplorePlane.ViewModels _eventAggregator.GetEvent().Publish(MeasurementToolMode.ThroughHoleFillRate); } + private void ExecuteBgaVoidMeasure() + { + _logger.Info("BGA空隙测量功能已触发"); + _eventAggregator.GetEvent().Publish(MeasurementToolMode.BgaVoid); + } + #endregion #region 设置命令实现 diff --git a/XplorePlane/Views/Main/MainWindow.xaml b/XplorePlane/Views/Main/MainWindow.xaml index 3342471..f2c3aa2 100644 --- a/XplorePlane/Views/Main/MainWindow.xaml +++ b/XplorePlane/Views/Main/MainWindow.xaml @@ -442,6 +442,17 @@ SmallImage="/Assets/Icons/pores.png" Text="通孔填锡率" /> + + + + +