diff --git a/MTC_Sim/.vs/MTC_Sim/v14/.suo b/MTC_Sim/.vs/MTC_Sim/v14/.suo
index 583bd10..04ab8fe 100644
Binary files a/MTC_Sim/.vs/MTC_Sim/v14/.suo and b/MTC_Sim/.vs/MTC_Sim/v14/.suo differ
diff --git a/MTC_Sim/MTC_Sim/AdapterConf.cs b/MTC_Sim/MTC_Sim/AdapterConf.cs
index 949a629..b3483cd 100644
--- a/MTC_Sim/MTC_Sim/AdapterConf.cs
+++ b/MTC_Sim/MTC_Sim/AdapterConf.cs
@@ -67,6 +67,21 @@ namespace MTC_Sim
reader.Close();
return c;
}
+ ///
+ /// restitusice forma XML grezza del file
+ ///
+ ///
+ ///
+ public static string rawXml(string file)
+ {
+ string answ = "";
+ System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(AdapterConf));
+ StreamReader reader = File.OpenText(file);
+ answ = reader.ReadToEnd();
+ reader.Close();
+ return answ;
+ }
+
public int Version
{
get { return nVers; }
diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs b/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs
index 413401e..8ac5184 100644
--- a/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs
+++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs
@@ -156,6 +156,7 @@
this.enableDataSim = new System.Windows.Forms.CheckBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.estop = new System.Windows.Forms.CheckBox();
+ this.wbXmlConf = new System.Windows.Forms.WebBrowser();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PosAct)).BeginInit();
@@ -170,6 +171,7 @@
this.tabCtrlMain.SuspendLayout();
this.tpStatus.SuspendLayout();
this.groupBox1.SuspendLayout();
+ this.tbConf.SuspendLayout();
this.tpSIM.SuspendLayout();
this.Execution.SuspendLayout();
this.mode.SuspendLayout();
@@ -712,7 +714,7 @@
this.groupBox11.Controls.Add(this.label18);
this.groupBox11.Controls.Add(this.STATUS_PLC_ADP);
this.groupBox11.Controls.Add(this.lblPLC_ADP);
- this.groupBox11.Location = new System.Drawing.Point(12, 739);
+ this.groupBox11.Location = new System.Drawing.Point(3, 108);
this.groupBox11.Name = "groupBox11";
this.groupBox11.Size = new System.Drawing.Size(773, 75);
this.groupBox11.TabIndex = 57;
@@ -1049,6 +1051,7 @@
// tpStatus
//
this.tpStatus.Controls.Add(this.groupBox1);
+ this.tpStatus.Controls.Add(this.groupBox11);
this.tpStatus.Location = new System.Drawing.Point(4, 22);
this.tpStatus.Name = "tpStatus";
this.tpStatus.Padding = new System.Windows.Forms.Padding(3);
@@ -1121,6 +1124,7 @@
//
// tbConf
//
+ this.tbConf.Controls.Add(this.wbXmlConf);
this.tbConf.Location = new System.Drawing.Point(4, 22);
this.tbConf.Name = "tbConf";
this.tbConf.Padding = new System.Windows.Forms.Padding(3);
@@ -1394,6 +1398,15 @@
this.estop.Text = "Emergency Stop";
this.estop.UseVisualStyleBackColor = true;
//
+ // wbXmlConf
+ //
+ this.wbXmlConf.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.wbXmlConf.Location = new System.Drawing.Point(3, 3);
+ this.wbXmlConf.MinimumSize = new System.Drawing.Size(20, 20);
+ this.wbXmlConf.Name = "wbXmlConf";
+ this.wbXmlConf.Size = new System.Drawing.Size(765, 183);
+ this.wbXmlConf.TabIndex = 0;
+ //
// CMS_MachineSim
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1405,7 +1418,6 @@
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.groupBox12);
- this.Controls.Add(this.groupBox11);
this.Controls.Add(this.groupBox9);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.label6);
@@ -1441,6 +1453,7 @@
this.tpStatus.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
+ this.tbConf.ResumeLayout(false);
this.tpSIM.ResumeLayout(false);
this.Execution.ResumeLayout(false);
this.Execution.PerformLayout();
@@ -1586,6 +1599,7 @@
private System.Windows.Forms.CheckBox enableDataSim;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.CheckBox estop;
+ private System.Windows.Forms.WebBrowser wbXmlConf;
}
}
diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.cs b/MTC_Sim/MTC_Sim/CMS_MachineSim.cs
index ec7aca4..dee6318 100644
--- a/MTC_Sim/MTC_Sim/CMS_MachineSim.cs
+++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.cs
@@ -719,16 +719,8 @@ namespace MTC_Sim
// indico quale sia il tipo di adapter
tipoScelto = adpConf.TipoAdapt;
loadAdapter();
- //switch (adpConf.TipoAdapt)
- //{
- // case tipoAdapter.Fanuc:
- // break;
- // case tipoAdapter.HMI:
- // break;
- // case tipoAdapter.Demo:
- // default:
- // break;
- //}
+ // carico file XML in web browser...
+ wbXmlConf.DocumentText = AdapterConf.rawXml(openFileDial.FileName);
// avvio macchina con adapter specificato...