Commit 5b76b77c authored by wangjunqiang's avatar wangjunqiang

修改部分代码

parent 7797ef44
......@@ -27,7 +27,7 @@ namespace GcDevicePc
this.Controls.Add(adjust);
}
public void Show()
public new void Show()
{
base.Show();
if (adjust != null)
......
......@@ -27,7 +27,7 @@ namespace GcDevicePc
| System.Windows.Forms.AnchorStyles.Right)));
this.Controls.Add(adjust);
}
public void Show()
public new void Show()
{
base.Show();
if (adjust != null)
......
......@@ -28,7 +28,7 @@ namespace GcDevicePc
}
public void Show()
public new void Show()
{
base.Show();
if (total != null)
......
......@@ -8,6 +8,7 @@ using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using GcDevicePc.CK_UI;
using GcDevicePc.Common;
namespace GcDevicePc
......@@ -46,7 +47,7 @@ namespace GcDevicePc
}
catch (Exception e)
{
Log.Error(e.Message);
}
}
}
......
......@@ -14,7 +14,7 @@ namespace GcDevicePc
{
public partial class MDIBase : Form
{
private int childFormNumber = 0;
//private int childFormNumber = 0;
private static FormUser _userForm; //用户界面
private static Formdebug _debugForm; //调试界面
......@@ -1178,20 +1178,18 @@ namespace GcDevicePc
/// <param name="runtablename">批处理文件名(带.ini)</param>
private void RunTableOpt(String folder, String runtablename)
{
bool ret = false;
//bool ret = false;
RunTableHelper runtable = new RunTableHelper(folder, runtablename);
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
string lfilename;
string rfilename;
FileServerClient rtclient = new FileServerClient();
rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
rtclient.WtClientCopytoServer("RunMethod.ini", Path.Combine(folder, runtablename), globaldata.remoteFolder + "运行表\\");
SendPCCMD(false);
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename);
ret = true;
//ret = true;
}
}
......@@ -1203,13 +1201,11 @@ namespace GcDevicePc
/// <param name="count">批处理运行次数</param>
private void RunTableOptWithCount(String folder, String runtablename, ushort count)
{
bool ret = false;
//bool ret = false;
RunTableHelper runtable = new RunTableHelper(folder, runtablename);
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
string lfilename;
string rfilename;
FileServerClient rtclient = new FileServerClient();
rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
......@@ -1217,7 +1213,7 @@ namespace GcDevicePc
hmiopt.SetBatCount(count);
SendSTDCMD();
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename);
ret = true;
//ret = true;
}
}
......
......@@ -164,7 +164,7 @@ namespace GcDevicePc
}
catch (Exception e)
{
Log.Error(e.Message);
}
}
......
......@@ -81,8 +81,12 @@ namespace GcDevicePc.Module
public int UpdateData2(float[] data)
{
UInt16[] buf = new UInt16[4] { 0, 0, 0, 0 };
int ret = 1;
if (workflag)
{
GetMaVal(data, ref buf);
int ret = rtumodbus.WriteMultipleRegs(1, 1, 4, ref buf);
ret = rtumodbus.WriteMultipleRegs(1, 1, 4, ref buf);
}
return ret;
}
......
using System;
using System.Threading;
using System.Windows.Forms;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using GcDevicePc.Common;
using GcDevicePc.ProThread;
namespace GcDevicePc
{
......
......@@ -17,7 +17,7 @@ namespace GcDevicePc
private String _appInitInfo = "系统初始化开始";
private int _initSec;
private int _initStep;
//private int _initStep;
private static Thread _tPreload;
private MainForm _mMainForm;
......
......@@ -179,13 +179,12 @@ namespace GcDevicePc
if(globaldata.DeviceList.Count > 0)
{
this.hmiip.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[globaldata.DeviceList.Count - 1]).IpAddr;
this.hmigw.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[globaldata.DeviceList.Count - 1]).Gateway;
this.hminm.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[globaldata.DeviceList.Count - 1]).Netmask;
this.hmiip.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).IpAddr;
this.hmigw.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).Gateway;
this.hminm.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).Netmask;
}
///获取本地的IP地址
///
try
{
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
......
......@@ -32,7 +32,7 @@ namespace GcDevicePc
void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.Close();//执行完之后,直接关闭页面
this.Close();
}
void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
......
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