Commit f6ca5940 authored by liu's avatar liu

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

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