diff --git a/ECR_N5_DLL_TestUI/App.config b/ECR_N5_DLL_TestUI/App.config
new file mode 100644
index 0000000..731f6de
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ECR_N5_DLL_TestUI/App.xaml b/ECR_N5_DLL_TestUI/App.xaml
new file mode 100644
index 0000000..c414142
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/ECR_N5_DLL_TestUI/App.xaml.cs b/ECR_N5_DLL_TestUI/App.xaml.cs
new file mode 100644
index 0000000..64291ff
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace ECR_N5_DLL_TestUI
+{
+ ///
+ /// App.xaml 的交互逻辑
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/ECR_N5_DLL_TestUI/ECR_N5_DLL_TestUI.csproj b/ECR_N5_DLL_TestUI/ECR_N5_DLL_TestUI.csproj
new file mode 100644
index 0000000..3096667
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/ECR_N5_DLL_TestUI.csproj
@@ -0,0 +1,131 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {DEF387D0-3F98-4720-874D-8A753399B206}
+ WinExe
+ ECR_N5_DLL_TestUI
+ ECR_N5_DLL_TestUI
+ v4.6.1
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+ false
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4.6.1 %28x86 和 x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+ {1f0c1d84-fd97-41f1-bc8b-f2f22c1997a1}
+ n5coredll
+
+
+
+
\ No newline at end of file
diff --git a/ECR_N5_DLL_TestUI/MainWindow.xaml b/ECR_N5_DLL_TestUI/MainWindow.xaml
new file mode 100644
index 0000000..29b19a9
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/MainWindow.xaml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ECR_N5_DLL_TestUI/MainWindow.xaml.cs b/ECR_N5_DLL_TestUI/MainWindow.xaml.cs
new file mode 100644
index 0000000..577c665
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/MainWindow.xaml.cs
@@ -0,0 +1,572 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Threading;
+using System.Security.Cryptography;
+using System.Windows.Threading;
+using n5coredll;
+
+namespace ECR_N5_DLL_TestUI
+{
+ public partial class MainWindow : Window
+ {
+ private string portName = "COM5";
+ private string baudRate = "9600";
+ private string dataBits = "8";
+ private string stopBits = "One";
+ private string parity = "None";
+ private string timeOut = "210000";
+
+ private string thisEvent;
+
+ public bool addLogFlag = true;
+
+ public string currEventName = null;
+ public string jsonResultByThead = null;
+ public string requestStrByThead = null;
+ public string showResultStr = null;
+ public string txnAmtTextBoxValue = null;
+ public string qrValueTextBoxValue = null;
+ public string ecrTxnIdTextBoxValue = null;
+ public string paymentTypeTextBoxValue = null;
+ public string authCodeTextBoxValue = null;
+ public string batchIdTextBoxValue = null;
+ public string settleDateTextBoxValue = null;
+ public string dateRangeTextBoxValue = null;
+ public string billTypeTextBoxValue = null;
+ public string logpathTextBoxValue = null;
+ private n5coredll.N5Core n5Core = null;
+ private bool n5CoreInitSuccess = false;
+
+ private string txnIdForSale = null;
+ private string txnIdForRefund = null;
+ private string txnIdForPreAuth = null;
+ private string txnIdForOffline = null;
+ private string txnIdForAdjust = null;
+
+ private string saleRequestMsg = null;
+ private string preAuthRequestMsg = null;
+ private string offlineRequestMsg = null;
+ private string adjustRequestMsg = null;
+ private string healthCheckRequestMsg = null;
+ private string createOrderRequestMsg = null;
+ private string retrievalRequestMsg = null;
+ private string voidRequestMsg = null;
+ private string settlementRequestMsg = null;
+ private string linkTestRequestMsg = null;
+ private string reprintRequestMsg = null;
+ private string terminaionRequestMsg = null;
+ private string scanRequestMsg = null;
+ private string readCardRequestMsg = null;
+ private string addPointRequestMsg = null;
+ private string batchEnquiryRequestMsg = null;
+ private string settleEnquiryRequestMsg = null;
+ private string summayEnquiryRequestMsg = null;
+ private Boolean isRepeatSubmit = false;
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ private void requestSaleThead()
+ {
+ jsonResultByThead = n5Core.requestSale(txnIdForSale, txnAmtTextBoxValue, paymentTypeTextBoxValue, billTypeTextBoxValue);
+
+ this.requestStrByThead = this.saleRequestMsg;
+ showResult();
+ }
+
+ private void requestCreateOrderThead()
+ {
+ if (paymentTypeTextBoxValue != null && paymentTypeTextBoxValue != "" && billTypeTextBoxValue != null && billTypeTextBoxValue != "")
+ jsonResultByThead = n5Core.requestCreateOrder(txnIdForSale, txnAmtTextBoxValue, paymentTypeTextBoxValue, billTypeTextBoxValue);
+
+
+ this.requestStrByThead = this.createOrderRequestMsg;
+ showResult();
+ }
+
+ private void requestHealthCheckThead()
+ {
+ jsonResultByThead = n5Core.sendHealthCheckRequest();
+
+ this.requestStrByThead = this.healthCheckRequestMsg;
+ showResult();
+ }
+
+ private void requestRetrievalThead()
+ {
+ jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue);
+ this.requestStrByThead = this.retrievalRequestMsg;
+ showResult();
+ }
+ private void requestRepeatRetrievalThead()
+ {
+ while (isRepeatSubmit)
+ {
+ String result = n5Core.requestRetrieval(ecrTxnIdTextBoxValue);
+ addRepeatLog("=============================count" + repeatCount + "=============================");
+ addRepeatLog("ecrTxnId = " + ecrTxnIdTextBoxValue);
+
+ RetrievalResult retrievalResult = RetrievalResult.toRetrievalResultFromJsonMsg(result);
+ if (retrievalResult != null && retrievalResult.Status.Equals("00"))
+ {
+ addRepeatLog("Retrieval Success!");
+ }
+ else
+ addRepeatLog("Retrieval Failed!");
+
+ }
+
+
+ }
+ private void requestSettlementThead()
+ {
+ jsonResultByThead = n5Core.requestSettlement();
+ this.requestStrByThead = this.settlementRequestMsg;
+ showResult();
+ }
+
+ private void requestLinkRequestThead()
+ {
+ jsonResultByThead = n5Core.initN5Core(portName, baudRate, dataBits, stopBits, parity, timeOut, logpathTextBoxValue).ToString();
+
+ this.requestStrByThead = this.linkTestRequestMsg;
+ showResult();
+ }
+
+ private void requestReprintThead()
+ {
+ jsonResultByThead = n5Core.requestPrint(ecrTxnIdTextBoxValue);
+ this.requestStrByThead = this.reprintRequestMsg;
+ showResult();
+ }
+
+ private void requestTerminaionThead()
+ {
+ jsonResultByThead = n5Core.requestAbort();
+ this.requestStrByThead = this.terminaionRequestMsg;
+ showResult();
+ }
+
+ private void requestSummaryEnquiryThead()
+ {
+ jsonResultByThead = n5Core.requestSummaryEnquiry(dateRangeTextBoxValue);
+ this.requestStrByThead = this.summayEnquiryRequestMsg;
+ showResult();
+ }
+
+ private int repeatCount = 1;
+ public void sendRepeatSubmit()
+ {
+ if (n5Core == null || !n5CoreInitSuccess)
+ {
+ n5Core = n5coredll.N5Core.getInstance();
+ int initResult = n5Core.initN5Core(portName, baudRate, dataBits, stopBits, parity, timeOut, "C:\\Users\\rexli\\log");
+ if (initResult == 0)
+ {
+ n5CoreInitSuccess = true;
+ }
+ }
+ /*
+ if (!n5CoreInitSuccess)
+ {
+ this.requestStrByThead = "n5coredll init fail.";
+ this.jsonResultByThead = string.Empty;
+ showResult();
+ return;
+ }*/
+ if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim()))
+ {
+ this.requestStrByThead = "Please input parameter.";
+ this.jsonResultByThead = "Please input parameter.";
+ showResult();
+ this.ecrTxnIdTextBox.Focus();
+ return;
+ }
+ else
+ {
+ ecrTxnIdTextBoxValue = ecrTxnIdTextBox.Text;
+ Thread th = new Thread(requestRepeatRetrievalThead);
+ th.Start();
+ }
+
+ }
+
+ public void stopRepeatSubmit()
+ {
+ repeatCount = 1;
+ }
+
+ public void sendSubmit()
+ {
+ addLogFlag = true;
+ addLog("====>> sendSubmit start, thisEvent = " + this.thisEvent);
+ currEventName = this.thisEvent;
+ if (currEventName == null || "".Equals(currEventName.Trim())) {
+ MessageBox.Show("Please select test function.", "Message");
+ return;
+ }
+ portName = this.portNameComboBox.Text;
+ if (n5Core == null)
+ {
+ n5Core = n5coredll.N5Core.getInstance();
+ if (n5Core == null)
+ {
+ this.requestStrByThead = "n5coredll init fail.";
+ this.jsonResultByThead = string.Empty;
+ showResult();
+ return;
+ }
+
+ }
+ this.requestStrByThead = string.Empty;
+ this.jsonResultByThead = string.Empty;
+ int show = showResult();
+ if (show != 0)
+ {
+ return;
+ }
+
+ if ("Sale".Equals(this.thisEvent))
+ {
+ if (this.txnAmtTextBox.Text == null || "".Equals(this.txnAmtTextBox.Text.Trim()))
+ {
+ this.requestStrByThead = "Please input parameter.";
+ this.jsonResultByThead = "Please input parameter.";
+ showResult();
+ this.txnAmtTextBox.Focus();
+ return;
+ }
+ else
+ {
+ txnAmtTextBoxValue = this.txnAmtTextBox.Text;
+ paymentTypeTextBoxValue = this.paymentTypeTextBox.Text;
+ billTypeTextBoxValue = this.billTypeTextBox.Text;
+ if (ecrTxnIdTextBox.Text.Equals(String.Empty))
+ txnIdForSale = this.getTxnId();
+ else
+ txnIdForSale = this.ecrTxnIdTextBox.Text;
+ this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForSale + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentType = " + paymentTypeTextBoxValue + "\n billType = " + billTypeTextBoxValue;
+ showResult();
+ addLog("txnId = " + txnIdForSale + ", txnAmt = " + txnAmtTextBoxValue + ", paymentType = " + paymentTypeTextBoxValue + ",billType = " + billTypeTextBoxValue);
+ //jsonResultByThead = n5Core.requestSale(this.getTxnId(), txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue);
+ this.saleRequestMsg = this.requestStrByThead;
+
+ Thread th = new Thread(requestSaleThead);
+ th.Start();
+ }
+
+ }
+ else if ("CreateOrder".Equals(this.thisEvent))
+ {
+ if (this.txnAmtTextBox.Text == null || "".Equals(this.txnAmtTextBox.Text.Trim()))
+ {
+ this.requestStrByThead = "Please input parameter.";
+ this.jsonResultByThead = "Please input parameter.";
+ showResult();
+ this.txnAmtTextBox.Focus();
+ return;
+ }
+ else
+ {
+ txnAmtTextBoxValue = this.txnAmtTextBox.Text;
+ paymentTypeTextBoxValue = this.paymentTypeTextBox.Text;
+ billTypeTextBoxValue = this.billTypeTextBox.Text;
+
+ txnIdForSale = this.getTxnId();
+ this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForSale + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentType = " + paymentTypeTextBoxValue + "\n billType = " + billTypeTextBoxValue;
+ showResult();
+ addLog("txnId = " + txnIdForSale + ", txnAmt = " + txnAmtTextBoxValue + ", paymentType = " + paymentTypeTextBoxValue + ",billType = " + billTypeTextBoxValue);
+ //jsonResultByThead = n5Core.requestSale(this.getTxnId(), txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue);
+ this.createOrderRequestMsg = this.requestStrByThead;
+
+ Thread th = new Thread(requestCreateOrderThead);
+ th.Start();
+ }
+
+ }
+ else if ("HealthCheck".Equals(this.thisEvent))
+ {
+ this.requestStrByThead = "Test Function : " + currEventName;
+ showResult();
+ this.retrievalRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestHealthCheckThead);
+ th.Start();
+ }
+ else if ("Retrieval".Equals(this.thisEvent))
+ {
+ if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim()))
+ {
+ this.requestStrByThead = "Please input parameter.";
+ this.jsonResultByThead = "Please input parameter.";
+ showResult();
+ this.ecrTxnIdTextBox.Focus();
+ return;
+ }
+ else
+ {
+ ecrTxnIdTextBoxValue = this.ecrTxnIdTextBox.Text;
+ this.requestStrByThead = "Test Function : " + currEventName + "\n ecrTxnId = " + ecrTxnIdTextBoxValue;
+ showResult();
+ addLog("ecrTxnId = " + ecrTxnIdTextBoxValue);
+
+ //jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 180000);
+ this.retrievalRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestRetrievalThead);
+ th.Start();
+ }
+ }
+ else if ("Settlement".Equals(this.thisEvent))
+ {
+ this.requestStrByThead = "Test Function : " + currEventName;
+ showResult();
+
+ //jsonResultByThead = n5Core.sendSettlementtRequest();
+ this.settlementRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestSettlementThead);
+ th.Start();
+ }
+ else if ("Initilization".Equals(this.thisEvent))
+ {
+ logpathTextBoxValue = logFilePathtTextBox.Text;
+ this.requestStrByThead = "Test Function : " + currEventName;
+ showResult();
+ //jsonResultByThead = n5Core.sendLinkTestRequest();
+ timeOut = timeOutTextBox.Text.ToString();
+ this.linkTestRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestLinkRequestThead);
+ th.Start();
+ }
+ else if ("Reprint".Equals(this.thisEvent))
+ {
+ if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim()))
+ {
+ this.requestStrByThead = "Please input parameter.";
+ this.jsonResultByThead = "Please input parameter.";
+ showResult();
+ this.ecrTxnIdTextBox.Focus();
+ return;
+ }
+ else
+ {
+ ecrTxnIdTextBoxValue = this.ecrTxnIdTextBox.Text;
+
+ addLog("ecrTxnId = " + ecrTxnIdTextBoxValue);
+
+ this.requestStrByThead = "Test Function : " + currEventName;
+ showResult();
+ //jsonResultByThead = n5Core.sendReprintRequest();
+ this.reprintRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestReprintThead);
+ th.Start();
+ }
+
+ }
+ else if ("Abort".Equals(this.thisEvent))
+ {
+ this.requestStrByThead = "Test Function : " + currEventName;
+ showResult();
+ //jsonResultByThead = n5Core.sendAbortRequest();
+ this.terminaionRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestTerminaionThead);
+ th.Start();
+ }
+ else if ("SummaryEnquiry".Equals(this.thisEvent))
+ {
+ if (this.dateRangeTextBox.Text == null || "".Equals(this.dateRangeTextBox.Text.Trim()))
+ {
+ this.requestStrByThead = "Please input parameter.";
+ this.jsonResultByThead = "Please input parameter.";
+ showResult();
+ this.dateRangeTextBox.Focus();
+ return;
+ }
+ else
+ {
+ this.dateRangeTextBoxValue = this.dateRangeTextBox.Text;
+ this.requestStrByThead = "Test Function : " + currEventName;
+ showResult();
+ this.batchEnquiryRequestMsg = this.requestStrByThead;
+ Thread th = new Thread(requestSummaryEnquiryThead);
+ th.Start();
+ }
+ }
+ else
+ {
+ addLog("thisEvent is error");
+ MessageBox.Show("Please select test function.", "Message");
+
+ return;
+ }
+ addLog("jsonResultByThead = " + jsonResultByThead);
+ showResult();
+
+ return;
+ }
+
+ private void RadioButton_Checked(object sender, RoutedEventArgs e)
+ {
+ RadioButton thisButton = (RadioButton)sender;
+ this.thisEvent = thisButton.Content.ToString();
+
+ this.requestTextBox.Text = string.Empty;
+ this.result1TextBox.Text = string.Empty;
+
+ if (this.logFilePathtTextBox.Text == null || "".Equals(this.logFilePathtTextBox.Text.Trim()))
+ {
+ this.logFilePathtTextBox.Text = System.IO.Path.GetTempPath();
+ }
+
+ this.ecrTxnIdTextBox.Text = "";
+ this.txnAmtTextBox.IsEnabled = true;
+ this.batchIdTextBox.Text = "";
+ this.settleDateTextBox.Text = "";
+ this.paymentTypeTextBox.IsEnabled = true;
+ this.billTypeTextBox.IsEnabled = true;
+ this.ecrTxnIdTextBox.IsEnabled = true;
+ this.batchIdTextBox.IsEnabled = true;
+ this.settleDateTextBox.IsEnabled = true;
+ }
+
+ /*
+ private void Submit_Repeat_Button_Click(object sender, RoutedEventArgs e)
+ {
+ this.requestTextBox.Text = string.Empty;
+ this.result1TextBox.Text = string.Empty;
+ if (!isRepeatSubmit)
+ {
+ this.submit_repeat_Button.Content = "Stop Repeat";
+ isRepeatSubmit = true;
+ addRepeatLog("==========Repeat start========== ");
+ this.sendRepeatSubmit();
+ }
+ else
+ {
+ this.submit_repeat_Button.Content = "Start Repeat";
+ isRepeatSubmit = false;
+ this.stopRepeatSubmit();
+ addRepeatLog("==========Repeat end========== ");
+ }
+ }*/
+
+ private void Submit_1_Button_Click(object sender, RoutedEventArgs e)
+ {
+ this.requestTextBox.Text = string.Empty;
+ this.result1TextBox.Text = string.Empty;
+ this.submit_1_Button.IsEnabled = false;
+ addLog("==========Submit start========== ");
+ this.sendSubmit();
+ addLog("==========Submit end========== ");
+ this.submit_1_Button.IsEnabled = true;
+ }
+
+ private void Reset_Button_Click(object sender, RoutedEventArgs e)
+ {
+ this.requestTextBox.Text = string.Empty;
+ this.result1TextBox.Text = string.Empty;
+ }
+
+ public void addLog(string logInfo)
+ {
+ try
+ {
+ if (addLogFlag)
+ {
+ StreamWriter sw = File.AppendText(System.IO.Path.GetTempPath() + "\\myN5TestWin.log");
+ sw.WriteLine(DateTime.Now.ToString() + " [LOGGER] " + logInfo + Environment.NewLine);
+ sw.Flush();
+ sw.Close();
+ // Console.WriteLine(logInfo);
+ }
+ }
+ catch (Exception err)
+ {
+ Console.WriteLine("Exception = " + err);
+ addLogFlag = false;
+ }
+ }
+
+ public void addRepeatLog(string logInfo)
+ {
+ try
+ {
+ StreamWriter sw = File.AppendText(System.IO.Path.GetTempPath() + "\\myN5TestWin_repeat.log");
+ sw.WriteLine(DateTime.Now.ToString() + " [LOGGER] " + logInfo + Environment.NewLine);
+ sw.Flush();
+ sw.Close();
+ // Console.WriteLine(logInfo);
+
+ }
+ catch (Exception err)
+ {
+ Console.WriteLine("Exception = " + err);
+ }
+ }
+
+ public string getTxnId()
+ {
+ StringBuilder txnIdSb = new StringBuilder();
+ DateTime dt = DateTime.Now;
+ txnIdSb.Append(dt.ToString("yyyyMMddHHmmssf"));
+ string txnIdResult = txnIdSb.ToString();
+ addLog("txnIdResult = " + txnIdResult);
+ return txnIdResult;
+ }
+
+ // public delegate void UpdateTextCallback(string message);
+
+ // private void UpdateTextThread()
+ // {
+
+ // this.requestTextBox.Dispatcher.Invoke(
+ // new UpdateTextCallback(this.UpdateRequestText),
+ // new object[] { "" });
+ //
+ // this.result1TextBox.Dispatcher.Invoke(
+ // new UpdateTextCallback(this.UpdateRequestText),
+ // new object[] { "" });
+ //
+ // }
+ // private int UpdateRequestText()
+ // {
+ // this.requestTextBox.Text = this.requestStrByThead;
+ // this.result1TextBox.Text = this.jsonResultByThead;
+ // if (this.logPathTextBox.Text == null || "".Equals(this.logPathTextBox.Text.Trim()))
+ // {
+ // this.logPathTextBox.Text = "Log Path : " + System.IO.Path.GetTempPath() + "\\myN5TestWin.log";
+ // }
+ // return 0;
+ // }
+
+ private int showResult()
+ {
+ //this.requestTextBox.Text = this.requestStrByThead;
+ requestTextBox.Dispatcher.Invoke(
+ DispatcherPriority.Normal, TimeSpan.FromSeconds(1), new Action(showRequestTxtBox));
+ if (jsonResultByThead!=null)
+ showResultStr = this.jsonResultByThead.Replace("{", "").Replace("}", "").Replace(",", "\n");
+ //this.result1TextBox.Text = showResultStr;
+
+ result1TextBox.Dispatcher.Invoke(
+ DispatcherPriority.Normal, TimeSpan.FromSeconds(1), new Action(showResultTxtBox));
+ return 0;
+ }
+
+ private void showRequestTxtBox()
+ {
+ this.requestTextBox.Text = requestStrByThead;
+ }
+
+ private void showResultTxtBox()
+ {
+ this.result1TextBox.Text = showResultStr;
+ }
+
+ private void PortNameComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ this.n5CoreInitSuccess = false;
+ }
+ }
+}
diff --git a/ECR_N5_DLL_TestUI/Properties/AssemblyInfo.cs b/ECR_N5_DLL_TestUI/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..933cd17
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("ECR_N5_DLL_TestUI")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ECR_N5_DLL_TestUI")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请设置
+//.csproj 文件中的 CultureYouAreCodingWith
+//例如,如果您在源文件中使用的是美国英语,
+//使用的是美国英语,请将 设置为 en-US。 然后取消
+//对以下 NeutralResourceLanguage 特性的注释。 更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+ //(未在页面中找到资源时使用,
+ //或应用程序资源字典中找到时使用)
+ ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+ //(未在页面中找到资源时使用,
+ //、应用程序或任何主题专用资源字典中找到时使用)
+)]
+
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ECR_N5_DLL_TestUI/Properties/Resources.Designer.cs b/ECR_N5_DLL_TestUI/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..179a35e
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace ECR_N5_DLL_TestUI.Properties
+{
+
+
+ ///
+ /// 强类型资源类,用于查找本地化字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 返回此类使用的缓存 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ECR_N5_DLL_TestUI.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 覆盖当前线程的 CurrentUICulture 属性
+ /// 使用此强类型的资源类的资源查找。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/ECR_N5_DLL_TestUI/Properties/Resources.resx b/ECR_N5_DLL_TestUI/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ECR_N5_DLL_TestUI/Properties/Settings.Designer.cs b/ECR_N5_DLL_TestUI/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..f7a1322
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ECR_N5_DLL_TestUI.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/ECR_N5_DLL_TestUI/Properties/Settings.settings b/ECR_N5_DLL_TestUI/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/ECR_N5_DLL_TestUI/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/N5_DLL_HKGOV.sln b/N5_DLL_HKGOV.sln
index 9e913bd..50a3a14 100644
--- a/N5_DLL_HKGOV.sln
+++ b/N5_DLL_HKGOV.sln
@@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.28307.539
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "n5coredll", "n5coredll\n5coredll.csproj", "{1F0C1D84-FD97-41F1-BC8B-F2F22C1997A1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ECR_N5_DLL_TestUI", "..\ECR_N5_DLL_TestUI\ECR_N5_DLL_TestUI.csproj", "{DEF387D0-3F98-4720-874D-8A753399B206}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -17,10 +15,6 @@ Global
{1F0C1D84-FD97-41F1-BC8B-F2F22C1997A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F0C1D84-FD97-41F1-BC8B-F2F22C1997A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F0C1D84-FD97-41F1-BC8B-F2F22C1997A1}.Release|Any CPU.Build.0 = Release|Any CPU
- {DEF387D0-3F98-4720-874D-8A753399B206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DEF387D0-3F98-4720-874D-8A753399B206}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DEF387D0-3F98-4720-874D-8A753399B206}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DEF387D0-3F98-4720-874D-8A753399B206}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE