页面逻辑调整

This commit is contained in:
2026-05-07 10:26:39 +08:00
parent 4f03201468
commit 596425d12c
2 changed files with 9 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ namespace 头罩视野.Services
//空白视野面积计算 //空白视野面积计算
public static readonly double _standardTotalArea = 2 * Math.PI * 330 * 330; public static readonly double _standardTotalArea = (Math.PI * R * R) / 100;
public static double GetBlankViewArea(double binocularTotalArea) public static double GetBlankViewArea(double binocularTotalArea)
{ {

View File

@@ -173,12 +173,11 @@ namespace 头罩视野.Views
_binocularTotalArea = 0; _binocularTotalArea = 0;
maxBottomViewAngle = 0; maxBottomViewAngle = 0;
isLeftOnly = btnLeft.Content.ToString() == "左眼" && btnRight.Content.ToString() == "右眼"; isLeftOnly = btnLeft.Content.ToString() == "左眼" && btnRight.Content.ToString() == "右眼";
isRightOnly = btnRight.Content.ToString() == "眼开" && btnLeft.Content.ToString() == "眼关"; isRightOnly = btnRight.Content.ToString() == "眼开" && btnLeft.Content.ToString() == "眼关";
isBinocular = btnLeft.Content.ToString() == "左眼" && btnRight.Content.ToString() == "右眼"; isBinocular = btnLeft.Content.ToString() == "左眼" && btnRight.Content.ToString() == "右眼";
System.Diagnostics.Debug.WriteLine($"灯条数据:{isLeftOnly}1111{isRightOnly}11111{isBinocular}");
await calCurrentangle(); await calCurrentangle();
_nextTargetAngle = _stepAngle; _nextTargetAngle = _stepAngle;
@@ -547,10 +546,10 @@ namespace 头罩视野.Views
//复位btn //复位btn
private void Button_Click_Reset(object sender, RoutedEventArgs e) private void Button_Click_Reset(object sender, RoutedEventArgs e)
{ {
btnLeft.Content = "左眼开"; //btnLeft.Content = "左眼开";
btnRight.Content = "右眼开"; //btnRight.Content = "右眼开";
LedOff(led1); //LedOff(led1);
LedOff(led0); //LedOff(led0);
ma.BtnClickFunction(Function.ButtonType., 90); ma.BtnClickFunction(Function.ButtonType., 90);
} }
//左开眼 //左开眼
@@ -669,7 +668,6 @@ namespace 头罩视野.Views
private void Page_Loaded(object sender, RoutedEventArgs e) private void Page_Loaded(object sender, RoutedEventArgs e)
{ {
System.Diagnostics.Debug.WriteLine("页面加载了112222222"); System.Diagnostics.Debug.WriteLine("页面加载了112222222");
_timer.Start(); _timer.Start();
ma = new Function(_modbusMaster); ma = new Function(_modbusMaster);