From 3c583b1091133e4af23c2534ae96bd094c132d58 Mon Sep 17 00:00:00 2001
From: patrick.xu <patrick.xu@broconcentric.com>
Date: 星期一, 24 五月 2021 08:46:47 +0800
Subject: [PATCH] 1. 更新dll引用地址 2. 主界面PLC操作安全屏蔽功能添加密码输入界面

---
 /dev/null                                        |    0 
 FormPlcOperation.cs                              |   10 ++++-
 M423project.csproj                               |   50 ++++++++++---------------
 libs/Interop.OPCAutomation.dll                   |    0 
 Bro.UI.HalconDisplay/Bro.UI.HalconDisplay.csproj |    4 +-
 ConfigPassword.cs                                |    9 ++++
 libs/ReduceMemory.dll                            |    0 
 libs/DownloadDLL.dll                             |    0 
 libs/FlyCapture2Managed_v100.dll                 |    0 
 libs/SperateData.dll                             |    0 
 10 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/Bro.UI.HalconDisplay/Bro.UI.HalconDisplay.csproj b/Bro.UI.HalconDisplay/Bro.UI.HalconDisplay.csproj
index 07dcaa4..4bb3827 100644
--- a/Bro.UI.HalconDisplay/Bro.UI.HalconDisplay.csproj
+++ b/Bro.UI.HalconDisplay/Bro.UI.HalconDisplay.csproj
@@ -80,10 +80,10 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="halcondotnet">
-      <HintPath>..\bin\Release\halcondotnet.dll</HintPath>
+      <HintPath>..\libs\halcondotnet.dll</HintPath>
     </Reference>
     <Reference Include="hdevenginedotnet">
-      <HintPath>..\bin\Release\hdevenginedotnet.dll</HintPath>
+      <HintPath>..\libs\hdevenginedotnet.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core">
diff --git a/ConfigPassword.cs b/ConfigPassword.cs
index 9936477..5f94304 100644
--- a/ConfigPassword.cs
+++ b/ConfigPassword.cs
@@ -1,6 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Configuration;
 using System.Data;
 using System.Drawing;
 using System.Linq;
@@ -20,7 +21,13 @@
 
         private void btnOK_Click(object sender, EventArgs e)
         {
-            string password = "xs1234";
+            string password = "";
+            password = ConfigurationManager.AppSettings["Password"];
+            if (string.IsNullOrWhiteSpace(password))
+            {
+                password = "xs1234";
+            }
+
             if (tbPassWord.Text.ToUpper().Equals(password.ToUpper()))
             {
                 this.DialogResult = DialogResult.OK;
diff --git a/FormPlcOperation.cs b/FormPlcOperation.cs
index 1a2d7c4..6fe851a 100644
--- a/FormPlcOperation.cs
+++ b/FormPlcOperation.cs
@@ -54,12 +54,18 @@
 
         private void cbPingbiGuangshan_CheckedChanged(object sender, EventArgs e)
         {
-            _opc.Write(OPCOutputTag.PingbiGuangShan, cbPingbiGuangshan.Checked);
+            if (new ConfigPassword("").ShowDialog() == DialogResult.OK)
+            {
+                _opc.Write(OPCOutputTag.PingbiGuangShan, cbPingbiGuangshan.Checked);
+            }
         }
 
         private void cbPingbiSafeGuard_CheckedChanged(object sender, EventArgs e)
         {
-            _opc.Write(OPCOutputTag.PingbiSafeGuard, cbPingbiSafeGuard.Checked);
+            if (new ConfigPassword("").ShowDialog() == DialogResult.OK)
+            {
+                _opc.Write(OPCOutputTag.PingbiSafeGuard, cbPingbiSafeGuard.Checked);
+            }
         }
     }
 }
diff --git a/M423project.csproj b/M423project.csproj
index 3330d3b..43b877d 100644
--- a/M423project.csproj
+++ b/M423project.csproj
@@ -72,38 +72,30 @@
     <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="AutoRunCard, Version=2017.1.19.1, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\M423Release\AutoRunCard.dll</HintPath>
+    <Reference Include="AutoRunCard">
+      <HintPath>libs\AutoRunCard.dll</HintPath>
     </Reference>
-    <Reference Include="DownloadDLL, Version=2015.7.6.1, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>bin\Release\DownloadDLL.dll</HintPath>
+    <Reference Include="DownloadDLL">
+      <HintPath>libs\DownloadDLL.dll</HintPath>
     </Reference>
