From 6c88930313f4218ebfbbb1b412d26fc05e5d3ff5 Mon Sep 17 00:00:00 2001 From: rain Date: Tue, 21 Apr 2026 10:19:14 +0800 Subject: [PATCH] test --- .gitignore | 52 +++++++ 头罩视野slove/头罩视野/TestDataStore.cs | 35 +++++ 头罩视野slove/头罩视野/Views/PageTest.xaml | 2 +- 头罩视野slove/头罩视野/Views/PageTest.xaml.cs | 90 +++++++---- 头罩视野slove/头罩视野/Views/RecordDate.xaml | 7 +- 头罩视野slove/头罩视野/Views/RecordPage.xaml | 4 +- .../头罩视野/Views/RecordPage.xaml.cs | 145 ++++-------------- .../obj/Debug/net10.0-windows/Views/PageTest.g.cs | 8 +- .../obj/Debug/net10.0-windows/Views/PageTest.g.i.cs | 8 +- .../obj/Debug/net10.0-windows/Views/RecordDate.baml | Bin 9610 -> 9544 bytes .../obj/Debug/net10.0-windows/Views/RecordDate.g.cs | 12 +- .../obj/Debug/net10.0-windows/Views/RecordDate.g.i.cs | 12 +- .../obj/Debug/net10.0-windows/Views/RecordPage.baml | Bin 7776 -> 8023 bytes .../obj/Debug/net10.0-windows/Views/RecordPage.g.cs | 30 ++-- .../obj/Debug/net10.0-windows/Views/RecordPage.g.i.cs | 30 ++-- .../头罩视野.csproj.CoreCompileInputs.cache | 2 +- .../头罩视野.csproj.FileListAbsolute.txt | 8 +- .../net10.0-windows/头罩视野_MarkupCompile.cache | 2 +- 18 files changed, 251 insertions(+), 196 deletions(-) create mode 100644 .gitignore create mode 100644 头罩视野slove/头罩视野/TestDataStore.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5dbf7d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,52 @@ +# ============================================== +# Visual Studio / .NET 通用忽略规则 +# ============================================== +[Rr]elease/ +[Dd]ebug/ +[Bb]in/ +[Oo]bj/ +.vs/ +*.log +*.cache +*.baml +*.g.cs +*.g.i.cs +*.tlb +*.tli +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# 用户设置文件 +*.suo +*.user +*.userosscache +*.userprefs + +# ============================================== +# WPF / XAML 相关临时文件 +# ============================================== +# XAML 编译生成的临时文件 +*.baml +*_MarkupCompile.cache + +# ============================================== +# NuGet / 包管理 +# ============================================== +*.nupkg +# The packages folder can be ignored unless you're using a +# version supporting restoring packages (NuGet 2.7+). +packages/ + +# ============================================== +# 其他临时文件 +# ============================================== +# 操作系统文件 +Thumbs.db +.DS_Store \ No newline at end of file diff --git a/头罩视野slove/头罩视野/TestDataStore.cs b/头罩视野slove/头罩视野/TestDataStore.cs new file mode 100644 index 0000000..33bc146 --- /dev/null +++ b/头罩视野slove/头罩视野/TestDataStore.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace 头罩视野 +{ + public static class TestDataStore + { + // 单条测试数据 + public class TestRecord + { + public int Id { get; set; } + public string Time { get; set; } + public string Date { get; set; } + public double LeftEyeArea { get; set; } + public double RightEyeArea { get; set; } + public double BinocularArea { get; set; } + //public double BlankArea { get; set; } + public double LowerVision { get; set; } + public double VisionRetentionRate { get; set; } + } + + + + // 所有记录 + public static List Records { get; } = new List(); + private static int _nextId = 1; + + public static void AddNewRecord(TestRecord record) + { + record.Id = _nextId++; + Records.Add(record); + } + } +} diff --git a/头罩视野slove/头罩视野/Views/PageTest.xaml b/头罩视野slove/头罩视野/Views/PageTest.xaml index d5a06e7..890686d 100644 --- a/头罩视野slove/头罩视野/Views/PageTest.xaml +++ b/头罩视野slove/头罩视野/Views/PageTest.xaml @@ -8,7 +8,7 @@ mc:Ignorable="d" Background="#F5F7FA" d:DesignHeight="768" d:DesignWidth="1024" - Title="PageTest" Loaded="Page_Loaded"> + Title="PageTest" Loaded="Page_Loaded" Unloaded="Page_Unloaded">