Spostato strobes in tab

completata lettura conf XML
This commit is contained in:
Samuele E. Locatelli
2016-04-26 12:32:26 +02:00
parent e575b63c37
commit ffdf02a124
4 changed files with 33 additions and 12 deletions
Binary file not shown.
+15
View File
@@ -67,6 +67,21 @@ namespace MTC_Sim
reader.Close();
return c;
}
/// <summary>
/// restitusice forma XML grezza del file
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
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; }
+16 -2
View File
@@ -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;
}
}
+2 -10
View File
@@ -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...