feat: 实时模式开启时禁用测量工具
- MainViewModel: 添加 IsMeasurementToolsEnabled 属性 - MainWindow: 为测量工具按钮绑定 IsEnabled
This commit is contained in:
@@ -142,9 +142,13 @@ namespace XplorePlane.ViewModels
|
|||||||
|
|
||||||
_mainViewportService.SetRealtimeDisplayEnabled(value);
|
_mainViewportService.SetRealtimeDisplayEnabled(value);
|
||||||
RaisePropertyChanged();
|
RaisePropertyChanged();
|
||||||
|
RaisePropertyChanged(nameof(IsMeasurementToolsEnabled));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>测量工具是否可用(实时模式关闭时启用)</summary>
|
||||||
|
public bool IsMeasurementToolsEnabled => !IsMainViewportRealtimeEnabled;
|
||||||
|
|
||||||
public bool IsUsingLiveDetectorSource => _mainViewportService.CurrentSourceMode == MainViewportSourceMode.LiveDetector;
|
public bool IsUsingLiveDetectorSource => _mainViewportService.CurrentSourceMode == MainViewportSourceMode.LiveDetector;
|
||||||
|
|
||||||
public string DataRootPath
|
public string DataRootPath
|
||||||
|
|||||||
@@ -213,6 +213,7 @@
|
|||||||
telerik:ScreenTip.Description="测量两点之间的距离"
|
telerik:ScreenTip.Description="测量两点之间的距离"
|
||||||
telerik:ScreenTip.Title="点点距测量"
|
telerik:ScreenTip.Title="点点距测量"
|
||||||
Command="{Binding PointDistanceMeasureCommand}"
|
Command="{Binding PointDistanceMeasureCommand}"
|
||||||
|
IsEnabled="{Binding IsMeasurementToolsEnabled}"
|
||||||
Size="Medium"
|
Size="Medium"
|
||||||
SmallImage="/Assets/Icons/ptop.png"
|
SmallImage="/Assets/Icons/ptop.png"
|
||||||
Text="点点距测量" />
|
Text="点点距测量" />
|
||||||
@@ -220,6 +221,7 @@
|
|||||||
telerik:ScreenTip.Description="测量点到直线的距离"
|
telerik:ScreenTip.Description="测量点到直线的距离"
|
||||||
telerik:ScreenTip.Title="点线距测量"
|
telerik:ScreenTip.Title="点线距测量"
|
||||||
Command="{Binding PointLineDistanceMeasureCommand}"
|
Command="{Binding PointLineDistanceMeasureCommand}"
|
||||||
|
IsEnabled="{Binding IsMeasurementToolsEnabled}"
|
||||||
Size="Medium"
|
Size="Medium"
|
||||||
SmallImage="/Assets/Icons/ptol.png"
|
SmallImage="/Assets/Icons/ptol.png"
|
||||||
Text="点线距测量" />
|
Text="点线距测量" />
|
||||||
@@ -231,6 +233,7 @@
|
|||||||
telerik:ScreenTip.Description="测量两条线之间的角度"
|
telerik:ScreenTip.Description="测量两条线之间的角度"
|
||||||
telerik:ScreenTip.Title="角度测量"
|
telerik:ScreenTip.Title="角度测量"
|
||||||
Command="{Binding AngleMeasureCommand}"
|
Command="{Binding AngleMeasureCommand}"
|
||||||
|
IsEnabled="{Binding IsMeasurementToolsEnabled}"
|
||||||
Size="Medium"
|
Size="Medium"
|
||||||
SmallImage="/Assets/Icons/angle.png"
|
SmallImage="/Assets/Icons/angle.png"
|
||||||
Text="角度测量" />
|
Text="角度测量" />
|
||||||
@@ -238,6 +241,7 @@
|
|||||||
telerik:ScreenTip.Description="测量通孔填锡率"
|
telerik:ScreenTip.Description="测量通孔填锡率"
|
||||||
telerik:ScreenTip.Title="通孔填锡率测量"
|
telerik:ScreenTip.Title="通孔填锡率测量"
|
||||||
Command="{Binding ThroughHoleFillRateMeasureCommand}"
|
Command="{Binding ThroughHoleFillRateMeasureCommand}"
|
||||||
|
IsEnabled="{Binding IsMeasurementToolsEnabled}"
|
||||||
Size="Medium"
|
Size="Medium"
|
||||||
SmallImage="/Assets/Icons/cylinder.png"
|
SmallImage="/Assets/Icons/cylinder.png"
|
||||||
Text="通孔填锡率" />
|
Text="通孔填锡率" />
|
||||||
@@ -249,6 +253,7 @@
|
|||||||
telerik:ScreenTip.Description="手动气泡测量(魔棒+画笔)"
|
telerik:ScreenTip.Description="手动气泡测量(魔棒+画笔)"
|
||||||
telerik:ScreenTip.Title="气泡测量"
|
telerik:ScreenTip.Title="气泡测量"
|
||||||
Command="{Binding BubbleMeasureCommand}"
|
Command="{Binding BubbleMeasureCommand}"
|
||||||
|
IsEnabled="{Binding IsMeasurementToolsEnabled}"
|
||||||
Size="Medium"
|
Size="Medium"
|
||||||
SmallImage="/Assets/Icons/pores.png"
|
SmallImage="/Assets/Icons/pores.png"
|
||||||
Text="气泡测量" />
|
Text="气泡测量" />
|
||||||
|
|||||||
Reference in New Issue
Block a user