Commit 0ef0d12f authored by wangwanxh@sina.com's avatar wangwanxh@sina.com

Merge branch 'wang_master' of https://gitee.com/wangwanxh/Vocs into wang_master

parents d75ff882 5a326b16
This diff is collapsed.
......@@ -341,7 +341,6 @@ namespace GcDevicePc.ConfigDlg
string tmp = globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName;
ret = mainclient.WtClientCopytoServer("SingleAnal.ini", globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName, globaldata.remoteFolder + "仪器方法\\");
tmp = globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName.Substring(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName.LastIndexOf("\\") + 1);
Thread.Sleep(1000);
ret = mainclient.WtClientCopytoServer(tmp, globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName, globaldata.remoteFolder + "仪器方法\\");
mainclient.WtClientClose();
......@@ -355,8 +354,8 @@ namespace GcDevicePc.ConfigDlg
sendupdatecmd(true);
}
string message = "提交成功!";
MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
//string message = "提交成功!";
//MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
......@@ -383,7 +382,7 @@ namespace GcDevicePc.ConfigDlg
MessageBox.Show(message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
// this.Close();
this.Close();
}
private void MethodBase_Activated(object sender, EventArgs e)
......
......@@ -692,22 +692,20 @@ namespace GcDevicePc
switch (runtype)
{
case 0:
DataControl_Status(dest[5], 0);
break;
case 2:
BAT_HeadInfo(dest[0], dest[1]);
BAT_HeadInfo(dest[0], dest[1]);
DataControl_Status(dest[5], 2);
break;
case 3:
QuickRun_HeadInfo();
DataControl_Status(dest[5], 1);
break;
case 4:
SingleRun_HeadInfo();
DataControl_Status(dest[5], 1);
break;
default:
Common_HeadInfo();
......
......@@ -172,7 +172,7 @@ namespace GcDevicePc.ProThread
//m_DeviceInfo.Netmask = String.Format("{0}.{1}.{2}.{3}", pBuf[20], pBuf[21], pBuf[22], pBuf[23]);
//m_DeviceInfo.Gateway = String.Format("{0}.{1}.{2}.{3}", pBuf[24], pBuf[25], pBuf[26], pBuf[27]);
m_DeviceInfo.MacAddr = String.Format("{0}:{1}:{2}:{3}:{4}:{5}", pBuf[106], pBuf[107], pBuf[108], pBuf[109], pBuf[110], pBuf[111]);
m_DeviceInfo.MacAddr = String.Format("{0:X2}:{1:X2}:{2:X2}:{3:X2}:{4:X2}:{5:X2}", pBuf[106], pBuf[107], pBuf[108], pBuf[109], pBuf[110], pBuf[111]);
m_DeviceInfo.IpAddr = String.Format("{0}.{1}.{2}.{3}", pBuf[112], pBuf[113], pBuf[114], pBuf[115]);
m_DeviceInfo.Netmask = String.Format("{0}.{1}.{2}.{3}", pBuf[116], pBuf[117], pBuf[118], pBuf[119]);
m_DeviceInfo.Gateway = String.Format("{0}.{1}.{2}.{3}", pBuf[120], pBuf[121], pBuf[122], pBuf[123]);
......
......@@ -443,19 +443,23 @@ namespace GcDevicePc
{
if ( !String.IsNullOrEmpty(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.config_RunTab) && !String.IsNullOrEmpty(globaldata.connection_ip))
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType = 2;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
this.tabrun.Enabled = false;
FileServerClient bfclient = new FileServerClient();
bfclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
bfclient.WtClientCopytoServer("RunMethod.ini", globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.config_RunTab, globaldata.remoteFolder + "运行表\\");
bfclient.WtClientClose();
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab =
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.config_RunTab;
if (File.Exists(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.config_RunTab))
{
FileServerClient bfclient = new FileServerClient();
bfclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
bfclient.WtClientCopytoServer("RunMethod.ini", globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.config_RunTab, globaldata.remoteFolder + "运行表\\");
bfclient.WtClientClose();
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab =
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.config_RunTab;
}
sendupdatecmd(false);
this.tabrun.Enabled = true;
}
......
......@@ -152,7 +152,17 @@ namespace GcDevicePc
string opensys = test.INIGetStringValue("StartUp", "打开系统", null);
string runtype = test.INIGetStringValue("StartUp", "运行类型", null);
this.label3.Text = MAC;
if (String.IsNullOrEmpty(MAC))
{
this.label1.Text = "目前Mac(未绑定):";
this.label3.Text = ((globaldata.DeviceInfo) globaldata.DeviceList[0]).MacAddr;
}
else
{
this.label3.Text = MAC;
}
if (Convert.ToInt32(value) == 1)
{
......
......@@ -59,7 +59,7 @@ namespace GcDevicePc
this.label4.Text = ipos.ToString() + "/100";
this.progressBar1.Value = Convert.ToInt32(ipos);
if(ipos == 100)
if(ipos == 100 || send_ok)
{
this.label4.Text = "传输完成";
this.runbtn.Enabled = true;
......@@ -180,7 +180,7 @@ namespace GcDevicePc
this.localpath = file; // Path.GetDirectoryName(file);
//this.localstr.Text = this.localpath;
//this.ProName.Text = this.updateexe;
this.ProName.Text = this.localpath + this.updateexe;
this.ProName.Text = this.localpath;
this.updatebtn.Enabled = true;
}
......@@ -209,17 +209,17 @@ namespace GcDevicePc
send_Thread.IsBackground = true;
send_Thread.Start();
for (int i = 0; i < 200; i++)
for (int i = 0; i < 100; i++)
{
if(send_ok)
{
SetTextMesssage(100, i.ToString() + "\r\n");
}else
{
System.Threading.Thread.Sleep(100);
SetTextMesssage(100 * i / 200, i.ToString() + "\r\n");
Thread.Sleep(200);
SetTextMesssage(i, i.ToString() + "\r\n");
if(i == 199)
if(i == 95)
{
i--;
}
......@@ -233,12 +233,11 @@ namespace GcDevicePc
int ret;
FileServerClient singlesend = new FileServerClient();
singlesend.WtClientInit(HmiIP, HmiPort);
ret = singlesend.WtClientCopytoServer(this.updateexe, this.localpath, globaldata.exeremoteFolder);
ret = singlesend.WtClientCopytoServerNoDelay(this.updateexe, this.localpath, globaldata.exeremoteFolder);
if (ret == 1)
{
this.send_ok = true;
//MessageBox.Show("更新成功");
}
singlesend.WtClientClose();
......@@ -379,11 +378,11 @@ namespace GcDevicePc
fullfilename = NextFile.FullName;
singlesend.WtClientCopytoServer(NextFile.Name, fullfilename, globaldata.updateremoteFolder);
singlesend.WtClientCopytoServerNoDelay(NextFile.Name, fullfilename, globaldata.updateremoteFolder);
Console.WriteLine(NextFile.Name);
Console.WriteLine(fullfilename);
Console.WriteLine( globaldata.updateremoteFolder);
//Console.WriteLine(NextFile.Name);
//Console.WriteLine(fullfilename);
//Console.WriteLine( globaldata.updateremoteFolder);
Thread.Sleep(100);
}
......
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