|
|
@@ -11,7 +11,7 @@ namespace UAS_CheckWork
|
|
|
{
|
|
|
public partial class Form1 : Form
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
DataHelper dh;
|
|
|
//Create Standalone SDK class dynamicly.
|
|
|
public zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
|
|
|
@@ -26,8 +26,19 @@ namespace UAS_CheckWork
|
|
|
StartPosition = FormStartPosition.CenterScreen;
|
|
|
}
|
|
|
|
|
|
+ private void Form1_Load(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ CheckForIllegalCrossThreadCalls = false;//可跨线程
|
|
|
+ txtIP.Text = Properties.Settings.Default.IP;
|
|
|
+ txtPort.Text = Properties.Settings.Default.Port;
|
|
|
+ dh = new DataHelper();
|
|
|
+ }
|
|
|
+
|
|
|
private void btnConnect_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
+ Properties.Settings.Default.IP = txtIP.Text;
|
|
|
+ Properties.Settings.Default.Port = txtPort.Text;
|
|
|
+ Properties.Settings.Default.Save();
|
|
|
if (txtIP.Text.Trim() == "" || txtPort.Text.Trim() == "")
|
|
|
{
|
|
|
MessageBox.Show("请先输入IP和端口", "Error");
|
|
|
@@ -69,6 +80,7 @@ namespace UAS_CheckWork
|
|
|
MessageBox.Show("请先连接设备", "Error");
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
InitGetInfo = new Thread(InPrint);
|
|
|
SetLoadingWindow stw = new SetLoadingWindow(InitGetInfo, "正在同步数据...");
|
|
|
stw.StartPosition = FormStartPosition.CenterParent;
|
|
|
@@ -128,11 +140,7 @@ namespace UAS_CheckWork
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void Form1_Load(object sender, EventArgs e)
|
|
|
- {
|
|
|
- CheckForIllegalCrossThreadCalls = false;//可跨线程
|
|
|
- dh = new DataHelper();
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
private void saveData_Click(object sender, EventArgs e)
|
|
|
{
|