Commit 99db7d43 authored by wangjunqiang's avatar wangjunqiang

添加初始化文件检测

parent 6daccc87
......@@ -107,6 +107,18 @@ namespace GcDevicePc
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
String checkfile = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder,
"DevStatus.ini");
if (File.Exists(checkfile))
{
IniParser = new IniFile(checkfile);
if (!IniParser.KeyExists("仪器编号", "仪器编码") && !IniParser.KeyExists("仪器编号", "仪器名称"))
{
File.Delete(Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder,
"DevStatus.ini"));
}
}
FileTools filecheck = new FileTools();
FileServerClient mainclient = new FileServerClient();
mainclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
......@@ -165,7 +177,7 @@ namespace GcDevicePc
if (File.Exists(tmpfile) == false)
{
HWConfig default_devstatus = new HWConfig(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder, "DevStatus.ini");
default_devstatus.SavaHWConfig();
//default_devstatus.SavaHWConfig();
}
else
{
......
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