页面逻辑调整。

This commit is contained in:
2026-05-08 17:00:57 +08:00
parent 54bba5b55c
commit d349668966
5 changed files with 17 additions and 34 deletions

View File

@@ -54,6 +54,8 @@ namespace 头罩视野
public static class GlobalData
{
// 要传的所有数据放这里
public static string CurrentMode{ get; set; } = "5";
public static string JudgmentalPerspective { get; set; } = "空白测试";
public static double LeftEyeArea { get; set; }
public static double RightEyeArea { get; set; }
public static double TotalEyeArea { get; set; }

View File

@@ -144,7 +144,6 @@
BorderThickness="0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<!-- 去掉默认的hover/点击效果触发器 -->
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">

View File

@@ -47,7 +47,6 @@ namespace 头罩视野.Views
private double _binocularTotalArea = 0; // 双目总视野面积
double maxBottomViewAngle = 0; //记录所有姿态里的最大下方视野
// 最终左眼视野永远243个
private List<int> _leftFinalData = new List<int>();
// 最终右眼视野永远243个
@@ -423,6 +422,7 @@ namespace 头罩视野.Views
// 取消 → 空白测试
tbTest.Content = "试样测试";
GlobalData.CurrentMode = "试样测试";
tbTest.Background = System.Windows.Media.Brushes.LightGray;
await _modbusMaster.WriteSingleCoilAsync(1, 41, false);
}
@@ -485,6 +485,12 @@ namespace 头罩视野.Views
}
if (double.TryParse(fbspeed.Text, out double result))
{
GlobalData.JudgmentalPerspective = result.ToString();
}
await Task.WhenAll(tasks);
}
catch (Exception ex)
@@ -579,6 +585,7 @@ namespace 头罩视野.Views
tbTest.Content = "空白测试";
GlobalData.CurrentMode = "空白测试";
tbTest.Background = System.Windows.Media.Brushes.LightSkyBlue;
System.Diagnostics.Debug.WriteLine($"1232312312");

View File

@@ -199,11 +199,12 @@ namespace 头罩视野.Views
sheet1.Cells["A5"].Value = "测试参数";
sheet1.Cells["A5"].Style.Font.Bold = true;
sheet1.Cells["A6"].Value = "设备型号";
sheet1.Cells["B6"].Value = "GT-2024";
sheet1.Cells["B6"].Value = "X015";
sheet1.Cells["A7"].Value = "分辨角度";
sheet1.Cells["B7"].Value = "5° / 10° / 15°按实际";
sheet1.Cells["A8"].Value = "测试模式";
sheet1.Cells["B8"].Value = "左眼/右眼/双目";
sheet1.Cells["B7"].Value = GlobalData.JudgmentalPerspective;
sheet1.Cells["A8"].Value = "当前模式";
sheet1.Cells["B8"].Value = GlobalData.CurrentMode;
// 结果表格标题
int rowStart = 10;

View File

@@ -1,26 +0,0 @@
{
"runtimeOptions": {
"tfm": "net10.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "10.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "10.0.0"
}
],
"additionalProbingPaths": [
"C:\\Users\\Crystal\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Crystal\\.nuget\\packages",
"C:\\Program Files\\DevExpress 22.2\\Components\\Offline Packages",
"D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false,
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}