页面逻辑调整

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

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