Commit f6ca5940 authored by liu's avatar liu

针对实时刷新配置进行的修改

parent 8aecd92c
......@@ -372,31 +372,47 @@ namespace GcDevicePc.DeviceConfigUI
SCclient.WtClientInit(ip, globaldata.fileserverport);
SCclient.WtClientCopytoServer("DevStatus.ini", sendfilename, globaldata.remoteFolder + "仪器状态\\");
//MessageBox.Show("更新配置完成!");
//this.Close();
upho(1);
//int ret = 0;
//ret = SCclient.WtHMICloseRro("WtMainProc");
//if (ret == 1)
//{
// ret = SCclient.WtHMIRunPro("GcDevice.exe", globaldata.exeremoteFolder);
// if (ret == 1)
// {
// savebtn.Enabled = true;
// DialogResult result = MessageBox.Show("HMI自重启成功,是否重启PC软件以同步?", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
// if (result == DialogResult.OK)
// {
// Application.ExitThread();
// Application.Exit();
// Application.Restart();
// Process.GetCurrentProcess().Kill();
// }
// else if (result == DialogResult.Cancel)
// {
// this.Close();
// }
// }
//}
try
{
string tmpname = "";
globaldata.m_appinit.InitAppFolder(globaldata.DeviceName);
globaldata.m_appinit.SyncConfigFiles();
globaldata.m_appinit.InitAppDefaultConfig();
globaldata.m_profileMethod.SetStatusFullName(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_StatusName);
globaldata.m_profileMethod.GetDevState();
tmpname = globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2 ?
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_BATMethodName :
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName;
if (!String.IsNullOrEmpty(tmpname))
{
globaldata.show_MethodName = tmpname;
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, tmpname.ToString());
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_BATMethodName = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, tmpname.ToString());
globaldata.m_profileMethod.SetMethodFullName(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName);
globaldata.m_profileMethod.GetDevInjPortAllPara();
globaldata.m_profileMethod.GetSampleAllPara("前进样器");
globaldata.m_profileMethod.GetInjValveAllPara();
globaldata.m_profileMethod.GetChromAllPara();
globaldata.m_profileMethod.GetColTableElseAllPara();
globaldata.m_profileMethod.GetFidAllPara();
globaldata.m_profileMethod.GetTcdAllPara();
globaldata.m_profileMethod.GetAuxiliaryAllPara();
}
else
{
}
}
catch
{
}
this.Close();
}
else
......
......@@ -140,42 +140,42 @@
// SystemStartMenu
//
this.SystemStartMenu.Name = "SystemStartMenu";
this.SystemStartMenu.Size = new System.Drawing.Size(180, 26);
this.SystemStartMenu.Size = new System.Drawing.Size(144, 26);
this.SystemStartMenu.Text = "系统开启";
this.SystemStartMenu.Click += new System.EventHandler(this.SystemStartMenu_Click);
//
// SystemStopMenu
//
this.SystemStopMenu.Name = "SystemStopMenu";
this.SystemStopMenu.Size = new System.Drawing.Size(180, 26);
this.SystemStopMenu.Size = new System.Drawing.Size(144, 26);
this.SystemStopMenu.Text = "系统关闭";
this.SystemStopMenu.Click += new System.EventHandler(this.SystemStopMenu_Click);
//
// AuxToolMenu
//
this.AuxToolMenu.Name = "AuxToolMenu";
this.AuxToolMenu.Size = new System.Drawing.Size(180, 26);
this.AuxToolMenu.Size = new System.Drawing.Size(144, 26);
this.AuxToolMenu.Text = "辅助工具";
this.AuxToolMenu.Click += new System.EventHandler(this.AuxToolMenu_Click);
//
// ParameterSettingMenu
//
this.ParameterSettingMenu.Name = "ParameterSettingMenu";
this.ParameterSettingMenu.Size = new System.Drawing.Size(180, 26);
this.ParameterSettingMenu.Size = new System.Drawing.Size(144, 26);
this.ParameterSettingMenu.Text = "参数设置";
this.ParameterSettingMenu.Click += new System.EventHandler(this.ParameterSettingMenu_Click);
//
// AutoAdjustMenu
//
this.AutoAdjustMenu.Name = "AutoAdjustMenu";
this.AutoAdjustMenu.Size = new System.Drawing.Size(180, 26);
this.AutoAdjustMenu.Size = new System.Drawing.Size(144, 26);
this.AutoAdjustMenu.Text = "系统校准";
this.AutoAdjustMenu.Click += new System.EventHandler(this.自动校准ToolStripMenuItem_Click);
//
// sysconfigp
//
this.sysconfigp.Name = "sysconfigp";
this.sysconfigp.Size = new System.Drawing.Size(180, 26);
this.sysconfigp.Size = new System.Drawing.Size(144, 26);
this.sysconfigp.Text = "选项";
this.sysconfigp.Click += new System.EventHandler(this.系统配置ToolStripMenuItem_Click);
//
......
......@@ -2532,33 +2532,20 @@ namespace GcDevicePc
DeviceConfigUI.ConfigDevice f_showconfig;
private void ConfigCreateSubMenuItem_Click(object sender, EventArgs e)
{
ushort[] version = new ushort[12];
try
{
//if (!String.IsNullOrEmpty(globaldata.connection_ip))
//{
// ret = mymodbus.GetFireWareVersion(ref version);
//}
if (f_showconfig == null)
{
//f_showconfig = new InstrConfig(version);
//f_showconfig.Show();
f_showconfig = new DeviceConfigUI.ConfigDevice();
f_showconfig.upho += new DeviceConfigUI.UpdataHMIOP(UpdateHmicfg);
//f_showconfig.fatherForm = this;
f_showconfig.Show();
}
else
{
if (f_showconfig.IsDisposed)
{
//f_showconfig = new InstrConfig(version);
//f_showconfig.Show();
f_showconfig = new DeviceConfigUI.ConfigDevice();
f_showconfig.upho += new DeviceConfigUI.UpdataHMIOP(UpdateHmicfg);
//f_showconfig.fatherForm = this;
f_showconfig.Show();
}
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