-    <Reference Include="EventTool, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\M423Release\EventTool.dll</HintPath>
+    <Reference Include="EventTool">
+      <HintPath>libs\EventTool.dll</HintPath>
     </Reference>
-    <Reference Include="FileToolkit, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\M423Release\FileToolkit.dll</HintPath>
+    <Reference Include="FileToolkit">
+      <HintPath>libs\FileToolkit.dll</HintPath>
     </Reference>
-    <Reference Include="FlyCapture2Managed_v100, Version=2.10.3.169, Culture=neutral, PublicKeyToken=76c6583b4a4585f4, processorArchitecture=x86">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files\Point Grey Research\FlyCapture2\bin\FlyCapture2Managed_v100.dll</HintPath>
+    <Reference Include="FlyCapture2Managed_v100">
+      <HintPath>libs\FlyCapture2Managed_v100.dll</HintPath>
     </Reference>
-    <Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\M423Release\halcondotnet.dll</HintPath>
+    <Reference Include="halcondotnet">
+      <HintPath>libs\halcondotnet.dll</HintPath>
     </Reference>
-    <Reference Include="hdevenginedotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>bin\Release\hdevenginedotnet.dll</HintPath>
+    <Reference Include="hdevenginedotnet">
+      <HintPath>libs\hdevenginedotnet.dll</HintPath>
     </Reference>
-    <Reference Include="Interop.OPCAutomation, Version=1.0.0.0, Culture=neutral">
-      <SpecificVersion>False</SpecificVersion>
+    <Reference Include="Interop.OPCAutomation">
+      <HintPath>libs\Interop.OPCAutomation.dll</HintPath>
       <EmbedInteropTypes>True</EmbedInteropTypes>
-      <HintPath>bin\Release\Interop.OPCAutomation.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -115,13 +107,11 @@
     <Reference Include="PresentationFramework">
       <RequiredTargetFramework>3.0</RequiredTargetFramework>
     </Reference>
-    <Reference Include="ReduceMemory, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\M423Release\ReduceMemory.dll</HintPath>
+    <Reference Include="ReduceMemory">
+      <HintPath>libs\ReduceMemory.dll</HintPath>
     </Reference>
-    <Reference Include="SperateData, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\M423Release\SperateData.dll</HintPath>
+    <Reference Include="SperateData">
+      <HintPath>libs\SperateData.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
diff --git a/libs/DownloadDLL.dll b/libs/DownloadDLL.dll
new file mode 100644
index 0000000..e054e0c
--- /dev/null
+++ b/libs/DownloadDLL.dll
Binary files differ
diff --git a/libs/FlyCapture2Managed_v100.dll b/libs/FlyCapture2Managed_v100.dll
new file mode 100644
index 0000000..b4efa3c
--- /dev/null
+++ b/libs/FlyCapture2Managed_v100.dll
Binary files differ
diff --git a/libs/Interop.OPCAutomation.dll b/libs/Interop.OPCAutomation.dll
new file mode 100644
index 0000000..6cf6f68
--- /dev/null
+++ b/libs/Interop.OPCAutomation.dll
Binary files differ
diff --git a/libs/ReduceMemory.dll b/libs/ReduceMemory.dll
new file mode 100644
index 0000000..9f07c20
--- /dev/null
+++ b/libs/ReduceMemory.dll
Binary files differ
diff --git a/libs/SperateData.dll b/libs/SperateData.dll
new file mode 100644
index 0000000..e4e2da8
--- /dev/null
+++ b/libs/SperateData.dll
Binary files differ
diff --git a/libs/halcondotnetxl.dll b/libs/halcondotnetxl.dll
deleted file mode 100644
index 0bd5a83..0000000
--- a/libs/halcondotnetxl.dll
+++ /dev/null
Binary files differ
diff --git a/libs/halconxl.dll b/libs/halconxl.dll
deleted file mode 100644
index ed7d3bd..0000000
--- a/libs/halconxl.dll
+++ /dev/null
Binary files differ
diff --git a/libs/hdevenginedotnetxl.dll b/libs/hdevenginedotnetxl.dll
deleted file mode 100644
index 66d260a..0000000
--- a/libs/hdevenginedotnetxl.dll
+++ /dev/null
Binary files differ

--
Gitblit v1.8.0