From c4fa5bc34b30434b9f39f2670c30d10cf9f1cad4 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-1VKMM8S>
Date: 星期二, 16 三月 2021 15:33:56 +0800
Subject: [PATCH] 1.将配置文件路径更改为程序路径下。
---
P066.Data/P066.Data.csproj | 1 +
P066.Data/Form1.cs | 14 ++++++--------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/P066.Data/Form1.cs b/P066.Data/Form1.cs
index f598725..9898e0e 100644
--- a/P066.Data/Form1.cs
+++ b/P066.Data/Form1.cs
@@ -10,6 +10,7 @@
using System.IO;
using Bro.Common;
using Bro.Common.Util;
+using System.Configuration;
namespace P066.Data
{
@@ -24,10 +25,9 @@
{
InitializeComponent();
//ConfigHelper.Save(@"D:\P066-Data\P066XML\1.xml", runparam);
- runparam = ConfigHelper.Load<P066RunParam>(@"D:\P066-Data\P066XML\Jin_Mid.xml");
-
-
- }
+ var configuraPath = Environment.CurrentDirectory+ "\\Config\\Jin_Mid.xml";
+ runparam = ConfigHelper.Load<P066RunParam>(configuraPath);
+ }
private void btnLoadData1_Click(object sender, EventArgs e)
{
@@ -50,6 +50,7 @@
{
var fileinfos1 = directoryInfo1.GetFiles();
+
var fileinfos2 = directoryInfo2.GetFiles();
var listSum = new List<ResultData>();
var JudgeListSum = new List<ResultData>();
@@ -466,7 +467,6 @@
//}
string defectType = "";
- string judgmentresult = "";
for (int i = 1; i < allLines.Length; i++)
{
@@ -493,13 +493,11 @@
if (data[3]== "鍒櫧")
{
defectType = "鍒櫧";
- judgmentresult =data[1];
Ptr = "鍒櫧";
}
else
{
defectType = "鐧界偣";
- judgmentresult = data[1];
}
if (data[6] == "-")
@@ -554,7 +552,7 @@
{
TimeTip = data[0].Split('-')[0],
ImageFileName = data[0],
- JudgmentResult = judgmentresult,
+ JudgmentResult = data[1],
Result = data[3] == "OK",
Probability = Convert.ToDouble(data[4]),
Uncertainty = Convert.ToDouble(data[5]),
diff --git a/P066.Data/P066.Data.csproj b/P066.Data/P066.Data.csproj
index cff15a3..c09b13d 100644
--- a/P066.Data/P066.Data.csproj
+++ b/P066.Data/P066.Data.csproj
@@ -34,6 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
+ <Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
--
Gitblit v1.8.0