diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
index 3e2e4af..a612357 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj
@@ -153,6 +153,9 @@
False
..\..\..\PlugInPlatform\Mesnac.PlugIn.dll
+
+ ..\Microsoft.Office.Interop.Excel.dll
+
diff --git a/Main/MCEdit/Data/MCProject/nodeDataSource.xml b/Main/MCEdit/Data/MCProject/nodeDataSource.xml
index 9638ce4..1c458b1 100644
--- a/Main/MCEdit/Data/MCProject/nodeDataSource.xml
+++ b/Main/MCEdit/Data/MCProject/nodeDataSource.xml
@@ -1,3 +1,3 @@
-
+
\ No newline at end of file
diff --git a/Main/MCEdit/Program.cs b/Main/MCEdit/Program.cs
index ef1d3a2..9cd065e 100644
--- a/Main/MCEdit/Program.cs
+++ b/Main/MCEdit/Program.cs
@@ -100,7 +100,10 @@ namespace MCEdit
//Mesnac.Basic.UserInfo.Instance.UserName = "mesnac";
//退出系统之前,关闭相关文档
- WorkbenchSingleton.Workbench.ShutDown += delegate(object sender, EventArgs e) { Mesnac.Gui.Edit.ViewContent.DisplayUtil.ClearProject(); };
+ WorkbenchSingleton.Workbench.ShutDown += delegate(object sender, EventArgs e)
+ {
+ Mesnac.Gui.Edit.ViewContent.DisplayUtil.ClearProject();
+ };
Form frmMain = WorkbenchSingleton.Workbench as Form;
Application.Run(frmMain);
diff --git a/Main/MCRun/Program.cs b/Main/MCRun/Program.cs
index b432696..67eb000 100644
--- a/Main/MCRun/Program.cs
+++ b/Main/MCRun/Program.cs
@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.IO;
+using System.Linq;
using System.Windows.Forms;
+using System.Xml;
using ICSharpCode.Core;
using ICSharpCode.Core.Services;
using Mesnac.Gui.Run.Global;
@@ -103,8 +105,20 @@ namespace MCRun
{
AppConfigHandler.Instance.InitCustomerMenuAndToolStrip(WorkbenchSingleton.Workbench.TopMenu, WorkbenchSingleton.Workbench.ToolStrip); //初始化自定义系统菜单和工具栏
- //初始化HslCommunication 11.0.6.0
- PlcBusiness.Instance.InitPlcConnect(PlcType.SiemensPlc, "127.0.0.1", 12);
+ try
+ {
+ var instance = Mesnac.Equips.Factory.Instance.ConfigFile;
+ XmlDocument doc = new XmlDocument();
+ doc.Load(instance);
+ var nodes = doc.ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes[4].ChildNodes[0];
+ var ip = nodes.Attributes["value"].Value;
+ //初始化HslCommunication 11.0.6.0
+ PlcBusiness.Instance.InitPlcConnect(PlcType.SiemensPlc,ip, 102);
+ }
+ catch (Exception exception)
+ {
+ ICSharpCode.Core.LoggingService.Debug("HSLPlc读取失败");
+ }
//初始化连接报警器
DoControl.Instance.ComOn();
}