Commit daaefa58 authored by wangjunqiang's avatar wangjunqiang

add FileClient Close

parent d97d5f31
...@@ -312,9 +312,7 @@ namespace GcDevicePc ...@@ -312,9 +312,7 @@ namespace GcDevicePc
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2) if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
{ {
hmiopt.WriteBatVal(); hmiopt.WriteBatVal();
hmiopt.WriteStartVal(); hmiopt.WriteStartVal();
WaitHMIWork(); WaitHMIWork();
} }
...@@ -330,6 +328,7 @@ namespace GcDevicePc ...@@ -330,6 +328,7 @@ namespace GcDevicePc
{ {
hmiopt.WriteSTDBatVal(); hmiopt.WriteSTDBatVal();
hmiopt.WriteStartVal(); hmiopt.WriteStartVal();
} }
} }
...@@ -1186,8 +1185,13 @@ namespace GcDevicePc ...@@ -1186,8 +1185,13 @@ namespace GcDevicePc
FileServerClient rtclient = new FileServerClient(); FileServerClient rtclient = new FileServerClient();
rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport); rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
rtclient.WtClientCopytoServer("RunMethod.ini", Path.Combine(folder, runtablename), globaldata.remoteFolder + "运行表\\"); if (File.Exists(Path.Combine(folder, runtablename)))
SendPCCMD(false); {
rtclient.WtClientCopytoServer("RunMethod.ini", Path.Combine(folder, runtablename), globaldata.remoteFolder + "运行表\\");
SendPCCMD(false);
}
rtclient.WtClientClose();
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename); globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename);
//ret = true; //ret = true;
} }
...@@ -1209,9 +1213,14 @@ namespace GcDevicePc ...@@ -1209,9 +1213,14 @@ namespace GcDevicePc
FileServerClient rtclient = new FileServerClient(); FileServerClient rtclient = new FileServerClient();
rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport); rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
rtclient.WtClientCopytoServer("RunMethodStd.ini", Path.Combine(folder, runtablename), globaldata.remoteFolder + "运行表\\"); if (File.Exists(Path.Combine(folder, runtablename)))
hmiopt.SetBatCount(count); {
SendSTDCMD(); rtclient.WtClientCopytoServer("RunMethodStd.ini", Path.Combine(folder, runtablename), globaldata.remoteFolder + "运行表\\");
hmiopt.SetBatCount(count);
SendSTDCMD();
}
rtclient.WtClientClose();
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename); globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename);
//ret = true; //ret = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment