This commit is contained in:
@@ -152,8 +152,8 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
|
|
||||||
private void MainForm_Load(object sender, EventArgs e)
|
private void MainForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string plcIp = "192.168.1.10";
|
//string plcIp = "192.168.1.10";
|
||||||
//string plcIp = "127.0.0.1";
|
string plcIp = "127.0.0.1";
|
||||||
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
||||||
if (!initSuccess)
|
if (!initSuccess)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
private void ManualDebugForm_Load(object sender, EventArgs e)
|
private void ManualDebugForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string plcIp = "192.168.1.10";
|
string plcIp = "192.168.1.10";
|
||||||
|
//string plcIp = "127.0.0.1";
|
||||||
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
||||||
if (!initSuccess)
|
if (!initSuccess)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -342,12 +342,10 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
if (uiButton3.IsDisposed || !uiButton3.IsHandleCreated)
|
if (uiButton3.IsDisposed || !uiButton3.IsHandleCreated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiButton3.InvokeRequired)
|
if (value3)
|
||||||
{
|
{
|
||||||
uiButton3.Invoke(new Action(() =>
|
uiButton3.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
// 再次检查,防止回调执行时控件已被销毁
|
|
||||||
if (!uiButton3.IsDisposed && uiButton3.IsHandleCreated && value3)
|
|
||||||
uiButton3.Text = "灭火中";
|
uiButton3.Text = "灭火中";
|
||||||
uiButton3.ForeColor = Color.Red;
|
uiButton3.ForeColor = Color.Red;
|
||||||
}));
|
}));
|
||||||
@@ -376,12 +374,10 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
if (uiButton11.IsDisposed || !uiButton11.IsHandleCreated)
|
if (uiButton11.IsDisposed || !uiButton11.IsHandleCreated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiButton11.InvokeRequired)
|
if (value4)
|
||||||
{
|
{
|
||||||
uiButton11.Invoke(new Action(() =>
|
uiButton11.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
// 再次检查,防止回调执行时控件已被销毁
|
|
||||||
if (!uiButton11.IsDisposed && uiButton11.IsHandleCreated && value4)
|
|
||||||
uiButton11.Text = "开灯中";
|
uiButton11.Text = "开灯中";
|
||||||
uiButton11.ForeColor = Color.Red;
|
uiButton11.ForeColor = Color.Red;
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -558,6 +558,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
private void SecondaryIgnitionForm_Load(object sender, EventArgs e)
|
private void SecondaryIgnitionForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string plcIp = "192.168.1.10";
|
string plcIp = "192.168.1.10";
|
||||||
|
//string plcIp = "127.0.0.1";
|
||||||
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
||||||
if (!initSuccess)
|
if (!initSuccess)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user