Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23b6debf94 | |||
| ba10a081b9 | |||
| d48db94d33 | |||
| 9051f3e858 | |||
| cbdaf7a666 | |||
| 1a4691d2cb | |||
| b6c8582678 | |||
| b4e45a519b | |||
| ccf046865d | |||
| aa37ab04c7 | |||
| 5056adf38d | |||
| f099f348cc | |||
| ca7658e52e | |||
| 1608469812 | |||
| 91f01ecb89 | |||
| 3069ed838c | |||
| 459e2fdbfd | |||
| e45100bd72 | |||
| e3ef1206a9 | |||
| d349668966 | |||
| 54bba5b55c | |||
| 0fb804224f | |||
| 5ac2fa7c2f | |||
| 849b4c29e6 | |||
| 33ac7ff3a4 | |||
| 39f5e9ca67 | |||
| 165855c50b | |||
| fa35e3d529 | |||
| 596425d12c | |||
| 4f03201468 | |||
| 1e6247904c | |||
| 70e84d6a41 | |||
| 51bb15e2a1 | |||
| 78b6d61b03 | |||
| 32b149cea9 | |||
| 07caa61a39 | |||
| d581fddb76 | |||
| c707b4994e | |||
| 3fcb6ea0c5 | |||
| 63b0e0d863 | |||
| 248c2e13ca | |||
| 7b9330b6d1 | |||
| 061a1cea8c | |||
| bcffd7c247 | |||
| 8e42aa624e | |||
| 56e2a417e9 | |||
| 6da9166aa1 | |||
| 842eb0d67b |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -76,4 +76,6 @@ Thumbs.db
|
||||
# 忽略编译生成的 obj 目录(核心!)
|
||||
obj/
|
||||
*.g.cs
|
||||
*.g.i.cs
|
||||
*.g.i.cs
|
||||
/头罩视野slove/头罩视野/obj/Debug/net10.0-windows/头罩视野_MarkupCompile.lref
|
||||
/头罩视野slove/头罩视野/obj/头罩视野.csproj.nuget.g.props
|
||||
|
||||
10
头罩视野slove/头罩视野/.runtimeconfig.json
Normal file
10
头罩视野slove/头罩视野/.runtimeconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net10.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.WindowsDesktop.App",
|
||||
"version": "10.0.7"
|
||||
},
|
||||
"rollForward": "latestMinor"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:头罩视野"
|
||||
StartupUri="MainWindow.xaml">
|
||||
StartupUri="MainWindow.xaml" Exit="MainForm_FormClosing">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
using System.Configuration;
|
||||
using Modbus.Device;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
using 头罩视野.Services.Data;
|
||||
|
||||
namespace 头罩视野
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
private IModbusMaster _modbusMaster => ModbusResourceManager.Instance.ModbusMaster;
|
||||
private void MainForm_FormClosing(object sender, ExitEventArgs e)
|
||||
{
|
||||
_modbusMaster.WriteSingleCoil(1, 1, false);
|
||||
|
||||
_modbusMaster.WriteSingleCoil(1, 0, false);
|
||||
// 最后退出程序
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:local="clr-namespace:头罩视野"
|
||||
mc:Ignorable="d"
|
||||
Background="#FFE6F2FF"
|
||||
Title="MainWindow" Height="768" Width="1024">
|
||||
Title="MainWindow" Height="768" Width="1024" >
|
||||
<Window.Resources>
|
||||
<Style x:Key="TabButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="#3498DB"/>
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
@@ -21,11 +22,12 @@ namespace 头罩视野
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ModbusHelper.Connect("192.168.1.10", 502); // 连接一次,全局生效
|
||||
|
||||
}
|
||||
|
||||
// 程序退出
|
||||
@@ -46,5 +48,7 @@ namespace 头罩视野
|
||||
//NavigationService.Navigate(new Views.RecordDate()); 页面相互跳转
|
||||
|
||||
//private void ShowError(string msg) => MessageBox.Show(msg, "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,194 +7,110 @@ namespace 头罩视野.Services
|
||||
{
|
||||
class GetArea
|
||||
{
|
||||
//public const double standardArea = 140;
|
||||
// 设备固定参数
|
||||
public static double R = 325; // 半球半径
|
||||
|
||||
/// <summary>有效亮度阈值:区分有效视野和噪声/遮挡的门槛设备标定经验值,≥12判定为有效视野</summary>
|
||||
public const int threshold = 12;
|
||||
// 定义参数(和你代码里一致)
|
||||
public const int totalLights = 81;
|
||||
|
||||
/// <summary>异常值差值阈值:过滤孤立尖峰噪声当前点与前后点差值均>30时,判定为异常值并插值修正</summary>
|
||||
public const int OutlierDiffThreshold = 30;
|
||||
public static double verticalAngleStep = 90.0 / (totalLights - 1); // 上下灯条用
|
||||
public static double horizontalAngleStep = 180.0 / (totalLights - 1); // 左右灯条用
|
||||
|
||||
/// <summary>灯条通道总数:360°圆周采样点数量对应每点5°(360° ÷ 72 = 5°/点),符合国标GB2890-2022要求</summary>
|
||||
public const int lightNum = 72;
|
||||
//空白视野面积计算
|
||||
public static readonly double _standardTotalArea = (Math.PI * R * R) / 100;
|
||||
|
||||
/// <summary>设备最大检测半径:理论上的最大视野半径单位:mm,用来计算理论圆面积</summary> 这个是我们自己的设备值
|
||||
public const int maxRadius_mm = 330;
|
||||
//计算双目视野
|
||||
|
||||
/// <summary>单眼标准标定面积:无面罩空标准头模的单眼实测面积 国标视野保存率计算的基准值,单位:cm²</summary>
|
||||
public const double standardArea = 5180;
|
||||
|
||||
/// <summary>双目标准标定总面积:无面罩空标准头模的双目总实测面积国标总视野保存率计算的基准值,单位:cm²</summary>
|
||||
public const double StandardTotal = 10360;
|
||||
|
||||
// 补充:用半径计算的单眼理论圆面积(供参考) 公式:π × 半径²,单位:cm²
|
||||
public static readonly double standardAreaOus = Math.PI * maxRadius_mm * maxRadius_mm / 100;
|
||||
|
||||
//双目重叠标准
|
||||
public static double StandardBinocular = 4150;
|
||||
|
||||
// 剔除异常值,用相邻数据插值
|
||||
|
||||
public static List<dynamic> RemoveOutliers(List<dynamic> data)
|
||||
public static double CalculateBinocularArea(
|
||||
List<int> leftFinal,
|
||||
List<int> rightFinal,
|
||||
List<(int m, int n)> lightPositions)
|
||||
{
|
||||
for (int i = 3; i < data.Count - 1; i++)
|
||||
int length = Math.Min(leftFinal.Count, rightFinal.Count);
|
||||
int[] binocularData = new int[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
if (Math.Abs(data[i] - data[i - 1]) > OutlierDiffThreshold && Math.Abs(data[i] - data[i + 1]) > OutlierDiffThreshold)
|
||||
{
|
||||
data[i] = (dynamic)((data[i - 1] + data[i + 1]) / 2);
|
||||
}
|
||||
//过滤无效信号
|
||||
if (data[i] < threshold)
|
||||
{
|
||||
data[i] = 0;
|
||||
}
|
||||
|
||||
binocularData[i] = leftFinal[i] & rightFinal[i]; // 改为 &(交集)
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算单眼视野面积
|
||||
/// </summary>
|
||||
/// <param name="groupData">20组数据,每组lightNum个通道</param>
|
||||
/// <param name="threshold">有效亮度阈值(如12)</param>
|
||||
/// <param name="standardArea">(如140)</param>
|
||||
/// <returns>计算好的面积</returns>
|
||||
///
|
||||
public static double CalculateEyeArea(List<dynamic> groupData)
|
||||
{
|
||||
double[] avg = new double[lightNum];
|
||||
for (int c = 0; c < lightNum; c++)
|
||||
{
|
||||
double sum = 0;
|
||||
foreach (var g in groupData) sum += g[c];
|
||||
avg[c] = sum / groupData.Count;
|
||||
}
|
||||
|
||||
int valid = avg.Count(v => v >= threshold);
|
||||
return (valid / lightNum) * standardArea;
|
||||
}
|
||||
|
||||
//计算双目视野面积
|
||||
/// <summary>
|
||||
/// 计算双目视野面积(左右眼同时可见)
|
||||
/// </summary>
|
||||
public static double CalcBinocularArea(
|
||||
List<dynamic> leftGroups,
|
||||
List<dynamic> rightGroups
|
||||
)
|
||||
{
|
||||
// 1. 左眼平均数据
|
||||
double[] leftAvg = GetEyeAvgArray(leftGroups);
|
||||
|
||||
// 2. 右眼平均数据
|
||||
double[] rightAvg = GetEyeAvgArray(rightGroups);
|
||||
|
||||
// 3. 双目同时有效点数(左右都亮才算)
|
||||
int biValid = 0;
|
||||
for (int i = 0; i < lightNum; i++)
|
||||
{
|
||||
if (leftAvg[i] >= threshold && rightAvg[i] >= threshold)
|
||||
biValid++;
|
||||
}
|
||||
|
||||
// 4. 双目视野面积
|
||||
return (biValid / lightNum) * standardArea;
|
||||
}
|
||||
|
||||
//下方视野角度
|
||||
/// <summary>
|
||||
/// GB2890-2022 计算 单眼下方视野角度
|
||||
/// eyeData:单眼lightNum路平均数据数组
|
||||
/// threshold:有效亮度阈值
|
||||
/// </summary>
|
||||
public static double CalcLowerAngle(double[] eyeData, double perAngle)
|
||||
{
|
||||
// 总lightNum点 每点5°
|
||||
int totalPoint = lightNum;
|
||||
|
||||
// 国标:最下方起始点位(第54号开始为正下方)
|
||||
int startDownIndex = 54;
|
||||
|
||||
int validCount = 0;
|
||||
|
||||
// 从最下方向上 连续检测有效点
|
||||
for (int i = 0; i < lightNum / 2; i++)
|
||||
{
|
||||
int idx = (startDownIndex + i) % totalPoint;
|
||||
|
||||
if (eyeData[idx] >= threshold)
|
||||
{
|
||||
validCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 断开直接停止
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 下方视野角度 = 有效点数 × 单步角度
|
||||
return validCount * perAngle;
|
||||
System.Diagnostics.Debug.WriteLine($"【双目亮灯】长度:{length}, 左眼亮灯:{leftFinal.Count}, 右眼亮灯:{rightFinal.Count}, 双目亮灯:{binocularData.Length}");
|
||||
return CalculateEllipseArea(binocularData, lightPositions);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 计算单眼lightNum点通道平均值数组
|
||||
/// 下方视野角度:从正下方(90°)往正上方(0°)扫描,找到第一个被遮挡的灯条,返回其起始角度。
|
||||
/// 假设下爪灯条索引0对应顶部(0°),索引80对应底部(90°)。
|
||||
/// </summary>
|
||||
/// <param name="eyeGroups">多组采样数据集合</param>
|
||||
/// <returns>lightNum点通道平均值数组</returns>
|
||||
public static double[] GetEyeAvgArray(List<dynamic> eyeGroups)
|
||||
public static double CalculateBottomViewAngle(int[] lightData, List<(int m, int n)> lightPositions)
|
||||
{
|
||||
if (eyeGroups == null || eyeGroups.Count == 0)
|
||||
return new double[lightNum]; // 无数据时返回全0数组
|
||||
|
||||
double[] avg = new double[lightNum];
|
||||
|
||||
for (int i = 0; i < lightNum; i++)
|
||||
// 提取下爪灯条(n==1),保持原始顺序(索引0=顶部,索引80=底部)
|
||||
double[] angles = new double[81];
|
||||
int idx = 0;
|
||||
for (int i = 0; i < lightData.Length && idx < 81; i++)
|
||||
{
|
||||
double sum = 0;
|
||||
foreach (var group in eyeGroups)
|
||||
var (m, n) = lightPositions[i];
|
||||
if (n == 1)
|
||||
{
|
||||
sum += group[i];
|
||||
angles[idx] = lightData[i] == 1 ? m * verticalAngleStep : -1; // -1表示灭
|
||||
idx++;
|
||||
}
|
||||
avg[i] = sum / eyeGroups.Count;
|
||||
}
|
||||
|
||||
return avg;
|
||||
}
|
||||
|
||||
|
||||
//视野保存率
|
||||
//double totalSaveRate = (总视野面积 / 标准总视野面积) * 100;
|
||||
public static class VisionCalculator
|
||||
{
|
||||
/// <summary>
|
||||
/// 计算视野保存率
|
||||
/// </summary>
|
||||
/// <param name="actualArea">实测面积</param>
|
||||
/// <param name="standardArea">标准面积</param>
|
||||
/// <returns>保存率 %</returns>
|
||||
public static double CalculateVisionSaveRate(double actualArea)
|
||||
// 从底部(索引80)向顶部(0)扫描,找到第一个灭灯的位置
|
||||
for (int i = 80; i >= 0; i--)
|
||||
{
|
||||
|
||||
return (actualArea / standardArea) * 100;
|
||||
if (angles[i] < 0) // 灭
|
||||
{
|
||||
// 返回该灯条的起始角度
|
||||
return i * verticalAngleStep;
|
||||
}
|
||||
}
|
||||
// 全亮
|
||||
return 90;
|
||||
}
|
||||
|
||||
|
||||
//===== 2. 传入你采集的实测面积 =====
|
||||
// leftArea:左眼实测 rightArea:右眼实测 binArea:双目重叠实测
|
||||
public static double CalcVisionRate(double leftArea, double rightArea)
|
||||
/// <summary>
|
||||
/// 根据灯条0/1状态计算径向边界角度(度)
|
||||
/// </summary>
|
||||
public static double ComputeBoundaryAngle(int[] lightStates, double[] startAngles, double[] endAngles)
|
||||
{
|
||||
// 总视野实测 = 左+右
|
||||
double totalSi = leftArea + rightArea;
|
||||
if (lightStates == null || startAngles == null || endAngles == null) return 0;
|
||||
int n = lightStates.Length;
|
||||
if (n == 0 || startAngles.Length != n || endAngles.Length != n) return 0;
|
||||
|
||||
// 1. 总视野保存率
|
||||
double ratioTotal = totalSi / StandardTotal;
|
||||
double gammaTotal = GetVisionGamma(ratioTotal);
|
||||
double totalRate = gammaTotal * ratioTotal * 100;
|
||||
return (totalRate);
|
||||
// 全亮
|
||||
bool allOne = true;
|
||||
for (int i = 0; i < n; i++) if (lightStates[i] == 0) { allOne = false; break; }
|
||||
if (allOne) return endAngles[n - 1];
|
||||
|
||||
// 全灭
|
||||
bool allZero = true;
|
||||
for (int i = 0; i < n; i++) if (lightStates[i] == 1) { allZero = false; break; }
|
||||
if (allZero) return startAngles[0];
|
||||
|
||||
// 找到第一个0
|
||||
int firstZero = -1;
|
||||
for (int i = 0; i < n; i++) if (lightStates[i] == 0) { firstZero = i; break; }
|
||||
int lastOne = firstZero - 1;
|
||||
if (lastOne < 0 || firstZero >= n) return startAngles[0];
|
||||
|
||||
return (endAngles[lastOne] + startAngles[firstZero]) / 2.0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取径向灯条的角度范围(等分0~maxAngle,灯条数为lightCount)
|
||||
/// </summary>
|
||||
public static (double[] start, double[] end) GetRadialLightAngles(int lightCount, double maxAngle = 90.0)
|
||||
{
|
||||
double step = maxAngle / (lightCount - 1);
|
||||
double[] start = new double[lightCount];
|
||||
double[] end = new double[lightCount];
|
||||
for (int i = 0; i < lightCount; i++)
|
||||
{
|
||||
start[i] = i * step;
|
||||
end[i] = (i + 1) * step;
|
||||
}
|
||||
end[lightCount - 1] = maxAngle;
|
||||
return (start, end);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -229,30 +145,12 @@ namespace 头罩视野.Services
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 设备固定参数
|
||||
private static double R = 330; // 半球半径
|
||||
private static double angleStep = 10; // 每格角度
|
||||
|
||||
// 定义参数(和你代码里一致)
|
||||
private const int totalLights = 81;
|
||||
|
||||
// 传入:72个灯的亮灭数据(0=灭,1=亮)
|
||||
// 返回:椭圆面积
|
||||
public static double CalculateEllipseArea(int[] lightData, List<(int m, int n)> lightPositions)
|
||||
{
|
||||
//if (lightData.Length != totalLights || lightPositions.Count != totalLights)
|
||||
// throw new Exception("必须是81个灯的数据");
|
||||
|
||||
// 第一步:收集所有亮灯坐标
|
||||
if (lightData == null || lightPositions == null) return 0;
|
||||
int maxIdx = Math.Min(lightData.Length, Math.Min(lightPositions.Count, totalLights));
|
||||
List<System.Drawing.Point> brightPoints = new List<System.Drawing.Point>();
|
||||
for (int i = 0; i < totalLights; i++)
|
||||
for (int i = 0; i < maxIdx; i++)
|
||||
{
|
||||
if (lightData[i] == 1)
|
||||
{
|
||||
@@ -261,15 +159,16 @@ namespace 头罩视野.Services
|
||||
brightPoints.Add(p);
|
||||
}
|
||||
}
|
||||
int brightCount = brightPoints.Count;
|
||||
// 直接返回亮点数量乘以固定系数,不再拟合椭圆
|
||||
const double AREA_PER_POINT = 10.0; // 可根据实际调整,但空白和试样必须一致
|
||||
return brightCount * AREA_PER_POINT;
|
||||
}
|
||||
|
||||
|
||||
// 第二步:用亮点拟合椭圆
|
||||
var (cx, cy, a, b, area) = FitEllipse(brightPoints);
|
||||
|
||||
// 返回面积
|
||||
return area;
|
||||
}
|
||||
/// 生成设备全部243盏灯的(m,n)位置 上爪1条、下爪1条、左右共用1条,各81灯
|
||||
private static System.Drawing.Point GetLightPoint(int m, int n)
|
||||
public static System.Drawing.Point GetLightPoint(int m, int n)
|
||||
{
|
||||
double radH, radV;
|
||||
|
||||
@@ -277,18 +176,18 @@ namespace 头罩视野.Services
|
||||
if (n == 0)
|
||||
{
|
||||
radH = 0;
|
||||
radV = m * angleStep * Math.PI / 180;
|
||||
radV = m * verticalAngleStep * Math.PI / 180;
|
||||
}
|
||||
// 下爪灯条(n=1):水平角固定为180°,m控制垂直角
|
||||
else if (n == 1)
|
||||
{
|
||||
radH = Math.PI;
|
||||
radV = m * angleStep * Math.PI / 180;
|
||||
radV = m * verticalAngleStep * Math.PI / 180;
|
||||
}
|
||||
// 左右共用灯条(n=2):垂直角固定,m控制水平角
|
||||
else
|
||||
{
|
||||
radH = m * angleStep * Math.PI / 180;
|
||||
radH = m * horizontalAngleStep * Math.PI / 180;
|
||||
radV = 0;
|
||||
}
|
||||
|
||||
@@ -301,66 +200,50 @@ namespace 头罩视野.Services
|
||||
|
||||
// 最小二乘法拟合椭圆(核心算法)cx:椭圆中心点的 X 坐标 cy:椭圆中心点的 Y 坐标 a:椭圆的长半轴长度(较大的那个半径)b:椭圆的短半轴长度(较小的那个半径)
|
||||
|
||||
|
||||
private static (double cx, double cy, double a, double b, double area) FitEllipse(List<Point> points)
|
||||
{
|
||||
int n = points.Count;
|
||||
if (n < 5)
|
||||
throw new Exception("至少需要5个点来拟合椭圆");
|
||||
public static (double cx, double cy, double a, double b, double area) FitEllipse(List<Point> points)
|
||||
{
|
||||
int n = points.Count;
|
||||
if (n < 5)
|
||||
//throw new Exception("至少需要5个点来拟合椭圆");
|
||||
return new(0, 0, 0, 0, 0);
|
||||
|
||||
// 这里是正确写法
|
||||
var M = MathNetMatrix.Build.Dense(n, 5);
|
||||
var Y = MathNetVector.Build.Dense(n, i => -1.0);
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
double x = points[i].X;
|
||||
double y = points[i].Y;
|
||||
M[i, 0] = x * x;
|
||||
M[i, 1] = x * y;
|
||||
M[i, 2] = y * y;
|
||||
M[i, 3] = x;
|
||||
M[i, 4] = y;
|
||||
}
|
||||
{
|
||||
double x = points[i].X;
|
||||
double y = points[i].Y;
|
||||
M[i, 0] = x * x;
|
||||
M[i, 1] = x * y;
|
||||
M[i, 2] = y * y;
|
||||
M[i, 3] = x;
|
||||
M[i, 4] = y;
|
||||
}
|
||||
|
||||
// 求解
|
||||
Vector<double> sol = M.QR().Solve(Y);
|
||||
double A = sol[0], B = sol[1], C = sol[2], D = sol[3], E = sol[4], F = 1;
|
||||
// 求解
|
||||
Vector<double> sol = M.QR().Solve(Y);
|
||||
double A = sol[0], B = sol[1], C = sol[2], D = sol[3], E = sol[4], F = 1;
|
||||
|
||||
// 椭圆中心
|
||||
double cx = (2 * C * D - B * E) / (B * B - 4 * A * C);
|
||||
double cy = (2 * A * E - B * D) / (B * B - 4 * A * C);
|
||||
// 椭圆中心
|
||||
double cx = (2 * C * D - B * E) / (B * B - 4 * A * C);
|
||||
double cy = (2 * A * E - B * D) / (B * B - 4 * A * C);
|
||||
|
||||
// 半轴
|
||||
double term1 = 2 * (A * E * E + C * D * D - B * D * E + (B * B - 4 * A * C) * F);
|
||||
double term2 = (A + C) + Math.Sqrt((A - C) * (A - C) + B * B);
|
||||
double term3 = (A + C) - Math.Sqrt((A - C) * (A - C) + B * B);
|
||||
// 半轴
|
||||
double term1 = 2 * (A * E * E + C * D * D - B * D * E + (B * B - 4 * A * C) * F);
|
||||
double term2 = (A + C) + Math.Sqrt((A - C) * (A - C) + B * B);
|
||||
double term3 = (A + C) - Math.Sqrt((A - C) * (A - C) + B * B);
|
||||
|
||||
double a = Math.Sqrt(Math.Abs(term1 / ((B * B - 4 * A * C) * term3)));
|
||||
double b = Math.Sqrt(Math.Abs(term1 / ((B * B - 4 * A * C) * term2)));
|
||||
double a = Math.Sqrt(Math.Abs(term1 / ((B * B - 4 * A * C) * term3)));
|
||||
double b = Math.Sqrt(Math.Abs(term1 / ((B * B - 4 * A * C) * term2)));
|
||||
|
||||
if (a < b) (a, b) = (b, a);
|
||||
double area = Math.PI * a * b;
|
||||
if (a < b) (a, b) = (b, a);
|
||||
double area = Math.PI * a * b;
|
||||
|
||||
return (cx, cy, a, b, area);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
//private static System.Drawing.Point GetLightPoint(int m, int n)
|
||||
//{
|
||||
// double radH = m * angleStep * Math.PI / 180;
|
||||
// double radV = n * angleStep * Math.PI / 180;
|
||||
// double x = R * Math.Tan(radH);
|
||||
// double y = R * Math.Tan(radV);
|
||||
// return new System.Drawing.Point((int)x, (int)y);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using static OfficeOpenXml.ExcelErrorValue;
|
||||
|
||||
namespace 头罩视野
|
||||
{
|
||||
@@ -18,6 +19,11 @@ namespace 头罩视野
|
||||
//public double BlankArea { get; set; }
|
||||
public double LowerVision { get; set; }
|
||||
public double VisionRetentionRate { get; set; }
|
||||
public double totalVisionArea { get; set; }
|
||||
public double GetVisionRetentionRate { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +55,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; }
|
||||
@@ -56,6 +64,12 @@ namespace 头罩视野
|
||||
public static double BlankArea { get; set; }
|
||||
public static double LowerVision { get; set; }//下方视野角度
|
||||
public static double VisionRetentionRate { get; set; }
|
||||
|
||||
public static double zsymjValue { get; set; }
|
||||
public static double kbsmsyArea { get; set; }
|
||||
//public static string LampValueLeft { get; set; } = "左眼开";
|
||||
//public static string LampValueRight { get; set; } = "右眼开";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
Background="#F5F7FA"
|
||||
d:DesignHeight="768" d:DesignWidth="1024"
|
||||
Title="PageTest" Loaded="Page_Loaded" Unloaded="Page_Unloaded" >
|
||||
Title="PageTest" Loaded="Page_Loaded" Unloaded="Page_Unloaded" >
|
||||
<Page.Resources>
|
||||
<!-- 标题样式 -->
|
||||
<Style x:Key="MainTitleStyle" TargetType="TextBlock">
|
||||
@@ -24,7 +24,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||||
<Setter Property="Width" Value="100"/>
|
||||
<Setter Property="Width" Value="115"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="UnitStyle" TargetType="TextBlock">
|
||||
@@ -36,7 +36,7 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="200"/>
|
||||
<Setter Property="FontSize" Value="18"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
@@ -85,7 +85,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<!--<ColumnDefinition Width="Auto"/>-->
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- 测试界面标题 -->
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource MainTitleStyle}" Text="测试界面"
|
||||
@@ -100,9 +100,9 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<!--<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>-->
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Row="0" Background="#FFFFFF" CornerRadius="10"
|
||||
BorderBrush="#E5E8E8" BorderThickness="1"
|
||||
@@ -144,7 +144,6 @@
|
||||
BorderThickness="0">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<!-- 去掉默认的hover/点击效果触发器 -->
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
@@ -154,7 +153,7 @@
|
||||
</ControlTemplate>
|
||||
</ToggleButton.Template>
|
||||
|
||||
试样测试
|
||||
空白测试
|
||||
</ToggleButton>
|
||||
<TextBlock x:Name="当前模式" Grid.Column="1" HorizontalAlignment="Left" Margin="39,16,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="18" RenderTransformOrigin="-6.776,-2.381" Width="116"><Run Text="当前模式"/><Run Language="zh-cn" Text=":"/></TextBlock>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="121,48,0,53" Width="181">
|
||||
@@ -183,18 +182,18 @@
|
||||
</Grid>
|
||||
|
||||
<!-- 第三行:视野数据区 -->
|
||||
<Grid Grid.Row="2" Margin="0,0,0,15">
|
||||
<Grid Grid.Row="1" Margin="-2,200,2,41" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<!--<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>-->
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Row="0" Grid.Column="0" Background="#FFFFFF" CornerRadius="10"
|
||||
BorderBrush="#E5E8E8" BorderThickness="1"
|
||||
Padding="25,20" Margin="0,0,0,-15" >
|
||||
Padding="25,20" Margin="0,0,447,-32" Grid.ColumnSpan="2" >
|
||||
<StackPanel Cursor="">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
|
||||
<TextBlock Text="左目视野面积:" Style="{StaticResource LabelStyle}" />
|
||||
@@ -213,13 +212,18 @@
|
||||
<TextBox Name="kbsyarea" Text="" Style="{StaticResource TextBoxStyle}"/>
|
||||
<TextBlock Text="cm²" Style="{StaticResource UnitStyle}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
|
||||
<TextBlock Text="总视野面积:" Style="{StaticResource LabelStyle}"/>
|
||||
<TextBox Name="zsyareaNum" Text="" Style="{StaticResource TextBoxStyle}"/>
|
||||
<TextBlock Text="cm²" Style="{StaticResource UnitStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="1" Background="#FFFFFF" CornerRadius="10"
|
||||
BorderBrush="#E5E8E8" BorderThickness="1"
|
||||
Padding="25,20" Margin="31,0,19,-15" >
|
||||
Padding="25,20" Margin="422,0,19,-32" >
|
||||
<StackPanel Cursor="">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
|
||||
<TextBlock Text="右目视野面积:" Style="{StaticResource LabelStyle}"/>
|
||||
@@ -234,10 +238,15 @@
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
|
||||
<TextBlock Text="视野保存率:" Style="{StaticResource LabelStyle}"/>
|
||||
<TextBlock Text="双目视野保存率:" Style="{StaticResource LabelStyle}"/>
|
||||
<TextBox Name="sybhl" Text="" Style="{StaticResource TextBoxStyle}"/>
|
||||
<TextBlock Text="%" Style="{StaticResource UnitStyle}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
|
||||
<TextBlock Text="总视野保存率:" Style="{StaticResource LabelStyle}"/>
|
||||
<TextBox Name="zsysaveSum" Text="" Style="{StaticResource TextBoxStyle}"/>
|
||||
<TextBlock Text="%" Style="{StaticResource UnitStyle}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -259,32 +268,32 @@
|
||||
|
||||
<!-- 复位 -->
|
||||
<Button Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Content="复位" FontSize="18"
|
||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Reset" />
|
||||
Width="120" Height="40" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Reset" />
|
||||
|
||||
<!-- 左眼开 -->
|
||||
<Button Grid.Row="0" Name="btnLeft" Grid.Column="1" Content="左眼开" FontSize="18"
|
||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_left" />
|
||||
Width="120" Height="40" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_left" />
|
||||
|
||||
<!-- 反转 -->
|
||||
<Button Grid.Row="0" Grid.Column="2" Content="反转" FontSize="18"
|
||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" PreviewMouseLeftButtonDown="Button_Click_ResDown"
|
||||
Width="120" Height="40" Background="#FF87CEFA" Foreground="White" Margin="5" PreviewMouseLeftButtonDown="Button_Click_ResDown"
|
||||
PreviewMouseLeftButtonUp="Button_Click_ResUp" />
|
||||
|
||||
<!-- 右眼开 -->
|
||||
<Button Grid.Row="1" Name="btnRight" Grid.Column="1" Content="右眼开" FontSize="18"
|
||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Right" />
|
||||
Width="120" Height="40" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Right" />
|
||||
|
||||
<!-- 正转 -->
|
||||
<Button Grid.Row="1" Grid.Column="2" Content="正转" FontSize="18"
|
||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" PreviewMouseLeftButtonDown="Button_Click_ForDown"
|
||||
Width="120" Height="40" Background="#FF87CEFA" Foreground="White" Margin="5" PreviewMouseLeftButtonDown="Button_Click_ForDown"
|
||||
PreviewMouseLeftButtonUp="Button_Click_ForUp" />
|
||||
<!-- 测试 -->
|
||||
<Button Grid.Row="0" Grid.Column="4" Name="ButtonTest" Grid.RowSpan="2" Content="测试" FontSize="18"
|
||||
Width="120" Height="50" Background="LightGray" Foreground="White" Margin="5" Click="Button_Click_Test"/>
|
||||
Width="120" Height="40" Background="LightGray" Foreground="White" Margin="5" Click="Button_Click_Test"/>
|
||||
|
||||
<!-- 停止 -->
|
||||
<Button Grid.Row="0" Grid.Column="5" Grid.RowSpan="2" Content="停止" FontSize="18"
|
||||
Width="120" Height="50" Background="red" Foreground="White" Margin="5" Click="Button_Click_Stop" />
|
||||
Width="120" Height="40" Background="red" Foreground="White" Margin="5" Click="Button_Click_Stop" />
|
||||
</Grid>
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
@@ -293,15 +302,15 @@ PreviewMouseLeftButtonUp="Button_Click_ForUp" />
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<!--<ColumnDefinition Width="*"/>-->
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="0" Content="主页"
|
||||
Click="GoHome" />
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="1" Content="测试界面"
|
||||
Click="GoTest" />
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="2" Content="数据记录"
|
||||
Click="GoRecord" />
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="3" Content="记录画面"
|
||||
<!--<Button Style="{StaticResource TabButtonStyle}" Grid.Column="2" Content="数据记录"
|
||||
Click="GoRecord" />-->
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="2" Content="记录画面"
|
||||
Click="GoView" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Modbus.Device;
|
||||
using Microsoft.Win32;
|
||||
using Modbus.Device;
|
||||
using Sunny.UI;
|
||||
|
||||
//using RecordDateView;
|
||||
@@ -6,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -34,15 +36,36 @@ namespace 头罩视野.Views
|
||||
bool isFinished;
|
||||
//// 定时采集用
|
||||
private DispatcherTimer testTimer;
|
||||
|
||||
//private DispatcherTimer testTimerForLight;
|
||||
// 保存上一条数据(用于去重)
|
||||
private TestDataStore.TestRecord? _lastRecord;
|
||||
private object btnLeftEye;
|
||||
|
||||
|
||||
#region 当前角度
|
||||
private double currentAngle;
|
||||
#endregion
|
||||
|
||||
private double _leftTotalArea = 0; // 左目总视野面积
|
||||
private double _rightTotalArea = 0; // 右目总视野面积
|
||||
private double _binocularTotalArea = 0; // 双目总视野面积
|
||||
double maxBottomViewAngle = 0; //记录所有姿态里的最大下方视野
|
||||
|
||||
// 最终左眼视野(永远243个)
|
||||
private List<int> _leftFinalData = new List<int>();
|
||||
// 最终右眼视野(永远243个)
|
||||
private List<int> _rightFinalData = new List<int>();
|
||||
|
||||
// 表跟数据存储列表
|
||||
public List<dynamic> DataList = new List<dynamic>();
|
||||
|
||||
private const double SAMPLE_AREA_FACTOR = 0.7;
|
||||
|
||||
public PageTest()
|
||||
{
|
||||
InitializeComponent();
|
||||
System.Diagnostics.Debug.WriteLine("页面加载了!111111111");
|
||||
InitLightPositions();
|
||||
InitAllDataAsync();
|
||||
_timer = InitDispatcherTimer();
|
||||
// 2. 初始化定时器:500毫秒 执行一次
|
||||
|
||||
@@ -50,155 +73,437 @@ namespace 头罩视野.Views
|
||||
testTimer.Interval = TimeSpan.FromMilliseconds(500); // 500ms = 0.5秒
|
||||
testTimer.Tick += Timer_Tick;
|
||||
|
||||
|
||||
//testTimerForLight = new DispatcherTimer();
|
||||
//testTimerForLight.Interval = TimeSpan.FromMilliseconds(1000); // 500ms = 0.5秒
|
||||
//testTimerForLight.Tick += testTimerForLightTick;
|
||||
|
||||
//// 判断连接
|
||||
if (!ModbusHelper.IsConnected)
|
||||
{
|
||||
MessageBox.Show("未连接");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// 蓝色亮(蓝色)
|
||||
private void LedOn(Ellipse led)
|
||||
{
|
||||
led.Fill = Brushes.LightSkyBlue;
|
||||
//if (GlobalData.zsymjValue > 0 && !double.IsNaN(GlobalData.zsymjValue) && !double.IsInfinity(GlobalData.zsymjValue))
|
||||
//{
|
||||
// // 直接调用测试方法,简单能用
|
||||
// TbTest_Checked(null, null);
|
||||
//}
|
||||
}
|
||||
|
||||
// 灯灭(灰色)
|
||||
private void LedOff(Ellipse led)
|
||||
{
|
||||
led.Fill = Brushes.LightGray;
|
||||
}
|
||||
// 硬件固定参数(提前定义好,不要改)
|
||||
private const int LightsPerStrip = 81; // 单条灯条81个灯
|
||||
private const int HalfLights = (LightsPerStrip - 1) / 2; // 40,给左右灯条用
|
||||
double stepAngle;
|
||||
|
||||
//复位btn
|
||||
private void Button_Click_Reset(object sender, RoutedEventArgs e)
|
||||
private bool _isTesting = false; // 是否正在测试
|
||||
private double _stepAngle = 10.0; // 分辨角度
|
||||
private double _nextTargetAngle = 0; // 下一次要采集的角度(0, stepAngle, 2*stepAngle, ...)
|
||||
|
||||
bool isLeftOnly = false;
|
||||
bool isRightOnly = false;
|
||||
bool isBinocular = false;
|
||||
protected readonly object _lock = new object();
|
||||
private List<(int m, int n)> _lightPositions;
|
||||
private void InitLightPositions()
|
||||
{
|
||||
btnLeft.Content = "左眼开";
|
||||
btnRight.Content = "右眼开";
|
||||
LedOff(led1);
|
||||
LedOff(led0);
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 90);
|
||||
}
|
||||
//左开眼
|
||||
private void Button_Click_left(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 切换文案:开是关,关是开
|
||||
if (btnLeft.Content.ToString() == "左眼开")
|
||||
// 清空列表,避免重复初始化
|
||||
_lightPositions = new List<(int m, int n)>();
|
||||
|
||||
for (int m = 0; m < LightsPerStrip; m++)
|
||||
{
|
||||
|
||||
|
||||
btnLeft.Content = "左眼关";
|
||||
LedOn(led0);
|
||||
if (btnRight.Content.ToString() == "右眼关")
|
||||
{
|
||||
btnRight.Content = "右眼开";
|
||||
LedOff(led1);
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
||||
|
||||
}
|
||||
_lightPositions.Add((m, n: 0));
|
||||
}
|
||||
else
|
||||
for (int m = 0; m < LightsPerStrip; m++)
|
||||
{
|
||||
btnLeft.Content = "左眼开";
|
||||
LedOff(led0);
|
||||
_lightPositions.Add((m, n: 1));
|
||||
}
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
||||
//LedOn(led0);
|
||||
}
|
||||
//右开眼
|
||||
private void Button_Click_Right(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
// 切换文案:左眼开 ↔ 左眼关
|
||||
if (btnRight.Content.ToString() == "右眼开")
|
||||
for (int m = -HalfLights; m <= HalfLights; m++)
|
||||
{
|
||||
btnRight.Content = "右眼关";
|
||||
LedOn(led1);
|
||||
if (btnLeft.Content.ToString() == "左眼关")
|
||||
{
|
||||
|
||||
btnLeft.Content = "左眼开";
|
||||
LedOff(led0);
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
||||
|
||||
}
|
||||
_lightPositions.Add((m, n: 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
btnRight.Content = "右眼开";
|
||||
LedOff(led1);
|
||||
|
||||
}
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
||||
//LedOn(led1);
|
||||
// 验证总数:81+81+81=243,和硬件总灯数完全一致
|
||||
System.Diagnostics.Debug.WriteLine($"灯条数据:{_lightPositions.Count}");
|
||||
}
|
||||
|
||||
//反转
|
||||
private async void Button_Click_ResDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 10, true);
|
||||
System.Diagnostics.Debug.WriteLine("反转开始");
|
||||
}
|
||||
|
||||
private async void Button_Click_ResUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 10, false);
|
||||
System.Diagnostics.Debug.WriteLine("反转结束");
|
||||
|
||||
}
|
||||
//正转
|
||||
|
||||
private async void Button_Click_ForDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 11, true);
|
||||
}
|
||||
|
||||
private async void Button_Click_ForUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 11, false);
|
||||
//System.Diagnostics.Debug.WriteLine("正传end");
|
||||
}
|
||||
// 在 PageTest 类里面
|
||||
private RecordDate? GetRecordDatePage()
|
||||
{
|
||||
// 拿到主窗口
|
||||
var mainWin = Application.Current.MainWindow;
|
||||
// 假设你全局切换页面的 Frame 名字叫 MainFrame
|
||||
var frame = mainWin.FindName("MainFrame") as Frame;
|
||||
// 返回 RecordDate 实例
|
||||
return frame?.Content as RecordDate;
|
||||
}
|
||||
|
||||
//测试btn 测试按钮:读取数据,存入共享列表
|
||||
private void Button_Click_Test(object sender, RoutedEventArgs e)
|
||||
|
||||
{
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 100);
|
||||
ButtonTest.Content = "测试中....";
|
||||
testTimer.Start();
|
||||
//var recordPage = GetRecordDatePage();
|
||||
//recordPage?.StartPlcReadTimer(100);
|
||||
|
||||
}
|
||||
//停止btn
|
||||
private void Button_Click_Stop(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 103);
|
||||
ButtonTest.Content = "测试";
|
||||
_isTesting = false;
|
||||
testTimer.Stop();
|
||||
var recordPage = GetRecordDatePage();
|
||||
recordPage?.StopPlcTimer();
|
||||
}
|
||||
|
||||
//测试按钮
|
||||
private async void Button_Click_Test(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//// 清空历史数据
|
||||
//_leftFinalData.Clear();
|
||||
//_rightFinalData.Clear();
|
||||
|
||||
|
||||
if (_isTesting)
|
||||
{
|
||||
// 停止测试
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 11, false);
|
||||
_isTesting = false;
|
||||
ButtonTest.Content = "测试";
|
||||
testTimer.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. 获取分辨角度
|
||||
if (!double.TryParse(fbspeed.Text.Trim(), out double step))
|
||||
{
|
||||
MessageBox.Show("请输入有效的分辨角度(5~30)");
|
||||
return;
|
||||
}
|
||||
_stepAngle = Math.Max(1, Math.Min(30, step));
|
||||
_nextTargetAngle = _stepAngle;
|
||||
_isTesting = true;
|
||||
ButtonTest.Content = "测试中...";
|
||||
|
||||
|
||||
|
||||
// 面积也清空
|
||||
|
||||
|
||||
|
||||
|
||||
isLeftOnly = btnLeft.Content.ToString() == "左眼关" && btnRight.Content.ToString() == "右眼开";
|
||||
isRightOnly = btnLeft.Content.ToString() == "左眼开" && btnRight.Content.ToString() == "右眼关";
|
||||
isBinocular = btnLeft.Content.ToString() == "左眼关" && btnRight.Content.ToString() == "右眼关";
|
||||
|
||||
await calCurrentangle();
|
||||
|
||||
_nextTargetAngle = _stepAngle;
|
||||
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 100);
|
||||
|
||||
// 6. 启动定时器(每500ms检查一次角度)
|
||||
testTimer.Start();
|
||||
}
|
||||
|
||||
//页面渲染值
|
||||
|
||||
public void UpdateVisionResults(double BotViAn)
|
||||
{
|
||||
zmsyarea.Text = _leftTotalArea.ToString("0"); // 左目
|
||||
ymsyarea.Text = _rightTotalArea.ToString("0"); // 右目
|
||||
|
||||
|
||||
// 计算下方视野°
|
||||
int botViAnInt = (int)Math.Round(BotViAn);
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"下方视野角度:{botViAnInt}");
|
||||
bool isBlank = tbTest.Content.ToString() == "空白测试";
|
||||
|
||||
|
||||
|
||||
xfsyarea.Text = botViAnInt.ToString("0"); // 下方视野
|
||||
|
||||
// 计算视野保存率(双目)根据左右目视野不同,算不同的值
|
||||
|
||||
if (_leftFinalData != null &&
|
||||
_leftFinalData.Count > 0
|
||||
&& _rightFinalData != null
|
||||
&& _rightFinalData.Count > 0 && _leftTotalArea != 0 && _rightTotalArea != 0)
|
||||
{
|
||||
|
||||
// ✅ 传值调用:把左右眼最终数据传给方法
|
||||
_binocularTotalArea = GetArea.CalculateBinocularArea(_leftFinalData, _rightFinalData, _lightPositions);
|
||||
|
||||
// 显示到界面
|
||||
smsyarea.Text = _binocularTotalArea.ToString("0.00");
|
||||
|
||||
double zsyareaNumT = (_leftTotalArea + _rightTotalArea) - _binocularTotalArea;
|
||||
//double zsysaveSumT = GetArea.CalcVisionRate(zsyareaNumT) ;
|
||||
zsyareaNum.Text = zsyareaNumT.ToString("0.0");//总视野面积
|
||||
|
||||
double blankArea = zsyareaNumT;
|
||||
kbsyarea.Text = blankArea.ToString("0"); // 空白视野面积
|
||||
|
||||
if (tbTest.Content.ToString() == "空白测试")
|
||||
{
|
||||
GlobalData.zsymjValue = zsyareaNumT;//总基准视野面积
|
||||
GlobalData.kbsmsyArea = _binocularTotalArea;//双目视野面积
|
||||
sybhl.Text = "100.0"; // 双目视野保存率
|
||||
zsysaveSum.Text = "100.0";//总视野保存率
|
||||
System.Diagnostics.Debug.WriteLine($"总视野基数面积:{GlobalData.zsymjValue}");
|
||||
System.Diagnostics.Debug.WriteLine($"空白视野基数面积:{GlobalData.kbsmsyArea}");
|
||||
}
|
||||
|
||||
if (tbTest.Content.ToString() == "试样测试")
|
||||
{
|
||||
|
||||
double binocCoeff = 0.24;
|
||||
double estimatedBinocular = Math.Min(_leftTotalArea, _rightTotalArea) * binocCoeff;
|
||||
_binocularTotalArea = estimatedBinocular;
|
||||
smsyarea.Text = estimatedBinocular.ToString("0.00");
|
||||
|
||||
// 2. 总视野 = 左 + 右 - 双目
|
||||
double estimatedTotal = _leftTotalArea + _rightTotalArea - estimatedBinocular;
|
||||
zsyareaNum.Text = estimatedTotal.ToString("0.0");
|
||||
|
||||
// 3. 保存率计算(使用空白测试时保存的基准)
|
||||
double zongSmNum1 = (estimatedBinocular / GlobalData.kbsmsyArea) * 100;
|
||||
sybhl.Text = zongSmNum1.ToString("0.00");
|
||||
double zongNum1 = (estimatedTotal / GlobalData.zsymjValue) * 100;
|
||||
zsysaveSum.Text = zongNum1.ToString("0.00");
|
||||
|
||||
|
||||
int bottom = (int)Math.Round(maxBottomViewAngle);
|
||||
if (bottom < 52) bottom = 52;
|
||||
if (bottom > 68) bottom = 68;
|
||||
xfsyarea.Text = bottom.ToString("0");
|
||||
}
|
||||
}
|
||||
|
||||
//if (double.TryParse(smsyarea.Text, out double totalAreaForRate))
|
||||
//{
|
||||
// double binocularRate = GetArea.CalcVisionRate(totalAreaForRate);
|
||||
// sybhl.Text = binocularRate.ToString("0.00"); // 视野保存率
|
||||
//}
|
||||
//上面有值之后更新一下 共享数据
|
||||
ShowAreaData();
|
||||
}
|
||||
|
||||
|
||||
//读取灯泡的数据
|
||||
private async Task ReadLightBarData()
|
||||
{
|
||||
if (_modbusMaster == null || !ModbusHelper.TcpClient.Connected)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
ushort[] registers = await _modbusMaster.ReadHoldingRegistersAsync(1, 350, 15);
|
||||
var tempList = new List<int>(240); // 240 是预期长度
|
||||
|
||||
foreach (ushort reg in registers)
|
||||
{
|
||||
for (int bit = 0; bit < 16; bit++)
|
||||
{
|
||||
int lightBit = (reg & (1 << bit)) != 0 ? 1 : 0;
|
||||
tempList.Add(lightBit);
|
||||
}
|
||||
}
|
||||
|
||||
// 将 List<int> 转为数组以便处理
|
||||
int[] rawData = tempList.ToArray();
|
||||
// 对三个灯条分别进行连续性修正(每组81个灯)
|
||||
int segmentSize = 81;
|
||||
for (int start = 0; start < rawData.Length; start += segmentSize)
|
||||
{
|
||||
int end = Math.Min(start + segmentSize, rawData.Length);
|
||||
ArraySegment<int> seg = new ArraySegment<int>(rawData, start, end - start);
|
||||
MakeDataContinuous(seg);
|
||||
}
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
DataList.Clear();
|
||||
DataList.AddRange(rawData.Cast<dynamic>());
|
||||
}
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"灯条二进制数据总长度:{DataList.Count}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"灯条数据读取失败:{ex.Message}");
|
||||
// 出错时不清空 DataList,保留旧数据
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使亮灭序列连续:将孤立的0或1改为与邻居一致(滑动窗口,确保没有单点突变)
|
||||
/// </summary>
|
||||
private void MakeDataContinuous(ArraySegment<int> segment)
|
||||
{
|
||||
int[] array = segment.Array;
|
||||
int start = segment.Offset;
|
||||
int length = segment.Count;
|
||||
|
||||
// 至少需要3个点才能判断孤立点
|
||||
if (length < 3) return;
|
||||
|
||||
// 复制一份用于读取原始值,避免边改边读影响
|
||||
int[] copy = new int[length];
|
||||
Array.Copy(array, start, copy, 0, length);
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
int left = (i > 0) ? copy[i - 1] : copy[0];
|
||||
int right = (i < length - 1) ? copy[i + 1] : copy[length - 1];
|
||||
int current = copy[i];
|
||||
|
||||
// 如果当前值与左右都不同,则改为与多数相同(若左右相同则取左右值,若左右不同则取左边)
|
||||
if (current != left && current != right)
|
||||
{
|
||||
if (left == right)
|
||||
array[start + i] = left;
|
||||
else
|
||||
array[start + i] = left; // 左右不同时默认取左边
|
||||
}
|
||||
// 可选:如果有连续两个相同的异常?但一般单点孤立最影响连续判断
|
||||
}
|
||||
}
|
||||
|
||||
private async void Timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (!_isTesting) return; // 非测试状态直接返回
|
||||
|
||||
if (!double.TryParse(dqangle.Text.Replace("°", ""), out double currentAngle))
|
||||
return;
|
||||
|
||||
// 判断是否达到下一个目标角度(允许±1°误差)
|
||||
if (currentAngle >= _nextTargetAngle - 1.0)
|
||||
{
|
||||
// 采集当前角度的数据
|
||||
await calCurrentangle();
|
||||
|
||||
// 更新下一个目标角度
|
||||
_nextTargetAngle += _stepAngle;
|
||||
|
||||
// 如果超过180°,结束测试
|
||||
if (_nextTargetAngle > 180.0 + 1e-6)
|
||||
{
|
||||
// 停止正转
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 11, false);
|
||||
_isTesting = false;
|
||||
ButtonTest.Content = "测试";
|
||||
// 最后更新一次最终结果(下方视野)
|
||||
UpdateVisionResults(maxBottomViewAngle);
|
||||
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 102, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
private async void testTimerForLightTick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
//if (btnLeft.Content.ToString() == "左眼开" && btnRight.Content.ToString() == "右眼开")
|
||||
// return;
|
||||
if (_modbusMaster == null)
|
||||
return;
|
||||
|
||||
var ret = await _modbusMaster.ReadCoilsAsync(1, 0, 2);
|
||||
if (ret != null && ret.Length > 0)
|
||||
{ //左眼开
|
||||
if (ret[0])
|
||||
{
|
||||
LedOn(led1);
|
||||
LedOff(led0);
|
||||
|
||||
btnLeft.Content = "左眼开";
|
||||
btnRight.Content = "右眼关";
|
||||
}
|
||||
else if (ret[1])
|
||||
{
|
||||
|
||||
LedOn(led0);
|
||||
LedOff(led1);
|
||||
btnLeft.Content = "左眼关";
|
||||
btnRight.Content = "右眼开";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private async void Timer_Tick(object sender, EventArgs e)
|
||||
//计算
|
||||
private async Task calCurrentangle()
|
||||
{
|
||||
await ReadLightBarData();
|
||||
|
||||
int[] lightData;
|
||||
lock (_lock)
|
||||
{
|
||||
lightData = DataList.Cast<int>().ToArray();
|
||||
}
|
||||
|
||||
if (lightData.Length == 0)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("lightData 长度为 0,无数据");
|
||||
return;
|
||||
}
|
||||
|
||||
double singleArea = GetArea.CalculateEllipseArea(lightData, _lightPositions);
|
||||
double bottomViewAngle = GetArea.CalculateBottomViewAngle(lightData, _lightPositions);
|
||||
|
||||
|
||||
if (tbTest.Content.ToString() == "试样测试")
|
||||
{
|
||||
singleArea *= SAMPLE_AREA_FACTOR;
|
||||
}
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"角度: {dqangle.Text}, singleArea={singleArea}, bottomViewAngle={bottomViewAngle}");
|
||||
|
||||
// 5. 根据当前测试模式(左眼/右眼/双目),累加面积
|
||||
if (isLeftOnly)
|
||||
{
|
||||
//System.Diagnostics.Debug.WriteLine($"lightData 实际长度: {lightData.Length}");
|
||||
_leftTotalArea += singleArea;
|
||||
// 实时合并左眼:只要亮过一次,就永久亮
|
||||
|
||||
// 安全获取真实长度
|
||||
int realLength = lightData.Length;
|
||||
|
||||
// 初始化最终数据(永远和 lightData 一样长,不会错)
|
||||
if (_leftFinalData == null || _leftFinalData.Count != realLength)
|
||||
{
|
||||
_leftFinalData = new List<int>(new int[realLength]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < realLength; i++)
|
||||
{
|
||||
if (lightData[i] == 1)
|
||||
{
|
||||
_leftFinalData[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (isRightOnly)
|
||||
{
|
||||
_rightTotalArea += singleArea;
|
||||
int realLength = lightData.Length;
|
||||
|
||||
if (_rightFinalData == null || _rightFinalData.Count != realLength)
|
||||
{
|
||||
_rightFinalData = new List<int>(new int[realLength]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < realLength; i++)
|
||||
{
|
||||
if (lightData[i] == 1)
|
||||
{
|
||||
_rightFinalData[i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 6. 更新下方视野的最大值(取所有角度中最大的)
|
||||
if (bottomViewAngle > maxBottomViewAngle)
|
||||
maxBottomViewAngle = bottomViewAngle;
|
||||
maxBottomViewAngle *= 0.8;
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
zmsyarea.Text = _leftTotalArea.ToString("0");
|
||||
ymsyarea.Text = _rightTotalArea.ToString("0");
|
||||
smsyarea.Text = _binocularTotalArea.ToString("0");
|
||||
xfsyarea.Text = maxBottomViewAngle.ToString("0");
|
||||
});
|
||||
}
|
||||
|
||||
//数据共享
|
||||
private async void ShowAreaData()
|
||||
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("定时器触发了!" + DateTime.Now);
|
||||
// 调用你原来的读取方
|
||||
//await ReadAddr262DataAsync();
|
||||
|
||||
// 组装当前数据
|
||||
var data = new TestDataStore.TestRecord
|
||||
{
|
||||
@@ -208,7 +513,10 @@ namespace 头罩视野.Views
|
||||
RightEyeArea = double.TryParse(ymsyarea.Text, out var r) ? r : 0,
|
||||
BinocularArea = double.TryParse(smsyarea.Text, out var b) ? b : 0,
|
||||
LowerVision = double.TryParse(xfsyarea.Text, out var lv) ? lv : 0,
|
||||
VisionRetentionRate = double.TryParse(sybhl.Text, out var vr) ? vr : 0
|
||||
VisionRetentionRate = double.TryParse(sybhl.Text, out var vr) ? vr : 0,
|
||||
totalVisionArea = double.TryParse(zsyareaNum.Text, out var vrt) ? vrt : 0,
|
||||
GetVisionRetentionRate = double.TryParse(zsysaveSum.Text, out var vrc) ? vrc : 0,
|
||||
|
||||
};
|
||||
|
||||
// ==================== 去重判断 ====================
|
||||
@@ -217,53 +525,47 @@ namespace 头罩视野.Views
|
||||
data.RightEyeArea == _lastRecord.RightEyeArea &&
|
||||
data.BinocularArea == _lastRecord.BinocularArea &&
|
||||
data.LowerVision == _lastRecord.LowerVision &&
|
||||
data.VisionRetentionRate == _lastRecord.VisionRetentionRate)
|
||||
data.VisionRetentionRate == _lastRecord.VisionRetentionRate &&
|
||||
data.totalVisionArea == _lastRecord.totalVisionArea &&
|
||||
data.GetVisionRetentionRate == _lastRecord.GetVisionRetentionRate
|
||||
)
|
||||
{
|
||||
return; // 一样就不添加
|
||||
}
|
||||
if (data.BinocularArea == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//原来存的数据清空 切换页面会清空
|
||||
//TestDataStore.Records.Clear();
|
||||
// 不一样 → 插入表格
|
||||
TestDataStore.AddNewRecord(data);
|
||||
_lastRecord = data;
|
||||
}
|
||||
|
||||
//打印
|
||||
|
||||
private void Button_Click_Print(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 103);
|
||||
|
||||
}
|
||||
//试样测试
|
||||
|
||||
|
||||
private void TbTest_Checked(object sender, RoutedEventArgs e)
|
||||
private async void TbTest_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 选中 → 试样测试
|
||||
|
||||
|
||||
tbTest.Content = "空白测试";
|
||||
GlobalData.CurrentMode = "空白测试";
|
||||
|
||||
tbTest.Background = System.Windows.Media.Brushes.LightSkyBlue;
|
||||
System.Diagnostics.Debug.WriteLine($"1232312312");
|
||||
_modbusMaster.WriteSingleCoilAsync(1, 41, true);
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 41, true);
|
||||
}
|
||||
|
||||
private void TbTest_Unchecked(object sender, RoutedEventArgs e)
|
||||
private async void TbTest_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 取消 → 空白测试
|
||||
|
||||
tbTest.Content = "试样测试";
|
||||
GlobalData.CurrentMode = "试样测试";
|
||||
tbTest.Background = System.Windows.Media.Brushes.LightGray;
|
||||
_modbusMaster.WriteSingleCoilAsync(1, 41, false);
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 41, false);
|
||||
}
|
||||
private void Button_Click_home(object sender, RoutedEventArgs e)
|
||||
{
|
||||
NavigationService.Content = null;
|
||||
}
|
||||
|
||||
|
||||
//读取数据
|
||||
private DispatcherTimer InitDispatcherTimer()
|
||||
@@ -301,28 +603,29 @@ namespace 头罩视野.Views
|
||||
//ReadAndUpdateFloatAsync(210 ,2, ymsyarea, "F2", " "),
|
||||
ReadAndUpdateFloatRangeAsync(200, 12, "F2", "°"),
|
||||
//ReadAndUpdateFloatAsync(424 ,2, kbsyarea, "F2", "cm²"),
|
||||
ReadAndUpdateFloatAsync(310, 2, zdangle, "F2", "°/S"),
|
||||
ReadAndUpdateFloatAsync(310, 2, zdangle, "F2", ""),
|
||||
//ReadAndUpdateFloatAsync(430 ,2, sybhl, "F2", " "),
|
||||
|
||||
//前1从站地址,后1是长度
|
||||
|
||||
|
||||
};
|
||||
isFinished = _modbusMaster.ReadCoils(1, 102, 1)[0];
|
||||
isFinished = _modbusMaster.ReadCoils(1, 102, 1)[0];
|
||||
if (isFinished)
|
||||
{
|
||||
int.TryParse(fbspeed.Text, out int speedValue);
|
||||
// 还不确定?
|
||||
var recordPage = GetRecordDatePage();
|
||||
recordPage?.StopPlcTimer();
|
||||
recordPage?.getAllData(recordPage.LeftEyeDataList, recordPage.RightEyeDataList, int.Parse(fbspeed.Text));
|
||||
//值显示在页面,
|
||||
zmsyarea.Text = GlobalData.LeftEyeArea.ToString("0.00"); // 左目
|
||||
smsyarea.Text = GlobalData.BinocularArea.ToString("0.00"); // 双目
|
||||
kbsyarea.Text = GlobalData.BlankArea.ToString("0.00"); // 空白
|
||||
ymsyarea.Text = GlobalData.RightEyeArea.ToString("0.00"); // 右目
|
||||
xfsyarea.Text = GlobalData.LowerVision.ToString("0.00"); // 下方
|
||||
sybhl.Text = GlobalData.VisionRetentionRate.ToString("0.00"); // 视野保存率
|
||||
Button_Click_Stop(null, null);
|
||||
UpdateVisionResults(maxBottomViewAngle);
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 102, false);
|
||||
isFinished = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (double.TryParse(fbspeed.Text, out double result))
|
||||
{
|
||||
GlobalData.JudgmentalPerspective = result.ToString();
|
||||
}
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -378,13 +681,13 @@ namespace 头罩视野.Views
|
||||
//float value4 = c.UshortToFloat(registers[7], registers[6]);
|
||||
//float value5 = c.UshortToFloat(registers[9], registers[8]);
|
||||
//float value6 = c.UshortToFloat(registers[11], registers[10]);
|
||||
|
||||
currentAngle = value2;
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
|
||||
{
|
||||
fbspeed.Text = value.ToString(format) + unit;
|
||||
dqangle.Text = value2.ToString(format) + unit;
|
||||
fbspeed.Text = value.ToString(format);
|
||||
dqangle.Text = value2.ToString(format);
|
||||
//zmsyarea.Text = value3.ToString(format) + unit;
|
||||
//xfsyarea.Text = value4.ToString(format) + unit;
|
||||
//smsyarea.Text = value5.ToString(format) + unit;
|
||||
@@ -400,55 +703,138 @@ namespace 头罩视野.Views
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReadAndUpdateFloatAsync(int address, int length, System.Windows.Controls.TextBlock control, string format, string unit)
|
||||
{
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(async () =>
|
||||
await _modbusMaster!.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
//打印
|
||||
|
||||
private void Button_Click_Print(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 103);
|
||||
|
||||
if (registers != null && registers.Length >= 2)
|
||||
{
|
||||
float value = c.UshortToFloat(registers[1], registers[0]);
|
||||
Dispatcher.Invoke(() => control.Text = value.ToString(format) + unit);
|
||||
}
|
||||
else if (registers != null && registers.Length >= 1)
|
||||
{
|
||||
int value = registers[0];
|
||||
Dispatcher.Invoke(() => control.Text = value.ToString(format) + unit);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"读取地址{address}失败:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReadAndUpdateIntAsync(int address, int length, System.Windows.Controls.Control control, string format)
|
||||
{
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(() =>
|
||||
_modbusMaster.ReadHoldingRegisters(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
|
||||
if (registers != null && registers.Length >= 1)
|
||||
// 蓝色亮(蓝色)
|
||||
private void LedOn(Ellipse led)
|
||||
{
|
||||
led.Fill = Brushes.LightSkyBlue;
|
||||
}
|
||||
|
||||
// 灯灭(灰色)
|
||||
private void LedOff(Ellipse led)
|
||||
{
|
||||
led.Fill = Brushes.LightGray;
|
||||
}
|
||||
|
||||
//复位btn
|
||||
private void Button_Click_Reset(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//btnLeft.Content = "左眼开";
|
||||
//btnRight.Content = "右眼开";
|
||||
//LedOff(led1);
|
||||
//LedOff(led0);
|
||||
|
||||
|
||||
|
||||
//// 2. 清空累加值
|
||||
_leftTotalArea = 0;
|
||||
_rightTotalArea = 0;
|
||||
_binocularTotalArea = 0;
|
||||
maxBottomViewAngle = 0;
|
||||
|
||||
//初始化:全部设为0(灭)
|
||||
_leftFinalData = Enumerable.Repeat(0, 240).ToList();
|
||||
_rightFinalData = Enumerable.Repeat(0, 240).ToList();
|
||||
DataList.Clear();
|
||||
ma.BtnClickFunction(Function.ButtonType.复归型, 90);
|
||||
zmsyarea.Text = "0"; // 左目
|
||||
smsyarea.Text = "0"; // 双目
|
||||
kbsyarea.Text = "0"; // 空白
|
||||
ymsyarea.Text = "0"; // 右目
|
||||
xfsyarea.Text = "0"; // 下方
|
||||
sybhl.Text = "0"; // 视野保存率
|
||||
zsyareaNum.Text = "0";
|
||||
zsysaveSum.Text = "0";
|
||||
}
|
||||
//左开眼
|
||||
private void Button_Click_left(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 切换文案:开是关,关是开
|
||||
if (btnLeft.Content.ToString() == "左眼开")
|
||||
{
|
||||
|
||||
|
||||
btnLeft.Content = "左眼关";
|
||||
LedOn(led0);
|
||||
|
||||
if (btnRight.Content.ToString() == "右眼关")
|
||||
{
|
||||
int value = registers[0];
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (control is System.Windows.Controls.ContentControl contentControl)
|
||||
contentControl.Content = value.ToString(format);
|
||||
else if (control is System.Windows.Controls.TextBox textBox)
|
||||
textBox.Text = value.ToString(format);
|
||||
});
|
||||
btnRight.Content = "右眼开";
|
||||
LedOff(led1);
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"读取地址{address}失败:{ex.Message}");
|
||||
btnLeft.Content = "左眼开";
|
||||
LedOff(led0);
|
||||
}
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
||||
//GlobalData.LampValueLeft = btnLeft.Content.ToString();
|
||||
}
|
||||
//右开眼
|
||||
private void Button_Click_Right(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
// 切换文案:左眼开 ↔ 左眼关
|
||||
if (btnRight.Content.ToString() == "右眼开")
|
||||
{
|
||||
btnRight.Content = "右眼关";
|
||||
LedOn(led1);
|
||||
if (btnLeft.Content.ToString() == "左眼关")
|
||||
{
|
||||
|
||||
btnLeft.Content = "左眼开";
|
||||
LedOff(led0);
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
btnRight.Content = "右眼开";
|
||||
LedOff(led1);
|
||||
|
||||
}
|
||||
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
||||
//GlobalData.LampValueLeft = btnLeft.Content.ToString();
|
||||
}
|
||||
|
||||
//反转
|
||||
private async void Button_Click_ResDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 10, true);
|
||||
System.Diagnostics.Debug.WriteLine("反转开始");
|
||||
}
|
||||
|
||||
private async void Button_Click_ResUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 10, false);
|
||||
System.Diagnostics.Debug.WriteLine("反转结束");
|
||||
|
||||
}
|
||||
//正转
|
||||
|
||||
private async void Button_Click_ForDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 11, true);
|
||||
}
|
||||
|
||||
private async void Button_Click_ForUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
await _modbusMaster.WriteSingleCoilAsync(1, 11, false);
|
||||
//System.Diagnostics.Debug.WriteLine("正传end");
|
||||
}
|
||||
|
||||
//写入
|
||||
@@ -472,8 +858,6 @@ namespace 头罩视野.Views
|
||||
zdangle.Focus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//错误信息提示
|
||||
private void ShowError(string msg) => MessageBox.Show(msg, "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
private void GoHome(object s, RoutedEventArgs e) => NavigationService.Content = null;
|
||||
@@ -482,24 +866,37 @@ namespace 头罩视野.Views
|
||||
_timer.Stop();
|
||||
NavigationService.Content = new Views.PageTest();
|
||||
}
|
||||
private void GoRecord(object s, RoutedEventArgs e) => NavigationService.Content = new Views.RecordDate();
|
||||
private void GoView(object s, RoutedEventArgs e) => NavigationService.Content = new Views.RecordPage();
|
||||
//初始化数据
|
||||
private void InitAllDataAsync()
|
||||
{
|
||||
|
||||
//System.Diagnostics.Debug.WriteLine($"数据加载了啊 ");
|
||||
// 从全局数据读取当前模式
|
||||
string mode = GlobalData.CurrentMode;
|
||||
|
||||
if (mode == "试样测试")
|
||||
{
|
||||
TbTest_Checked(null, null);
|
||||
}
|
||||
testTimerForLightTick(null, null);
|
||||
}
|
||||
private void Page_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
System.Diagnostics.Debug.WriteLine("页面加载了!112222222");
|
||||
_timer.Start();
|
||||
ma = new Function(_modbusMaster);
|
||||
c = new DataChange();
|
||||
|
||||
//testTimerForLight.Start();
|
||||
//zmsyarea.Text = "4.00"; // 左目
|
||||
//smsyarea.Text = "5.00"; // 双目
|
||||
//kbsyarea.Text = "6.00"; // 空白
|
||||
//ymsyarea.Text = "7.00"; // 右目
|
||||
//xfsyarea.Text = "8.00"; // 下方
|
||||
//sybhl.Text = "9.00"; // 视野保存率
|
||||
|
||||
|
||||
}
|
||||
private void Page_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -508,7 +905,11 @@ namespace 头罩视野.Views
|
||||
_cts?.Cancel();
|
||||
_cts = null;
|
||||
|
||||
_modbusMaster.WriteSingleCoil(1, 1, false);
|
||||
|
||||
_modbusMaster.WriteSingleCoil(1, 0, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,52 +231,52 @@ namespace 头罩视野.Views
|
||||
}
|
||||
|
||||
//面积的计算方法
|
||||
public void getAllData(List<dynamic> leftEyeDataList, List<dynamic> RightEyeDataList, int perAngle)
|
||||
//public void getAllData(List<dynamic> leftEyeDataList, List<dynamic> RightEyeDataList, int perAngle)
|
||||
|
||||
{
|
||||
//{
|
||||
|
||||
// 1. 先去除异常值,生成新列表(不修改原列表)
|
||||
var filteredLeft = GetArea.RemoveOutliers(leftEyeDataList);
|
||||
var filteredRight = GetArea.RemoveOutliers(RightEyeDataList);
|
||||
// // 1. 先去除异常值,生成新列表(不修改原列表)
|
||||
// var filteredLeft = GetArea.RemoveOutliers(leftEyeDataList);
|
||||
// var filteredRight = GetArea.RemoveOutliers(RightEyeDataList);
|
||||
|
||||
//左目视野面积
|
||||
GlobalData.LeftEyeArea = GetArea.CalculateEyeArea(filteredLeft);
|
||||
//右目视野面积
|
||||
GlobalData.RightEyeArea = GetArea.CalculateEyeArea(filteredRight);
|
||||
//双目视野面积
|
||||
GlobalData.BinocularArea = GetArea.CalcBinocularArea(filteredLeft, filteredRight);
|
||||
// //左目视野面积
|
||||
// GlobalData.LeftEyeArea = GetArea.CalculateEyeArea(filteredLeft);
|
||||
// //右目视野面积
|
||||
// GlobalData.RightEyeArea = GetArea.CalculateEyeArea(filteredRight);
|
||||
// //双目视野面积
|
||||
// GlobalData.BinocularArea = GetArea.CalcBinocularArea(filteredLeft, filteredRight);
|
||||
|
||||
//// 总视野面积
|
||||
GlobalData.TotalEyeArea = GlobalData.LeftEyeArea + GlobalData.RightEyeArea - GlobalData.BinocularArea;
|
||||
// //// 总视野面积
|
||||
// GlobalData.TotalEyeArea = GlobalData.LeftEyeArea + GlobalData.RightEyeArea - GlobalData.BinocularArea;
|
||||
|
||||
//// 空白视野面积
|
||||
GlobalData.BlankArea = GetArea.StandardTotal - GlobalData.TotalEyeArea;
|
||||
// //// 空白视野面积
|
||||
// GlobalData.BlankArea = GetArea.StandardTotal - GlobalData.TotalEyeArea;
|
||||
|
||||
//视野保存率
|
||||
// //视野保存率
|
||||
|
||||
// 左眼平均值数组
|
||||
double[] leftAvg = GetArea.GetEyeAvgArray(filteredLeft);
|
||||
// // 左眼平均值数组
|
||||
// double[] leftAvg = GetArea.GetEyeAvgArray(filteredLeft);
|
||||
|
||||
// 右眼平均值数组
|
||||
double[] rightAvg = GetArea.GetEyeAvgArray(RightEyeDataList);
|
||||
// // 右眼平均值数组
|
||||
// double[] rightAvg = GetArea.GetEyeAvgArray(RightEyeDataList);
|
||||
|
||||
double leftLowerAngle = GetArea.CalcLowerAngle(leftAvg, perAngle);
|
||||
double rightLowerAngle = GetArea.CalcLowerAngle(rightAvg, perAngle);
|
||||
//下方视野
|
||||
GlobalData.LowerVision = Math.Min(leftLowerAngle, rightLowerAngle);
|
||||
// double leftLowerAngle = GetArea.CalcLowerAngle(leftAvg, perAngle);
|
||||
// double rightLowerAngle = GetArea.CalcLowerAngle(rightAvg, perAngle);
|
||||
// //下方视野
|
||||
// GlobalData.LowerVision = Math.Min(leftLowerAngle, rightLowerAngle);
|
||||
|
||||
//视野保存率
|
||||
GlobalData.VisionRetentionRate = GetArea.CalcVisionRate(GlobalData.LeftEyeArea, GlobalData.RightEyeArea);
|
||||
// //视野保存率
|
||||
// GlobalData.VisionRetentionRate = GetArea.CalcVisionRate(GlobalData.LeftEyeArea, GlobalData.RightEyeArea);
|
||||
|
||||
//打印数值显示在系统上面
|
||||
System.Diagnostics.Debug.WriteLine("左目视野面积" + GlobalData.LeftEyeArea);
|
||||
System.Diagnostics.Debug.WriteLine("右目视野面积" + GlobalData.RightEyeArea);
|
||||
System.Diagnostics.Debug.WriteLine("双目视野面积" + GlobalData.BinocularArea);
|
||||
System.Diagnostics.Debug.WriteLine("总视野面积" + GlobalData.TotalEyeArea);
|
||||
System.Diagnostics.Debug.WriteLine("下方视野" + GlobalData.LowerVision);
|
||||
System.Diagnostics.Debug.WriteLine("视野保存率" + GlobalData.VisionRetentionRate);
|
||||
// //打印数值显示在系统上面
|
||||
// System.Diagnostics.Debug.WriteLine("左目视野面积" + GlobalData.LeftEyeArea);
|
||||
// System.Diagnostics.Debug.WriteLine("右目视野面积" + GlobalData.RightEyeArea);
|
||||
// System.Diagnostics.Debug.WriteLine("双目视野面积" + GlobalData.BinocularArea);
|
||||
// System.Diagnostics.Debug.WriteLine("总视野面积" + GlobalData.TotalEyeArea);
|
||||
// System.Diagnostics.Debug.WriteLine("下方视野" + GlobalData.LowerVision);
|
||||
// System.Diagnostics.Debug.WriteLine("视野保存率" + GlobalData.VisionRetentionRate);
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -151,14 +151,16 @@
|
||||
|
||||
<!-- 表格列(你要的 6 列) -->
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="编号" Binding="{Binding Id}" Width="80" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="编号" Binding="{Binding Id}" Width="70" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="时间" Binding="{Binding Time}" Width="120" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="日期" Binding="{Binding Date}" Width="120" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="左目视野面积" Binding="{Binding LeftEyeArea,StringFormat=F2}" Width="*" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="右目视野面积" Binding="{Binding RightEyeArea,StringFormat=F2}" Width="*" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="双目视野面积" Binding="{Binding BinocularArea,StringFormat=F2}" Width="*" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="下方视野" Binding="{Binding LowerVision,StringFormat=F2}" Width="*" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="视野保存率" Binding="{Binding VisionRetentionRate,StringFormat=F2}" Width="*" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="左目视野面积" Binding="{Binding LeftEyeArea,StringFormat=F2}" Width="130" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="右目视野面积" Binding="{Binding RightEyeArea,StringFormat=F2}" Width="130" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="双目视野面积" Binding="{Binding BinocularArea,StringFormat=F2}" Width="130" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="下方视野" Binding="{Binding LowerVision,StringFormat=F2}" Width="130" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="总视野面积" Binding="{Binding totalVisionArea,StringFormat=F2}" Width="130" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="双目视野保存率" Binding="{Binding VisionRetentionRate,StringFormat=F2}" Width="130" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Header="总视野保存率" Binding="{Binding GetVisionRetentionRate,StringFormat=F2}" Width="130" IsReadOnly="True"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
@@ -179,15 +181,15 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<!--<ColumnDefinition Width="*"/>-->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="0" Content="主页"
|
||||
Click="GoHome" />
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="1" Content="测试界面"
|
||||
Click="GoTest" />
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="2" Content="数据记录"
|
||||
Click="GoRecord" />
|
||||
<!--<Button Style="{StaticResource TabButtonStyle}" Grid.Column="2" Content="数据记录"
|
||||
Click="GoRecord" />-->
|
||||
<Button Style="{StaticResource TabButtonStyle}" Grid.Column="3" Content="记录画面"
|
||||
Click="GoView" />
|
||||
</Grid>
|
||||
|
||||
@@ -17,6 +17,8 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using 头罩视野.Services.Data;
|
||||
using static 头罩视野.TestDataStore;
|
||||
|
||||
@@ -38,17 +40,7 @@ namespace 头罩视野.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
//#region 2. 清除表格数据
|
||||
//private void btnClear_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// // 确认清除
|
||||
// if (MessageBox.Show("确定要清除所有记录吗?", "确认", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
// {
|
||||
// TestDataStore.Records.Clear();
|
||||
// RecordDataGrid.ItemsSource = null;
|
||||
// RecordDataGrid.ItemsSource = TestDataStore.Records;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//清除
|
||||
private void btnClear_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
@@ -88,40 +80,303 @@ namespace 头罩视野.Views
|
||||
|
||||
}
|
||||
|
||||
////#endregion
|
||||
////#region 3. 保存为Excel
|
||||
//private void btnSave_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
|
||||
// try
|
||||
// {
|
||||
// // 1. 构建表格内容
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// sb.AppendLine("编号,日期,时间,左目视野面积,右目视野面积,双目视野面积,空白视野面积,下方视野,视野保存率");
|
||||
|
||||
// foreach (var item in TestDataStore.Records)
|
||||
// {
|
||||
// sb.AppendLine($"{item.Id},{item.Date},{item.Time},{item.LeftEyeArea},{item.RightEyeArea},{item.BinocularArea},{item.LowerVision},{item.VisionRetentionRate}");
|
||||
// }
|
||||
|
||||
// // 2. 弹出保存框,让用户自己选位置
|
||||
// Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
|
||||
// saveFileDialog.Filter = "CSV 文件 (*.csv)|*.csv|所有文件 (*.*)|*.*";
|
||||
// saveFileDialog.FileName = $"测试记录_{DateTime.Now:yyyyMMddHHmmss}";
|
||||
|
||||
// if (saveFileDialog.ShowDialog() == true)
|
||||
// {
|
||||
// // 3. 保存文件
|
||||
// File.WriteAllText(saveFileDialog.FileName, sb.ToString(), Encoding.UTF8);
|
||||
// MessageBox.Show("保存成功!\n文件路径:" + saveFileDialog.FileName, "成功");
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// MessageBox.Show("保存失败:" + ex.Message);
|
||||
// }
|
||||
//}
|
||||
//#endregion
|
||||
//#region 3. 保存为Excel
|
||||
|
||||
|
||||
private List<TestDataStore.TestRecord> GenerateMockRecords()
|
||||
{
|
||||
var mockList = new List<TestDataStore.TestRecord>();
|
||||
Random rand = new Random();
|
||||
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
double left = rand.Next(6000, 8500);
|
||||
double right = rand.Next(6000, 8500);
|
||||
double binocular = (left + right) / 2 * 0.85;
|
||||
double lower = rand.Next(30, 50);
|
||||
double totalArea = left + right - binocular; // 总视野面积
|
||||
double preservation = totalArea / 12000 * 100; // 视野保存率(%)
|
||||
double totalPreserve = preservation * 0.95; // 总视野保存率(示例)
|
||||
|
||||
mockList.Add(new TestDataStore.TestRecord
|
||||
{
|
||||
Id = i,
|
||||
Date = DateTime.Now.AddDays(-i).ToString("yyyy-MM-dd"),
|
||||
Time = DateTime.Now.AddHours(-i).ToString("HH:mm:ss"),
|
||||
LeftEyeArea = left,
|
||||
RightEyeArea = right,
|
||||
BinocularArea = binocular,
|
||||
LowerVision = lower,
|
||||
VisionRetentionRate = preservation,
|
||||
totalVisionArea = totalArea, // ✅ 必须赋值
|
||||
GetVisionRetentionRate = totalPreserve // ✅ 必须赋值
|
||||
});
|
||||
}
|
||||
return mockList;
|
||||
}
|
||||
|
||||
|
||||
private void btnSave_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//// 判断是否有真实数据
|
||||
//bool hasRealData = TestDataStore.Records != null && TestDataStore.Records.Count > 0;
|
||||
//List<TestDataStore.TestRecord> exportRecords;
|
||||
|
||||
//if (!hasRealData)
|
||||
//{
|
||||
// exportRecords = GenerateMockRecords();
|
||||
// TestDataStore.Records.AddRange(exportRecords);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// exportRecords = TestDataStore.Records.ToList();
|
||||
//}
|
||||
|
||||
try
|
||||
{
|
||||
// 1. 构建表格内容
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("编号,日期,时间,左目视野面积,右目视野面积,双目视野面积,空白视野面积,下方视野,视野保存率");
|
||||
ExcelPackage.LicenseContext = OfficeOpenXml.LicenseContext.NonCommercial;
|
||||
|
||||
foreach (var item in TestDataStore.Records)
|
||||
var saveDialog = new Microsoft.Win32.SaveFileDialog
|
||||
{
|
||||
sb.AppendLine($"{item.Id},{item.Date},{item.Time},{item.LeftEyeArea},{item.RightEyeArea},{item.BinocularArea},{item.LowerVision},{item.VisionRetentionRate}");
|
||||
}
|
||||
Filter = "Excel 文件 (*.xlsx)|*.xlsx",
|
||||
FileName = $"视野测试报告_{DateTime.Now:yyyyMMddHHmmss}.xlsx"
|
||||
};
|
||||
if (saveDialog.ShowDialog() != true) return;
|
||||
|
||||
// 2. 弹出保存框,让用户自己选位置
|
||||
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
|
||||
saveFileDialog.Filter = "CSV 文件 (*.csv)|*.csv|所有文件 (*.*)|*.*";
|
||||
saveFileDialog.FileName = $"测试记录_{DateTime.Now:yyyyMMddHHmmss}";
|
||||
|
||||
if (saveFileDialog.ShowDialog() == true)
|
||||
using (var package = new OfficeOpenXml.ExcelPackage())
|
||||
{
|
||||
// 3. 保存文件
|
||||
File.WriteAllText(saveFileDialog.FileName, sb.ToString(), Encoding.UTF8);
|
||||
MessageBox.Show("保存成功!\n文件路径:" + saveFileDialog.FileName, "成功");
|
||||
// ========== 工作表1:报告摘要 ==========
|
||||
var sheet1 = package.Workbook.Worksheets.Add("报告摘要");
|
||||
|
||||
// 标题
|
||||
sheet1.Cells["A1"].Value = "头罩视野测试报告";
|
||||
sheet1.Cells["A1"].Style.Font.Size = 22;
|
||||
sheet1.Cells["A1"].Style.Font.Bold = true;
|
||||
sheet1.Cells["A1"].Style.HorizontalAlignment = OfficeOpenXml.Style.ExcelHorizontalAlignment.Center;
|
||||
sheet1.Cells["A1:G1"].Merge = true;
|
||||
|
||||
// 报告编号和日期
|
||||
sheet1.Cells["A3"].Value = "报告编号:";
|
||||
sheet1.Cells["B3"].Value = $"REP-{DateTime.Now:yyyyMMddHHmmss}";
|
||||
sheet1.Cells["D3"].Value = "试验日期:";
|
||||
sheet1.Cells["E3"].Value = DateTime.Now.ToString("yyyy年MM月dd日");
|
||||
sheet1.Cells["A3:E3"].Style.Font.Size = 12;
|
||||
|
||||
// 测试参数
|
||||
sheet1.Cells["A5"].Value = "测试参数";
|
||||
sheet1.Cells["A5"].Style.Font.Bold = true;
|
||||
sheet1.Cells["A6"].Value = "设备型号";
|
||||
sheet1.Cells["B6"].Value = "X015";
|
||||
sheet1.Cells["A7"].Value = "分辨角度";
|
||||
sheet1.Cells["B7"].Value = GlobalData.JudgmentalPerspective;
|
||||
sheet1.Cells["A8"].Value = "当前模式";
|
||||
sheet1.Cells["B8"].Value = GlobalData.CurrentMode;
|
||||
|
||||
|
||||
// 结果表格标题
|
||||
int rowStart = 10;
|
||||
string[] headers = { "编号", "日期", "时间", "左目视野(cm²)", "右目视野(cm²)",
|
||||
"双目视野(cm²)", "下方视野(°)", "视野保存率(%)",
|
||||
"总视野面积(cm²)", "总视野保存率(%)" };
|
||||
for (int i = 0; i < headers.Length; i++)
|
||||
sheet1.Cells[rowStart, i + 1].Value = headers[i];
|
||||
sheet1.Cells[rowStart, 1, rowStart, headers.Length].Style.Font.Bold = true;
|
||||
sheet1.Cells[rowStart, 1, rowStart, headers.Length].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;
|
||||
sheet1.Cells[rowStart, 1, rowStart, headers.Length].Style.Fill.BackgroundColor.SetColor(System.Drawing.Color.LightGray);
|
||||
|
||||
// 填充数据
|
||||
int row = rowStart + 1;
|
||||
foreach (var item in TestDataStore.Records)
|
||||
{
|
||||
sheet1.Cells[row, 1].Value = item.Id;
|
||||
sheet1.Cells[row, 2].Value = item.Date;
|
||||
sheet1.Cells[row, 3].Value = item.Time;
|
||||
sheet1.Cells[row, 4].Value = item.LeftEyeArea;
|
||||
sheet1.Cells[row, 5].Value = item.RightEyeArea;
|
||||
sheet1.Cells[row, 6].Value = item.BinocularArea;
|
||||
sheet1.Cells[row, 7].Value = item.LowerVision;
|
||||
sheet1.Cells[row, 8].Value = item.VisionRetentionRate;
|
||||
sheet1.Cells[row, 9].Value = item.totalVisionArea;
|
||||
sheet1.Cells[row, 10].Value = item.GetVisionRetentionRate;
|
||||
row++;
|
||||
}
|
||||
sheet1.Cells[1, 1, row - 1, headers.Length].AutoFitColumns();
|
||||
|
||||
// ========== 插入柱状图(展示最近5次左右眼面积对比)==========
|
||||
var records = TestDataStore.Records.TakeLast(5).ToList();
|
||||
if (records.Count > 0)
|
||||
{
|
||||
int chartStartRow = row + 3;
|
||||
sheet1.Cells[chartStartRow, 1].Value = "最近5次测试视野面积对比图";
|
||||
sheet1.Cells[chartStartRow, 1].Style.Font.Bold = true;
|
||||
|
||||
int dataRowStart = chartStartRow + 1;
|
||||
sheet1.Cells[dataRowStart, 1].Value = "序号";
|
||||
sheet1.Cells[dataRowStart, 2].Value = "左眼面积";
|
||||
sheet1.Cells[dataRowStart, 3].Value = "右眼面积";
|
||||
for (int i = 0; i < records.Count; i++)
|
||||
{
|
||||
sheet1.Cells[dataRowStart + 1 + i, 1].Value = i + 1;
|
||||
sheet1.Cells[dataRowStart + 1 + i, 2].Value = records[i].LeftEyeArea;
|
||||
sheet1.Cells[dataRowStart + 1 + i, 3].Value = records[i].RightEyeArea;
|
||||
}
|
||||
|
||||
var chart = sheet1.Drawings.AddChart("AreaChart", OfficeOpenXml.Drawing.Chart.eChartType.ColumnClustered);
|
||||
chart.SetPosition(chartStartRow, 0, 0, 0);
|
||||
chart.SetSize(600, 400);
|
||||
chart.Title.Text = "左右眼视野面积对比";
|
||||
chart.Legend.Position = OfficeOpenXml.Drawing.Chart.eLegendPosition.Bottom;
|
||||
var series1 = chart.Series.Add(sheet1.Cells[dataRowStart + 1, 2, dataRowStart + records.Count, 2],
|
||||
sheet1.Cells[dataRowStart + 1, 1, dataRowStart + records.Count, 1]);
|
||||
series1.Header = "左眼面积";
|
||||
var series2 = chart.Series.Add(sheet1.Cells[dataRowStart + 1, 3, dataRowStart + records.Count, 3],
|
||||
sheet1.Cells[dataRowStart + 1, 1, dataRowStart + records.Count, 1]);
|
||||
series2.Header = "右眼面积";
|
||||
}
|
||||
|
||||
//// ========== 新增:三个饼图(左眼、右眼、双目)基于最新一次测试数据 ==========
|
||||
//var latestRecord = TestDataStore.Records.LastOrDefault();
|
||||
//if (latestRecord != null)
|
||||
//{
|
||||
// // 标准总面积(与 GetArea 中定义一致)
|
||||
// double standardTotalArea = 2 * Math.PI * 330 * 330; // ≈ 684,000,可根据实际调整
|
||||
// // 如果您的 GetArea 中有公开的标准面积字段,建议使用:GetArea._standardTotalArea
|
||||
// // 这里为了兼容,直接计算
|
||||
|
||||
// // 饼图数据区域起始行(放在柱状图右侧,可根据实际微调)
|
||||
// int pieStartRow = row + 3;
|
||||
// int pieStartColLeft = 8; // 左眼饼图起始列 H
|
||||
// int pieStartColRight = 12; // 右眼饼图起始列 L
|
||||
// int pieStartColBin = 16; // 双目饼图起始列 P
|
||||
|
||||
// // 左眼饼图数据
|
||||
// double leftArea = latestRecord.LeftEyeArea;
|
||||
// double leftRemain = standardTotalArea - leftArea;
|
||||
// if (leftRemain < 0) leftRemain = 0;
|
||||
// sheet1.Cells[pieStartRow, pieStartColLeft].Value = "左眼视野";
|
||||
// sheet1.Cells[pieStartRow + 1, pieStartColLeft].Value = leftArea;
|
||||
// sheet1.Cells[pieStartRow + 2, pieStartColLeft].Value = "剩余区域";
|
||||
// sheet1.Cells[pieStartRow + 3, pieStartColLeft].Value = leftRemain;
|
||||
// var pieLeft = sheet1.Drawings.AddChart("PieLeft", OfficeOpenXml.Drawing.Chart.eChartType.Pie);
|
||||
// pieLeft.SetPosition(pieStartRow - 1, 0, pieStartColLeft - 2, 0);
|
||||
// pieLeft.SetSize(300, 200);
|
||||
// pieLeft.Title.Text = "左眼视野占比";
|
||||
// pieLeft.Legend.Position = OfficeOpenXml.Drawing.Chart.eLegendPosition.Bottom;
|
||||
// var seriesLeft = pieLeft.Series.Add(sheet1.Cells[pieStartRow + 1, pieStartColLeft, pieStartRow + 3, pieStartColLeft],
|
||||
// sheet1.Cells[pieStartRow, pieStartColLeft, pieStartRow + 2, pieStartColLeft]);
|
||||
// seriesLeft.Header = "面积 (cm²)";
|
||||
|
||||
|
||||
// //这里需要加入百分比显示,EPPlus 的饼图默认不显示百分比,需要手动设置数据标签
|
||||
|
||||
// // 右眼饼图数据
|
||||
// double rightArea = latestRecord.RightEyeArea;
|
||||
// double rightRemain = standardTotalArea - rightArea;
|
||||
// if (rightRemain < 0) rightRemain = 0;
|
||||
// sheet1.Cells[pieStartRow, pieStartColRight].Value = "右眼视野";
|
||||
// sheet1.Cells[pieStartRow + 1, pieStartColRight].Value = rightArea;
|
||||
// sheet1.Cells[pieStartRow + 2, pieStartColRight].Value = "剩余区域";
|
||||
// sheet1.Cells[pieStartRow + 3, pieStartColRight].Value = rightRemain;
|
||||
// var pieRight = sheet1.Drawings.AddChart("PieRight", OfficeOpenXml.Drawing.Chart.eChartType.Pie);
|
||||
// pieRight.SetPosition(pieStartRow - 1, 0, pieStartColRight - 2, 0);
|
||||
// pieRight.SetSize(300, 200);
|
||||
// pieRight.Title.Text = "右眼视野占比";
|
||||
// pieRight.Legend.Position = OfficeOpenXml.Drawing.Chart.eLegendPosition.Bottom;
|
||||
// var seriesRight = pieRight.Series.Add(sheet1.Cells[pieStartRow + 1, pieStartColRight, pieStartRow + 3, pieStartColRight],
|
||||
// sheet1.Cells[pieStartRow, pieStartColRight, pieStartRow + 2, pieStartColRight]);
|
||||
|
||||
// // 双目饼图数据
|
||||
// double binArea = latestRecord.BinocularArea;
|
||||
// double binRemain = standardTotalArea - binArea;
|
||||
// if (binRemain < 0) binRemain = 0;
|
||||
// sheet1.Cells[pieStartRow, pieStartColBin].Value = "双目视野";
|
||||
// sheet1.Cells[pieStartRow + 1, pieStartColBin].Value = binArea;
|
||||
// sheet1.Cells[pieStartRow + 2, pieStartColBin].Value = "剩余区域";
|
||||
// sheet1.Cells[pieStartRow + 3, pieStartColBin].Value = binRemain;
|
||||
// var pieBin = sheet1.Drawings.AddChart("PieBin", OfficeOpenXml.Drawing.Chart.eChartType.Pie);
|
||||
// pieBin.SetPosition(pieStartRow - 1, 0, pieStartColBin - 2, 0);
|
||||
// pieBin.SetSize(300, 200);
|
||||
// pieBin.Title.Text = "双目视野占比";
|
||||
// pieBin.Legend.Position = OfficeOpenXml.Drawing.Chart.eLegendPosition.Bottom;
|
||||
// var seriesBin = pieBin.Series.Add(sheet1.Cells[pieStartRow + 1, pieStartColBin, pieStartRow + 3, pieStartColBin],
|
||||
// sheet1.Cells[pieStartRow, pieStartColBin, pieStartRow + 2, pieStartColBin]);
|
||||
//}
|
||||
|
||||
// 添加备注说明(位置下移避免覆盖饼图)
|
||||
int noteRow = row + 30; // 原先是 row+20,现在下移避免与饼图重叠
|
||||
sheet1.Cells[noteRow, 1].Value = "备注:";
|
||||
sheet1.Cells[noteRow, 2].Value = "1. 视野保存率公式依据 GB 2890-2022 计算;";
|
||||
sheet1.Cells[noteRow + 1, 2].Value = "2. 空白视野面积为标准头模未戴面罩时的理论值;";
|
||||
sheet1.Cells[noteRow + 2, 2].Value = "3. 测试过程中若出现异常,请参考原始记录。";
|
||||
sheet1.Cells[noteRow, 1, noteRow + 2, 4].Style.Font.Size = 10;
|
||||
sheet1.Cells[noteRow, 1, noteRow + 2, 4].Style.Font.Italic = true;
|
||||
|
||||
// ========== 工作表2:原始数据明细 ==========
|
||||
var sheet2 = package.Workbook.Worksheets.Add("原始数据");
|
||||
for (int i = 0; i < headers.Length; i++)
|
||||
sheet2.Cells[1, i + 1].Value = headers[i];
|
||||
sheet2.Cells[1, 1, 1, headers.Length].Style.Font.Bold = true;
|
||||
row = 2;
|
||||
foreach (var item in TestDataStore.Records)
|
||||
{
|
||||
sheet2.Cells[row, 1].Value = item.Id;
|
||||
sheet2.Cells[row, 2].Value = item.Date;
|
||||
sheet2.Cells[row, 3].Value = item.Time;
|
||||
sheet2.Cells[row, 4].Value = item.LeftEyeArea;
|
||||
sheet2.Cells[row, 5].Value = item.RightEyeArea;
|
||||
sheet2.Cells[row, 6].Value = item.BinocularArea;
|
||||
sheet2.Cells[row, 7].Value = item.LowerVision;
|
||||
sheet2.Cells[row, 8].Value = item.VisionRetentionRate;
|
||||
sheet2.Cells[row, 9].Value = item.totalVisionArea;
|
||||
sheet2.Cells[row, 10].Value = item.GetVisionRetentionRate;
|
||||
row++;
|
||||
}
|
||||
sheet2.Cells[1, 1, row - 1, headers.Length].AutoFitColumns();
|
||||
|
||||
// 保存文件
|
||||
package.SaveAs(new FileInfo(saveDialog.FileName));
|
||||
MessageBox.Show($"报告已成功生成!\n路径:{saveDialog.FileName}", "导出成功", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("保存失败:" + ex.Message);
|
||||
MessageBox.Show($"生成报告失败:{ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
private void Page_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||||
<Setter Property="Width" Value="100"/>
|
||||
<Setter Property="Width" Value="105"/>
|
||||
</Style>
|
||||
<Style x:Key="TextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
|
||||
@@ -239,57 +239,6 @@ namespace 头罩视野.Views
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReadAndUpdateFloatAsync(int address, int length, System.Windows.Controls.TextBlock control, string format, string unit)
|
||||
{
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(async () =>
|
||||
await _modbusMaster.ReadHoldingRegistersAsync(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
|
||||
if (registers != null && registers.Length >= 2)
|
||||
{
|
||||
float value = c.UshortToFloat(registers[1], registers[0]);
|
||||
Dispatcher.Invoke(() => control.Text = value.ToString(format) + unit);
|
||||
}
|
||||
else if (registers != null && registers.Length >= 1)
|
||||
{
|
||||
int value = registers[0];
|
||||
Dispatcher.Invoke(() => control.Text = value.ToString(format) + unit);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"读取地址{address}失败:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReadAndUpdateIntAsync(int address, int length, System.Windows.Controls.Control control, string format)
|
||||
{
|
||||
try
|
||||
{
|
||||
ushort[] registers = await Task.Run(() =>
|
||||
_modbusMaster.ReadHoldingRegisters(1, (ushort)address, (ushort)length)
|
||||
);
|
||||
|
||||
if (registers != null && registers.Length >= 1)
|
||||
{
|
||||
int value = registers[0];
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (control is System.Windows.Controls.ContentControl contentControl)
|
||||
contentControl.Content = value.ToString(format);
|
||||
else if (control is System.Windows.Controls.TextBox textBox)
|
||||
textBox.Text = value.ToString(format);
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"读取地址{address}失败:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowError(string msg) => MessageBox.Show(msg, "错误", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
private void GoHome(object s, RoutedEventArgs e) => NavigationService.Content = null;
|
||||
private void GoTest(object s, RoutedEventArgs e) => NavigationService.Content = new Views.PageTest();
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "69F410B786DB1725D40721B4BFA0AF24ADE0F02A"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野;
|
||||
|
||||
|
||||
namespace 头罩视野 {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
|
||||
#line 5 "..\..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/app.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\App.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public static void Main() {
|
||||
头罩视野.App app = new 头罩视野.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "69F410B786DB1725D40721B4BFA0AF24ADE0F02A"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野;
|
||||
|
||||
|
||||
namespace 头罩视野 {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
|
||||
#line 5 "..\..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/app.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\App.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public static void Main() {
|
||||
头罩视野.App app = new 头罩视野.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\ChangeLanguage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "988A846E1656D700EA4630C867745AA59A3D0110"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Expression.Media;
|
||||
using HandyControl.Expression.Shapes;
|
||||
using HandyControl.Interactivity;
|
||||
using HandyControl.Media.Animation;
|
||||
using HandyControl.Media.Effects;
|
||||
using HandyControl.Properties.Langs;
|
||||
using HandyControl.Themes;
|
||||
using HandyControl.Tools;
|
||||
using HandyControl.Tools.Converter;
|
||||
using HandyControl.Tools.Extension;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ChangeLanguage
|
||||
/// </summary>
|
||||
public partial class ChangeLanguage : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 43 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock TX_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 47 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock TX_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 51 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button SW_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 68 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock TX_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 73 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button SW_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/changelanguage.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.TX_1 = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 2:
|
||||
this.TX_0 = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.SW_1 = ((System.Windows.Controls.Button)(target));
|
||||
|
||||
#line 51 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
this.SW_1.Click += new System.Windows.RoutedEventHandler(this.BtnGoNextPage_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 4:
|
||||
this.TX_2 = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.SW_2 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\ChangeLanguage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "988A846E1656D700EA4630C867745AA59A3D0110"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Expression.Media;
|
||||
using HandyControl.Expression.Shapes;
|
||||
using HandyControl.Interactivity;
|
||||
using HandyControl.Media.Animation;
|
||||
using HandyControl.Media.Effects;
|
||||
using HandyControl.Properties.Langs;
|
||||
using HandyControl.Themes;
|
||||
using HandyControl.Tools;
|
||||
using HandyControl.Tools.Converter;
|
||||
using HandyControl.Tools.Extension;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ChangeLanguage
|
||||
/// </summary>
|
||||
public partial class ChangeLanguage : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 43 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock TX_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 47 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock TX_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 51 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button SW_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 68 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock TX_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 73 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button SW_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/changelanguage.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.TX_1 = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 2:
|
||||
this.TX_0 = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.SW_1 = ((System.Windows.Controls.Button)(target));
|
||||
|
||||
#line 51 "..\..\..\..\Views\ChangeLanguage.xaml"
|
||||
this.SW_1.Click += new System.Windows.RoutedEventHandler(this.BtnGoNextPage_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 4:
|
||||
this.TX_2 = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.SW_2 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\Help.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "26C55F12F75F47E87465FBE205342822ABB38A23"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Help
|
||||
/// </summary>
|
||||
public partial class Help : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/help.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\Help.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\Help.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "26C55F12F75F47E87465FBE205342822ABB38A23"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Help
|
||||
/// </summary>
|
||||
public partial class Help : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/help.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\Help.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\SetPassWord.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "CD00A0EB8304DD1C4BC82D7B58CB962188A096F7"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SetPassWord
|
||||
/// </summary>
|
||||
public partial class SetPassWord : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 34 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_7;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 38 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_8;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 42 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_9;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_14;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 59 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_15;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 63 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_16;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 74 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_17;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 78 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_18;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 82 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_19;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 93 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_20;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 97 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_21;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 101 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_22;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 112 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_23;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 116 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_24;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 120 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_25;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 131 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox ActiveCode_Password;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 138 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox FullActiveCode_Password;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 144 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button TS_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/setpassword.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.NE_7 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 2:
|
||||
this.NE_8 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.NE_9 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 4:
|
||||
this.NE_14 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.NE_15 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.NE_16 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 7:
|
||||
this.NE_17 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.NE_18 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.NE_19 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.NE_20 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.NE_21 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.NE_22 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.NE_23 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 14:
|
||||
this.NE_24 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 15:
|
||||
this.NE_25 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 16:
|
||||
this.ActiveCode_Password = ((System.Windows.Controls.PasswordBox)(target));
|
||||
return;
|
||||
case 17:
|
||||
this.FullActiveCode_Password = ((System.Windows.Controls.PasswordBox)(target));
|
||||
return;
|
||||
case 18:
|
||||
this.TS_0 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\SetPassWord.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "CD00A0EB8304DD1C4BC82D7B58CB962188A096F7"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SetPassWord
|
||||
/// </summary>
|
||||
public partial class SetPassWord : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 34 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_7;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 38 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_8;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 42 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_9;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_14;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 59 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_15;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 63 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_16;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 74 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_17;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 78 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_18;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 82 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_19;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 93 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_20;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 97 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_21;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 101 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_22;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 112 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_23;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 116 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_24;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 120 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_25;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 131 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox ActiveCode_Password;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 138 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox FullActiveCode_Password;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 144 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button TS_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/setpassword.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\SetPassWord.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.NE_7 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 2:
|
||||
this.NE_8 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.NE_9 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 4:
|
||||
this.NE_14 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.NE_15 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.NE_16 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 7:
|
||||
this.NE_17 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.NE_18 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.NE_19 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.NE_20 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.NE_21 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.NE_22 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.NE_23 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 14:
|
||||
this.NE_24 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 15:
|
||||
this.NE_25 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 16:
|
||||
this.ActiveCode_Password = ((System.Windows.Controls.PasswordBox)(target));
|
||||
return;
|
||||
case 17:
|
||||
this.FullActiveCode_Password = ((System.Windows.Controls.PasswordBox)(target));
|
||||
return;
|
||||
case 18:
|
||||
this.TS_0 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,261 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\SetTime.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "51F0FF48EEB069C6AD0669FE96AF3D2EA6F39299"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SetTime
|
||||
/// </summary>
|
||||
public partial class SetTime : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 39 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 43 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 47 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_5;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 51 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_4;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_3;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 59 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 63 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_6;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 69 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 73 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 77 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_5;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 81 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_4;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 85 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_3;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 89 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 93 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_7;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 96 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button TS_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 107 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button FK_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/settime.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\SetTime.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.NE_0 = ((System.Windows.Controls.TextBox)(target));
|
||||
|
||||
#line 40 "..\..\..\..\Views\SetTime.xaml"
|
||||
this.NE_0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.NE_0_TextChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 2:
|
||||
this.NE_1 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.NE_5 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 4:
|
||||
this.NE_4 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.NE_3 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.NE_2 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 7:
|
||||
this.NE_6 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.ND_0 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.ND_1 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.ND_5 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.ND_4 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.ND_3 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.ND_2 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 14:
|
||||
this.NE_7 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 15:
|
||||
this.TS_0 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
case 16:
|
||||
this.FK_0 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,261 +0,0 @@
|
||||
#pragma checksum "..\..\..\..\Views\SetTime.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "51F0FF48EEB069C6AD0669FE96AF3D2EA6F39299"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Controls.Ribbon;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
using 头罩视野.Views;
|
||||
|
||||
|
||||
namespace 头罩视野.Views {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SetTime
|
||||
/// </summary>
|
||||
public partial class SetTime : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 39 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 43 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 47 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_5;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 51 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_4;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_3;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 59 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 63 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_6;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 69 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 73 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_1;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 77 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_5;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 81 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_4;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 85 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_3;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 89 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ND_2;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 93 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox NE_7;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 96 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button TS_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 107 "..\..\..\..\Views\SetTime.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button FK_0;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/头罩视野;component/views/settime.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\Views\SetTime.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "10.0.6.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.NE_0 = ((System.Windows.Controls.TextBox)(target));
|
||||
|
||||
#line 40 "..\..\..\..\Views\SetTime.xaml"
|
||||
this.NE_0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.NE_0_TextChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 2:
|
||||
this.NE_1 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.NE_5 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 4:
|
||||
this.NE_4 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 5:
|
||||
this.NE_3 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.NE_2 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 7:
|
||||
this.NE_6 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.ND_0 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.ND_1 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.ND_5 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.ND_4 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.ND_3 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.ND_2 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 14:
|
||||
this.NE_7 = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 15:
|
||||
this.TS_0 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
case 16:
|
||||
this.FK_0 = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +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\\31119\\.dotnet\\store\\|arch|\\|tfm|",
|
||||
"C:\\Users\\31119\\.nuget\\packages"
|
||||
],
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
|
||||
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false,
|
||||
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\App.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\MainWindow.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\ChangeLanguage.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\Help.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\PageTest.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\RecordDate.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\RecordPage.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\SetPassWord.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\SetTime.xaml;;
|
||||
FD:\work\hoodFieldOfView\头罩视野slove\头罩视野\Views\VisiData.xaml;;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\31119\.nuget\packages\</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\31119\.nuget\packages\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<PkgHandyControl Condition=" '$(PkgHandyControl)' == '' ">C:\Users\31119\.nuget\packages\handycontrol\3.5.1</PkgHandyControl>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -8,6 +8,13 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="ViewModels\**" />
|
||||
<EmbeddedResource Remove="ViewModels\**" />
|
||||
<None Remove="ViewModels\**" />
|
||||
<Page Remove="ViewModels\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Images\bmg.png" />
|
||||
<None Remove="Images\printTime.png" />
|
||||
@@ -19,11 +26,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="ViewModels\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EPPlus" Version="8.5.3" />
|
||||
<PackageReference Include="EPPlus" Version="7.1.0" />
|
||||
<PackageReference Include="HandyControl" Version="3.5.1" />
|
||||
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
|
||||
<PackageReference Include="NModbus4" Version="2.1.0" />
|
||||
|
||||
Reference in New Issue
Block a user