From 03358f02009d6cdb6a831f1e02dca9e4deee87f6 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 22 Apr 2016 07:46:30 +0200 Subject: [PATCH] Bozza costruttore files config dell'Adapter --- MTC_Sim/.vs/MTC_Sim/v14/.suo | Bin 104448 -> 126976 bytes .../MTC_AdapterTest/MTC_AdapterTest.csproj | 1 + MTC_Sim/MTC_Sim/AdapterConf.cs | 105 ++++ MTC_Sim/MTC_Sim/AdapterConf/Demo.xml | 6 + MTC_Sim/MTC_Sim/AdapterGeneric.cs | 20 +- MTC_Sim/MTC_Sim/App.config | 5 + MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs | 455 ++++++++++-------- MTC_Sim/MTC_Sim/CMS_MachineSim.cs | 6 + MTC_Sim/MTC_Sim/CMS_MachineSim.resx | 21 + MTC_Sim/MTC_Sim/MTC_Sim.csproj | 16 + MTC_Sim/MTC_Sim/SetupAdapter.Designer.cs | 166 +++++++ MTC_Sim/MTC_Sim/SetupAdapter.cs | 101 ++++ MTC_Sim/MTC_Sim/SetupAdapter.resx | 120 +++++ 13 files changed, 812 insertions(+), 210 deletions(-) create mode 100644 MTC_Sim/MTC_Sim/AdapterConf.cs create mode 100644 MTC_Sim/MTC_Sim/AdapterConf/Demo.xml create mode 100644 MTC_Sim/MTC_Sim/SetupAdapter.Designer.cs create mode 100644 MTC_Sim/MTC_Sim/SetupAdapter.cs create mode 100644 MTC_Sim/MTC_Sim/SetupAdapter.resx diff --git a/MTC_Sim/.vs/MTC_Sim/v14/.suo b/MTC_Sim/.vs/MTC_Sim/v14/.suo index eb75bb9b211afa530030f7309a96f5f53b874a80..dc8ead1a9cfaf06bfc13a643fa8e06d8ff492ca6 100644 GIT binary patch delta 10343 zcmeI233OCN7KY#Lbay&QCuHf64up`6kOjjcOMnm>(nOX(h=CB15fTU)Foc*zAu^;{ zoTChAx{IL@L}U@Sk*#ss;~9srh+D*{=QyYgq6{Kst#_rZa$ zR=-7EA-9-CwQ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false AnyCPU diff --git a/MTC_Sim/MTC_Sim/AdapterConf.cs b/MTC_Sim/MTC_Sim/AdapterConf.cs new file mode 100644 index 0000000..2f64f94 --- /dev/null +++ b/MTC_Sim/MTC_Sim/AdapterConf.cs @@ -0,0 +1,105 @@ +using System; +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace MTC_Sim +{ + + #region -- AdapterConf Class -- + /// + /// This Configuration class is basically just a set of + /// properties with a couple of static methods to manage + /// the serialization to and deserialization from a + /// simple XML file. + /// + [Serializable] + public class AdapterConf + { + string sNomeAdapt; + int nVers; + + element[] _VacuumPump; + element[] _VacuumAct; + + int nLubro; + int nCooler; + int nPress; + int nTemper; + int nAxis; + int nPath; + int nUnOp; + + public AdapterConf() + { + sNomeAdapt = ""; + + nLubro = 0; + nCooler = 0; + nPress = 0; + nTemper = 0; + nAxis = 0; + nPath = 0; + nUnOp = 0; + + } + public static void Serialize(string file, AdapterConf c) + { + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(c.GetType()); + StreamWriter writer = File.CreateText(file); + xs.Serialize(writer, c); + writer.Flush(); + writer.Close(); + } + public static AdapterConf Deserialize(string file) + { + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(AdapterConf)); + StreamReader reader = File.OpenText(file); + AdapterConf c = (AdapterConf)xs.Deserialize(reader); + reader.Close(); + return c; + } + public int Version + { + get { return nVers; } + set { nVers = value; } + } + public string NomeAdapt + { + get { return sNomeAdapt; } + set { sNomeAdapt = value; } + } + public element[] VacuumPump + { + get { return _VacuumPump; } + set { _VacuumPump = value; } + } + public element[] VacuumAct + { + get { return _VacuumAct; } + set { _VacuumAct = value; } + } + + + + } + + public class element + { + public string idx; + public string alias; + + public element() + { + idx = ""; + alias = ""; + } + public element(int Idx, string Alias) + { + idx = Idx.ToString(); + alias = Alias; + } + } + + #endregion +} diff --git a/MTC_Sim/MTC_Sim/AdapterConf/Demo.xml b/MTC_Sim/MTC_Sim/AdapterConf/Demo.xml new file mode 100644 index 0000000..455d5f8 --- /dev/null +++ b/MTC_Sim/MTC_Sim/AdapterConf/Demo.xml @@ -0,0 +1,6 @@ + + + 1 + CMS_ADAPTER_ABC + 2456 + \ No newline at end of file diff --git a/MTC_Sim/MTC_Sim/AdapterGeneric.cs b/MTC_Sim/MTC_Sim/AdapterGeneric.cs index 5077514..38a69d8 100644 --- a/MTC_Sim/MTC_Sim/AdapterGeneric.cs +++ b/MTC_Sim/MTC_Sim/AdapterGeneric.cs @@ -54,7 +54,7 @@ namespace MTC_Sim mVacPumpId = new Event(string.Format("VacPump_{0}_Id", idx)); mVacPumpAlias = new Event(string.Format("VacPump_{0}_Alias", idx)); - mVacPumpStatus = new Event(string.Format("VacPump_{0}_Count", idx)); + mVacPumpStatus = new Event(string.Format("VacPump_{0}_Status", idx)); } } @@ -189,7 +189,7 @@ namespace MTC_Sim /// /// Singola Pressione rilevata, 0..n /// - public class Pressione + public class Press { /// /// Id univoco @@ -217,7 +217,7 @@ namespace MTC_Sim /// /// Identificativo misura, salvato in event Press_{0}_Id dove {0}=ident /// Alias misura, salvato in event Press_{0}_alias dove {0}=ident - public Pressione(string ident, string alias) + public Press(string ident, string alias) { idx = ident; descr = alias; @@ -230,7 +230,7 @@ namespace MTC_Sim /// /// Singola temperatura rilevata, 0..n /// - public class Temperatura + public class Temper { /// /// Id univoco @@ -258,7 +258,7 @@ namespace MTC_Sim /// /// Identificativo misura, salvato in event Temp_{0}_Id dove {0}=ident /// Alias misura, salvato in event Temp_{0}_alias dove {0}=ident - public Temperatura(string ident, string alias) + public Temper(string ident, string alias) { idx = ident; descr = alias; @@ -271,7 +271,7 @@ namespace MTC_Sim /// /// Asse singolo, 1..n /// - public class Asse + public class Axis { /// /// Id univoco @@ -351,7 +351,7 @@ namespace MTC_Sim /// /// Identificativo misura, codice sarà Ax_{0} dove {0}= ident /// Alias misura, salvato in event Ax_{0}_alias dove {0}=ident - public Asse(string ident, string alias) + public Axis(string ident, string alias) { idx = ident; descr = alias; @@ -466,7 +466,7 @@ namespace MTC_Sim /// /// Singolo mandrino, 1..n /// - public class Mandrino + public class UnOp { /// /// Id univoco @@ -514,11 +514,11 @@ namespace MTC_Sim /// public Sample mUnOpAccTime; /// - /// Classe Mandrino con Idx e descrizione + /// Classe Unita Operatrice (Mandrino) con Idx e descrizione /// /// Identificativo misura, salvato in event UnOp_{0}_Id dove {0}=ident /// Alias misura, salvato in event UnOp_{0}_alias dove {0}=ident - public Mandrino(string ident, string alias) + public UnOp(string ident, string alias) { idx = ident; descr = alias; diff --git a/MTC_Sim/MTC_Sim/App.config b/MTC_Sim/MTC_Sim/App.config index 5938053..8d8ab7a 100644 --- a/MTC_Sim/MTC_Sim/App.config +++ b/MTC_Sim/MTC_Sim/App.config @@ -13,6 +13,9 @@ + + + @@ -23,5 +26,7 @@ + + \ No newline at end of file diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs b/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs index 8c8bc89..76592b1 100644 --- a/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs +++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs @@ -51,6 +51,12 @@ this.functionalMode = new System.Windows.Forms.ComboBox(); this.label12 = new System.Windows.Forms.Label(); this.PosAct = new System.Windows.Forms.DataGridView(); + this.X = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Y = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Z = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.J = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.K = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ERR_06 = new System.Windows.Forms.CheckBox(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.ERR_04 = new System.Windows.Forms.CheckBox(); @@ -86,6 +92,10 @@ this.program = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.lblAT = new System.Windows.Forms.Label(); + this.txtAccTime = new System.Windows.Forms.TextBox(); + this.label30 = new System.Windows.Forms.Label(); + this.txtPower = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); this.D1_UUID = new System.Windows.Forms.TextBox(); this.label15 = new System.Windows.Forms.Label(); @@ -95,6 +105,12 @@ this.estop = new System.Windows.Forms.CheckBox(); this.groupBox8 = new System.Windows.Forms.GroupBox(); this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.txtPzKo = new System.Windows.Forms.TextBox(); + this.label25 = new System.Windows.Forms.Label(); + this.txtPzOk = new System.Windows.Forms.TextBox(); + this.label23 = new System.Windows.Forms.Label(); + this.txtPzTot = new System.Windows.Forms.TextBox(); + this.label21 = new System.Windows.Forms.Label(); this.OPERATOR_ID = new System.Windows.Forms.TextBox(); this.label19 = new System.Windows.Forms.Label(); this.PROG_ROW_NUM = new System.Windows.Forms.TextBox(); @@ -120,32 +136,21 @@ this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.MainProgrBar = new System.Windows.Forms.ToolStripProgressBar(); this.groupBox13 = new System.Windows.Forms.GroupBox(); - this.txtPzTot = new System.Windows.Forms.TextBox(); - this.label21 = new System.Windows.Forms.Label(); - this.txtPzOk = new System.Windows.Forms.TextBox(); - this.label23 = new System.Windows.Forms.Label(); - this.txtPzKo = new System.Windows.Forms.TextBox(); - this.label25 = new System.Windows.Forms.Label(); - this.label26 = new System.Windows.Forms.Label(); - this.hsPathFeed = new System.Windows.Forms.HScrollBar(); - this.txtPathFeed = new System.Windows.Forms.TextBox(); - this.txtPathFeedOver = new System.Windows.Forms.TextBox(); - this.label27 = new System.Windows.Forms.Label(); - this.hsPathFeedOver = new System.Windows.Forms.HScrollBar(); + this.label29 = new System.Windows.Forms.Label(); this.txtPathSpeedOver = new System.Windows.Forms.TextBox(); this.label28 = new System.Windows.Forms.Label(); this.hsPathSpeedOver = new System.Windows.Forms.HScrollBar(); - this.X = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Y = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Z = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.I = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.J = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.K = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.label29 = new System.Windows.Forms.Label(); - this.label30 = new System.Windows.Forms.Label(); - this.txtPower = new System.Windows.Forms.TextBox(); - this.lblAT = new System.Windows.Forms.Label(); - this.txtAccTime = new System.Windows.Forms.TextBox(); + this.txtPathFeedOver = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.hsPathFeedOver = new System.Windows.Forms.HScrollBar(); + this.txtPathFeed = new System.Windows.Forms.TextBox(); + this.label26 = new System.Windows.Forms.Label(); + this.hsPathFeed = new System.Windows.Forms.HScrollBar(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fILEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.lOADADAPTERCONFToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sETUPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox4.SuspendLayout(); this.groupBox5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PosAct)).BeginInit(); @@ -162,6 +167,7 @@ this.groupBox12.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.groupBox13.SuspendLayout(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // ERR_05 @@ -184,7 +190,7 @@ this.groupBox4.Controls.Add(this.label7); this.groupBox4.Controls.Add(this.messageText); this.groupBox4.Controls.Add(this.messageCode); - this.groupBox4.Location = new System.Drawing.Point(405, 253); + this.groupBox4.Location = new System.Drawing.Point(405, 277); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(379, 52); this.groupBox4.TabIndex = 44; @@ -251,7 +257,7 @@ this.groupBox5.Controls.Add(this.label10); this.groupBox5.Controls.Add(this.label11); this.groupBox5.Controls.Add(this.cLoad); - this.groupBox5.Location = new System.Drawing.Point(405, 536); + this.groupBox5.Location = new System.Drawing.Point(405, 560); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(375, 70); this.groupBox5.TabIndex = 45; @@ -367,6 +373,48 @@ this.PosAct.Size = new System.Drawing.Size(287, 41); this.PosAct.TabIndex = 32; // + // X + // + this.X.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.X.HeaderText = "X"; + this.X.Name = "X"; + this.X.Width = 39; + // + // Y + // + this.Y.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.Y.HeaderText = "Y"; + this.Y.Name = "Y"; + this.Y.Width = 39; + // + // Z + // + this.Z.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.Z.HeaderText = "Z"; + this.Z.Name = "Z"; + this.Z.Width = 39; + // + // I + // + this.I.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.I.HeaderText = "I"; + this.I.Name = "I"; + this.I.Width = 35; + // + // J + // + this.J.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.J.HeaderText = "J"; + this.J.Name = "J"; + this.J.Width = 37; + // + // K + // + this.K.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.K.HeaderText = "K"; + this.K.Name = "K"; + this.K.Width = 39; + // // ERR_06 // this.ERR_06.AutoSize = true; @@ -379,7 +427,7 @@ // // groupBox6 // - this.groupBox6.Location = new System.Drawing.Point(404, 456); + this.groupBox6.Location = new System.Drawing.Point(404, 480); this.groupBox6.Name = "groupBox6"; this.groupBox6.Size = new System.Drawing.Size(380, 74); this.groupBox6.TabIndex = 50; @@ -403,7 +451,7 @@ this.groupBox1.Controls.Add(this.start); this.groupBox1.Controls.Add(this.port); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Location = new System.Drawing.Point(12, 36); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(379, 43); this.groupBox1.TabIndex = 34; @@ -464,7 +512,7 @@ this.mode.Controls.Add(this.mdi); this.mode.Controls.Add(this.manual); this.mode.Controls.Add(this.automatic); - this.mode.Location = new System.Drawing.Point(12, 93); + this.mode.Location = new System.Drawing.Point(12, 117); this.mode.Name = "mode"; this.mode.Size = new System.Drawing.Size(379, 48); this.mode.TabIndex = 36; @@ -519,7 +567,7 @@ this.Execution.Controls.Add(this.feedhold); this.Execution.Controls.Add(this.stopped); this.Execution.Controls.Add(this.running); - this.Execution.Location = new System.Drawing.Point(405, 93); + this.Execution.Location = new System.Drawing.Point(405, 117); this.Execution.Name = "Execution"; this.Execution.Size = new System.Drawing.Size(380, 48); this.Execution.TabIndex = 37; @@ -578,7 +626,7 @@ this.groupBox3.Controls.Add(this.ERR_02); this.groupBox3.Controls.Add(this.ERR_01); this.groupBox3.Controls.Add(this.cuttingToolButton); - this.groupBox3.Location = new System.Drawing.Point(12, 492); + this.groupBox3.Location = new System.Drawing.Point(12, 516); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(375, 114); this.groupBox3.TabIndex = 41; @@ -635,7 +683,7 @@ this.groupBox2.Controls.Add(this.label4); this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.xLoad); - this.groupBox2.Location = new System.Drawing.Point(404, 367); + this.groupBox2.Location = new System.Drawing.Point(404, 391); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(375, 70); this.groupBox2.TabIndex = 40; @@ -726,13 +774,45 @@ this.groupBox7.Controls.Add(this.D1_ID); this.groupBox7.Controls.Add(this.label14); this.groupBox7.Controls.Add(this.D1_NAME); - this.groupBox7.Location = new System.Drawing.Point(405, 12); + this.groupBox7.Location = new System.Drawing.Point(405, 36); this.groupBox7.Name = "groupBox7"; this.groupBox7.Size = new System.Drawing.Size(380, 75); this.groupBox7.TabIndex = 53; this.groupBox7.TabStop = false; this.groupBox7.Text = "Macchina"; // + // lblAT + // + this.lblAT.AutoSize = true; + this.lblAT.Location = new System.Drawing.Point(189, 20); + this.lblAT.Name = "lblAT"; + this.lblAT.Size = new System.Drawing.Size(43, 13); + this.lblAT.TabIndex = 63; + this.lblAT.Text = "AccMin"; + // + // txtAccTime + // + this.txtAccTime.Location = new System.Drawing.Point(234, 17); + this.txtAccTime.Name = "txtAccTime"; + this.txtAccTime.Size = new System.Drawing.Size(53, 20); + this.txtAccTime.TabIndex = 62; + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Location = new System.Drawing.Point(288, 20); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(36, 13); + this.label30.TabIndex = 61; + this.label30.Text = "power"; + // + // txtPower + // + this.txtPower.Location = new System.Drawing.Point(325, 17); + this.txtPower.Name = "txtPower"; + this.txtPower.Size = new System.Drawing.Size(49, 20); + this.txtPower.TabIndex = 60; + // // label16 // this.label16.AutoSize = true; @@ -795,7 +875,7 @@ // groupBox8 // this.groupBox8.Controls.Add(this.estop); - this.groupBox8.Location = new System.Drawing.Point(12, 56); + this.groupBox8.Location = new System.Drawing.Point(12, 80); this.groupBox8.Name = "groupBox8"; this.groupBox8.Size = new System.Drawing.Size(196, 31); this.groupBox8.TabIndex = 54; @@ -820,13 +900,64 @@ this.groupBox9.Controls.Add(this.label13); this.groupBox9.Controls.Add(this.functionalMode); this.groupBox9.Controls.Add(this.label12); - this.groupBox9.Location = new System.Drawing.Point(12, 147); + this.groupBox9.Location = new System.Drawing.Point(12, 171); this.groupBox9.Name = "groupBox9"; this.groupBox9.Size = new System.Drawing.Size(379, 158); this.groupBox9.TabIndex = 55; this.groupBox9.TabStop = false; this.groupBox9.Text = "Produzione"; // + // txtPzKo + // + this.txtPzKo.Location = new System.Drawing.Point(313, 98); + this.txtPzKo.Name = "txtPzKo"; + this.txtPzKo.Size = new System.Drawing.Size(60, 20); + this.txtPzKo.TabIndex = 59; + this.txtPzKo.TextChanged += new System.EventHandler(this.pzKo_TextChanged); + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(269, 101); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(37, 13); + this.label25.TabIndex = 58; + this.label25.Text = "Pz KO"; + // + // txtPzOk + // + this.txtPzOk.Enabled = false; + this.txtPzOk.Location = new System.Drawing.Point(201, 98); + this.txtPzOk.Name = "txtPzOk"; + this.txtPzOk.Size = new System.Drawing.Size(60, 20); + this.txtPzOk.TabIndex = 57; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(157, 101); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(37, 13); + this.label23.TabIndex = 56; + this.label23.Text = "Pz OK"; + // + // txtPzTot + // + this.txtPzTot.Enabled = false; + this.txtPzTot.Location = new System.Drawing.Point(80, 98); + this.txtPzTot.Name = "txtPzTot"; + this.txtPzTot.Size = new System.Drawing.Size(60, 20); + this.txtPzTot.TabIndex = 55; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(33, 101); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(38, 13); + this.label21.TabIndex = 54; + this.label21.Text = "Pz Tot"; + // // OPERATOR_ID // this.OPERATOR_ID.Location = new System.Drawing.Point(273, 45); @@ -862,7 +993,7 @@ // groupBox10 // this.groupBox10.Controls.Add(this.enableDataSim); - this.groupBox10.Location = new System.Drawing.Point(214, 56); + this.groupBox10.Location = new System.Drawing.Point(214, 80); this.groupBox10.Name = "groupBox10"; this.groupBox10.Size = new System.Drawing.Size(177, 31); this.groupBox10.TabIndex = 56; @@ -886,7 +1017,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, 612); + this.groupBox11.Location = new System.Drawing.Point(12, 636); this.groupBox11.Name = "groupBox11"; this.groupBox11.Size = new System.Drawing.Size(773, 75); this.groupBox11.TabIndex = 57; @@ -938,7 +1069,7 @@ this.groupBox12.Controls.Add(this.lblCodaM); this.groupBox12.Controls.Add(this.addCodM); this.groupBox12.Controls.Add(this.label20); - this.groupBox12.Location = new System.Drawing.Point(405, 147); + this.groupBox12.Location = new System.Drawing.Point(405, 171); this.groupBox12.Name = "groupBox12"; this.groupBox12.Size = new System.Drawing.Size(380, 100); this.groupBox12.TabIndex = 58; @@ -1061,115 +1192,21 @@ this.groupBox13.Controls.Add(this.txtPathFeed); this.groupBox13.Controls.Add(this.label26); this.groupBox13.Controls.Add(this.hsPathFeed); - this.groupBox13.Location = new System.Drawing.Point(12, 311); + this.groupBox13.Location = new System.Drawing.Point(12, 335); this.groupBox13.Name = "groupBox13"; this.groupBox13.Size = new System.Drawing.Size(379, 148); this.groupBox13.TabIndex = 60; this.groupBox13.TabStop = false; this.groupBox13.Text = "PATH"; // - // txtPzTot + // label29 // - this.txtPzTot.Enabled = false; - this.txtPzTot.Location = new System.Drawing.Point(80, 98); - this.txtPzTot.Name = "txtPzTot"; - this.txtPzTot.Size = new System.Drawing.Size(60, 20); - this.txtPzTot.TabIndex = 55; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(33, 101); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(38, 13); - this.label21.TabIndex = 54; - this.label21.Text = "Pz Tot"; - // - // txtPzOk - // - this.txtPzOk.Enabled = false; - this.txtPzOk.Location = new System.Drawing.Point(201, 98); - this.txtPzOk.Name = "txtPzOk"; - this.txtPzOk.Size = new System.Drawing.Size(60, 20); - this.txtPzOk.TabIndex = 57; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(157, 101); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(37, 13); - this.label23.TabIndex = 56; - this.label23.Text = "Pz OK"; - // - // txtPzKo - // - this.txtPzKo.Location = new System.Drawing.Point(313, 98); - this.txtPzKo.Name = "txtPzKo"; - this.txtPzKo.Size = new System.Drawing.Size(60, 20); - this.txtPzKo.TabIndex = 59; - this.txtPzKo.TextChanged += new System.EventHandler(this.pzKo_TextChanged); - // - // label25 - // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(269, 101); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(37, 13); - this.label25.TabIndex = 58; - this.label25.Text = "Pz KO"; - // - // label26 - // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(10, 20); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(49, 13); - this.label26.TabIndex = 24; - this.label26.Text = "Feedrate"; - // - // hsPathFeed - // - this.hsPathFeed.Location = new System.Drawing.Point(80, 20); - this.hsPathFeed.Maximum = 150; - this.hsPathFeed.Name = "hsPathFeed"; - this.hsPathFeed.Size = new System.Drawing.Size(213, 18); - this.hsPathFeed.TabIndex = 23; - this.hsPathFeed.ValueChanged += new System.EventHandler(this.hsPathFeed_ValueChanged); - // - // txtPathFeed - // - this.txtPathFeed.Location = new System.Drawing.Point(298, 17); - this.txtPathFeed.Name = "txtPathFeed"; - this.txtPathFeed.Size = new System.Drawing.Size(74, 20); - this.txtPathFeed.TabIndex = 26; - this.txtPathFeed.TextChanged += new System.EventHandler(this.txtPathFeed_TextChanged); - // - // txtPathFeedOver - // - this.txtPathFeedOver.Location = new System.Drawing.Point(298, 43); - this.txtPathFeedOver.Name = "txtPathFeedOver"; - this.txtPathFeedOver.Size = new System.Drawing.Size(74, 20); - this.txtPathFeedOver.TabIndex = 29; - this.txtPathFeedOver.TextChanged += new System.EventHandler(this.txtPathFeedOver_TextChanged); - // - // label27 - // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(10, 46); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(60, 13); - this.label27.TabIndex = 28; - this.label27.Text = "Feed Over."; - // - // hsPathFeedOver - // - this.hsPathFeedOver.Location = new System.Drawing.Point(80, 46); - this.hsPathFeedOver.Maximum = 150; - this.hsPathFeedOver.Name = "hsPathFeedOver"; - this.hsPathFeedOver.Size = new System.Drawing.Size(213, 18); - this.hsPathFeedOver.TabIndex = 27; - this.hsPathFeedOver.ValueChanged += new System.EventHandler(this.hsPathFeedOver_ValueChanged); + this.label29.AutoSize = true; + this.label29.Location = new System.Drawing.Point(12, 113); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(51, 13); + this.label29.TabIndex = 33; + this.label29.Text = "Posiz Act"; // // txtPathSpeedOver // @@ -1197,88 +1234,97 @@ this.hsPathSpeedOver.TabIndex = 30; this.hsPathSpeedOver.ValueChanged += new System.EventHandler(this.hsPathSpeedOver_ValueChanged); // - // X + // txtPathFeedOver // - this.X.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.X.HeaderText = "X"; - this.X.Name = "X"; - this.X.Width = 39; + this.txtPathFeedOver.Location = new System.Drawing.Point(298, 43); + this.txtPathFeedOver.Name = "txtPathFeedOver"; + this.txtPathFeedOver.Size = new System.Drawing.Size(74, 20); + this.txtPathFeedOver.TabIndex = 29; + this.txtPathFeedOver.TextChanged += new System.EventHandler(this.txtPathFeedOver_TextChanged); // - // Y + // label27 // - this.Y.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.Y.HeaderText = "Y"; - this.Y.Name = "Y"; - this.Y.Width = 39; + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(10, 46); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(60, 13); + this.label27.TabIndex = 28; + this.label27.Text = "Feed Over."; // - // Z + // hsPathFeedOver // - this.Z.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.Z.HeaderText = "Z"; - this.Z.Name = "Z"; - this.Z.Width = 39; + this.hsPathFeedOver.Location = new System.Drawing.Point(80, 46); + this.hsPathFeedOver.Maximum = 150; + this.hsPathFeedOver.Name = "hsPathFeedOver"; + this.hsPathFeedOver.Size = new System.Drawing.Size(213, 18); + this.hsPathFeedOver.TabIndex = 27; + this.hsPathFeedOver.ValueChanged += new System.EventHandler(this.hsPathFeedOver_ValueChanged); // - // I + // txtPathFeed // - this.I.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.I.HeaderText = "I"; - this.I.Name = "I"; - this.I.Width = 35; + this.txtPathFeed.Location = new System.Drawing.Point(298, 17); + this.txtPathFeed.Name = "txtPathFeed"; + this.txtPathFeed.Size = new System.Drawing.Size(74, 20); + this.txtPathFeed.TabIndex = 26; + this.txtPathFeed.TextChanged += new System.EventHandler(this.txtPathFeed_TextChanged); // - // J + // label26 // - this.J.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.J.HeaderText = "J"; - this.J.Name = "J"; - this.J.Width = 37; + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(10, 20); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(49, 13); + this.label26.TabIndex = 24; + this.label26.Text = "Feedrate"; // - // K + // hsPathFeed // - this.K.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.K.HeaderText = "K"; - this.K.Name = "K"; - this.K.Width = 39; + this.hsPathFeed.Location = new System.Drawing.Point(80, 20); + this.hsPathFeed.Maximum = 150; + this.hsPathFeed.Name = "hsPathFeed"; + this.hsPathFeed.Size = new System.Drawing.Size(213, 18); + this.hsPathFeed.TabIndex = 23; + this.hsPathFeed.ValueChanged += new System.EventHandler(this.hsPathFeed_ValueChanged); // - // label29 + // menuStrip1 // - this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(12, 113); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(51, 13); - this.label29.TabIndex = 33; - this.label29.Text = "Posiz Act"; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fILEToolStripMenuItem, + this.sETUPToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(794, 24); + this.menuStrip1.TabIndex = 61; + this.menuStrip1.Text = "menuStrip1"; // - // label30 + // fILEToolStripMenuItem // - this.label30.AutoSize = true; - this.label30.Location = new System.Drawing.Point(288, 20); - this.label30.Name = "label30"; - this.label30.Size = new System.Drawing.Size(36, 13); - this.label30.TabIndex = 61; - this.label30.Text = "power"; + this.fILEToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.lOADADAPTERCONFToolStripMenuItem}); + this.fILEToolStripMenuItem.Name = "fILEToolStripMenuItem"; + this.fILEToolStripMenuItem.Size = new System.Drawing.Size(40, 20); + this.fILEToolStripMenuItem.Text = "FILE"; // - // txtPower + // lOADADAPTERCONFToolStripMenuItem // - this.txtPower.Location = new System.Drawing.Point(325, 17); - this.txtPower.Name = "txtPower"; - this.txtPower.Size = new System.Drawing.Size(49, 20); - this.txtPower.TabIndex = 60; + this.lOADADAPTERCONFToolStripMenuItem.Name = "lOADADAPTERCONFToolStripMenuItem"; + this.lOADADAPTERCONFToolStripMenuItem.Size = new System.Drawing.Size(194, 22); + this.lOADADAPTERCONFToolStripMenuItem.Text = "LOAD ADAPTER CONF"; // - // lblAT + // sETUPToolStripMenuItem // - this.lblAT.AutoSize = true; - this.lblAT.Location = new System.Drawing.Point(189, 20); - this.lblAT.Name = "lblAT"; - this.lblAT.Size = new System.Drawing.Size(43, 13); - this.lblAT.TabIndex = 63; - this.lblAT.Text = "AccMin"; + this.sETUPToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem}); + this.sETUPToolStripMenuItem.Name = "sETUPToolStripMenuItem"; + this.sETUPToolStripMenuItem.Size = new System.Drawing.Size(53, 20); + this.sETUPToolStripMenuItem.Text = "SETUP"; // - // txtAccTime + // mANAGEADAPTERCONFIGURATIONToolStripMenuItem // - this.txtAccTime.Location = new System.Drawing.Point(234, 17); - this.txtAccTime.Name = "txtAccTime"; - this.txtAccTime.Size = new System.Drawing.Size(53, 20); - this.txtAccTime.TabIndex = 62; + this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem.Name = "mANAGEADAPTERCONFIGURATIONToolStripMenuItem"; + this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem.Size = new System.Drawing.Size(274, 22); + this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem.Text = "MANAGE ADAPTER CONFIGURATION"; + this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem.Click += new System.EventHandler(this.mANAGEADAPTERCONFIGURATIONToolStripMenuItem_Click); // // CMS_MachineSim // @@ -1287,6 +1333,7 @@ this.ClientSize = new System.Drawing.Size(794, 733); this.Controls.Add(this.groupBox13); this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.menuStrip1); this.Controls.Add(this.groupBox12); this.Controls.Add(this.groupBox11); this.Controls.Add(this.groupBox10); @@ -1302,6 +1349,7 @@ this.Controls.Add(this.Execution); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); + this.MainMenuStrip = this.menuStrip1; this.Name = "CMS_MachineSim"; this.Text = "CMS MTConn Adapter SIM"; this.groupBox4.ResumeLayout(false); @@ -1335,6 +1383,8 @@ this.statusStrip1.PerformLayout(); this.groupBox13.ResumeLayout(false); this.groupBox13.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -1459,6 +1509,11 @@ private System.Windows.Forms.TextBox txtAccTime; private System.Windows.Forms.Label label30; private System.Windows.Forms.TextBox txtPower; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fILEToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem lOADADAPTERCONFToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem sETUPToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mANAGEADAPTERCONFIGURATIONToolStripMenuItem; } } diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.cs b/MTC_Sim/MTC_Sim/CMS_MachineSim.cs index 1b9b7b4..f766f7c 100644 --- a/MTC_Sim/MTC_Sim/CMS_MachineSim.cs +++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.cs @@ -637,5 +637,11 @@ namespace MTC_Sim txtPathSpeedOver.Text = hsPathSpeedOver.Value.ToString(); raiseFlag_FEED_SPEED(); } + + private void mANAGEADAPTERCONFIGURATIONToolStripMenuItem_Click(object sender, EventArgs e) + { + SetupAdapter setupWIndow = new SetupAdapter(); + setupWIndow.Show(this); + } } } diff --git a/MTC_Sim/MTC_Sim/CMS_MachineSim.resx b/MTC_Sim/MTC_Sim/CMS_MachineSim.resx index c9e8fbb..707fc60 100644 --- a/MTC_Sim/MTC_Sim/CMS_MachineSim.resx +++ b/MTC_Sim/MTC_Sim/CMS_MachineSim.resx @@ -138,7 +138,28 @@ True + + True + + + True + + + True + + + True + + + True + + + True + 104, 17 + + 220, 17 + \ No newline at end of file diff --git a/MTC_Sim/MTC_Sim/MTC_Sim.csproj b/MTC_Sim/MTC_Sim/MTC_Sim.csproj index aeb77f3..9ae7e1a 100644 --- a/MTC_Sim/MTC_Sim/MTC_Sim.csproj +++ b/MTC_Sim/MTC_Sim/MTC_Sim.csproj @@ -48,6 +48,7 @@ + @@ -60,6 +61,12 @@ + + Form + + + SetupAdapter.cs + CMS_MachineSim.cs @@ -73,6 +80,9 @@ True Resources.resx + + SetupAdapter.cs + SettingsSingleFileGenerator Settings.Designer.cs @@ -93,6 +103,12 @@ + + Always + + + PreserveNewest + Always diff --git a/MTC_Sim/MTC_Sim/SetupAdapter.Designer.cs b/MTC_Sim/MTC_Sim/SetupAdapter.Designer.cs new file mode 100644 index 0000000..630ad57 --- /dev/null +++ b/MTC_Sim/MTC_Sim/SetupAdapter.Designer.cs @@ -0,0 +1,166 @@ +namespace MTC_Sim +{ + partial class SetupAdapter + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtAdapter = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.txtFileName = new System.Windows.Forms.TextBox(); + this.btnSave = new System.Windows.Forms.Button(); + this.btnLoad = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.nVacPump = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.nVacAct = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // txtAdapter + // + this.txtAdapter.Location = new System.Drawing.Point(91, 10); + this.txtAdapter.Name = "txtAdapter"; + this.txtAdapter.Size = new System.Drawing.Size(252, 20); + this.txtAdapter.TabIndex = 0; + this.txtAdapter.Text = "CMS_ADAPTER_00"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(22, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(58, 13); + this.label1.TabIndex = 1; + this.label1.Text = "ADAPTER"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(359, 13); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(63, 13); + this.label2.TabIndex = 3; + this.label2.Text = "FILE NAME"; + // + // txtFileName + // + this.txtFileName.Location = new System.Drawing.Point(428, 10); + this.txtFileName.Name = "txtFileName"; + this.txtFileName.Size = new System.Drawing.Size(252, 20); + this.txtFileName.TabIndex = 2; + this.txtFileName.Text = "Demo.xml"; + // + // btnSave + // + this.btnSave.Location = new System.Drawing.Point(479, 467); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(201, 38); + this.btnSave.TabIndex = 4; + this.btnSave.Text = "SAVE CONFIGURATION"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnCreateFile_Click); + // + // btnLoad + // + this.btnLoad.Location = new System.Drawing.Point(16, 467); + this.btnLoad.Name = "btnLoad"; + this.btnLoad.Size = new System.Drawing.Size(201, 38); + this.btnLoad.TabIndex = 5; + this.btnLoad.Text = "LOAD CONFIGURATION"; + this.btnLoad.UseVisualStyleBackColor = true; + this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(10, 39); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(75, 13); + this.label3.TabIndex = 7; + this.label3.Text = "n° VAC PUMP"; + // + // nVacPump + // + this.nVacPump.Location = new System.Drawing.Point(91, 36); + this.nVacPump.Name = "nVacPump"; + this.nVacPump.Size = new System.Drawing.Size(57, 20); + this.nVacPump.TabIndex = 6; + this.nVacPump.Text = "0"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(167, 39); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(60, 13); + this.label4.TabIndex = 9; + this.label4.Text = "n° VAC Act"; + // + // nVacAct + // + this.nVacAct.Location = new System.Drawing.Point(248, 36); + this.nVacAct.Name = "nVacAct"; + this.nVacAct.Size = new System.Drawing.Size(57, 20); + this.nVacAct.TabIndex = 8; + this.nVacAct.Text = "0"; + // + // SetupAdapter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(692, 517); + this.Controls.Add(this.label4); + this.Controls.Add(this.nVacAct); + this.Controls.Add(this.label3); + this.Controls.Add(this.nVacPump); + this.Controls.Add(this.btnLoad); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.label2); + this.Controls.Add(this.txtFileName); + this.Controls.Add(this.label1); + this.Controls.Add(this.txtAdapter); + this.Name = "SetupAdapter"; + this.Text = "SetupAdapter"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtAdapter; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtFileName; + private System.Windows.Forms.Button btnSave; + private System.Windows.Forms.Button btnLoad; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox nVacPump; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox nVacAct; + } +} \ No newline at end of file diff --git a/MTC_Sim/MTC_Sim/SetupAdapter.cs b/MTC_Sim/MTC_Sim/SetupAdapter.cs new file mode 100644 index 0000000..44a2a95 --- /dev/null +++ b/MTC_Sim/MTC_Sim/SetupAdapter.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MTC_Sim +{ + public partial class SetupAdapter : Form + { + public SetupAdapter() + { + InitializeComponent(); + } + /// + /// Percorso file completo + /// + string filePath + { + get + { + return string.Format("{0}/{1}", utils.CRS("adapterConfPath"), txtFileName.Text); + } + } + + int numVacPump + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(nVacPump.Text); + } + catch + { } + return answ; + } + } + int numVacAct + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(nVacAct.Text); + } + catch + { } + return answ; + } + } + + private void btnCreateFile_Click(object sender, EventArgs e) + { + // creo un nuovo file adapter... + AdapterConf c = new AdapterConf(); + c.NomeAdapt = txtAdapter.Text; + c.Version = 1; + // inizializzo tamte pompe quanto richieste... + if (numVacPump > 0) + { + element[] VacuumPump = new element[numVacPump]; + for (int i = 0; i < numVacPump; i++) + { + VacuumPump[i] = new element(i + 1, string.Format("Pompa {0}", i + 1)); + } + // salvo oggetto + c.VacuumPump = VacuumPump; + } + // inizializzo tamte pompe quanto richieste... + if (numVacAct > 0) + { + element[] VacuumAct = new element[numVacAct]; + for (int i = 0; i < numVacAct; i++) + { + VacuumAct[i] = new element(i + 1, string.Format("Attuatore vuoto {0}", i + 1)); + } + // salvo oggetto + c.VacuumAct = VacuumAct; + } + // Serialize the configuration object to a file + AdapterConf.Serialize(filePath, c); + + + } + + private void btnLoad_Click(object sender, EventArgs e) + { + // Read the configuration object from a file + AdapterConf c2 = AdapterConf.Deserialize(filePath); + + txtAdapter.Text = c2.NomeAdapt; + } + } +} diff --git a/MTC_Sim/MTC_Sim/SetupAdapter.resx b/MTC_Sim/MTC_Sim/SetupAdapter.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MTC_Sim/MTC_Sim/SetupAdapter.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file