From 183d3ffb5646b2f10790dece967c93a0d48bbceb Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 16 Dec 2019 10:39:14 +0100 Subject: [PATCH] Aggiunta visualizzazione contapezzi in home --- IOB-WIN/AdapterForm.Designer.cs | 88 ++++++++++++++++++++++----------- IOB-WIN/AdapterForm.cs | 27 ++++++++++ IOB-WIN/IobGeneric.cs | 4 +- Jenkinsfile | 2 +- 4 files changed, 90 insertions(+), 31 deletions(-) diff --git a/IOB-WIN/AdapterForm.Designer.cs b/IOB-WIN/AdapterForm.Designer.cs index 6a3e1918..814a5d6f 100644 --- a/IOB-WIN/AdapterForm.Designer.cs +++ b/IOB-WIN/AdapterForm.Designer.cs @@ -100,6 +100,8 @@ this.label10 = new System.Windows.Forms.Label(); this.lblDataProc = new System.Windows.Forms.Label(); this.lblQueueLen = new System.Windows.Forms.Label(); + this.lblPzCountIob = new System.Windows.Forms.Label(); + this.lblPzCountMac = new System.Windows.Forms.Label(); this.statusStrip1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tabData.SuspendLayout(); @@ -155,26 +157,29 @@ // this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.ColumnCount = 9; + this.tableLayoutPanel1.ColumnCount = 10; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 24F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 52F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 52F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 52F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 44F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 44F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 24F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 24F)); this.tableLayoutPanel1.Controls.Add(this.restart, 0, 0); this.tableLayoutPanel1.Controls.Add(this.stop, 2, 0); - this.tableLayoutPanel1.Controls.Add(this.nLines, 7, 0); + this.tableLayoutPanel1.Controls.Add(this.nLines, 8, 0); this.tableLayoutPanel1.Controls.Add(this.start, 1, 0); this.tableLayoutPanel1.Controls.Add(this.bIN, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.bOUT, 8, 0); + this.tableLayoutPanel1.Controls.Add(this.bOUT, 9, 0); this.tableLayoutPanel1.Controls.Add(this.chkForceDequeue, 4, 0); - this.tableLayoutPanel1.Controls.Add(this.lblQueueLenTop, 6, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(2, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.lblQueueLenTop, 7, 0); + this.tableLayoutPanel1.Controls.Add(this.lblPzCountIob, 6, 0); + this.tableLayoutPanel1.Controls.Add(this.lblPzCountMac, 5, 0); + this.tableLayoutPanel1.Location = new System.Drawing.Point(2, 1); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -217,7 +222,7 @@ this.nLines.Dock = System.Windows.Forms.DockStyle.Fill; this.nLines.Font = new System.Drawing.Font("Arial Narrow", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.nLines.Location = new System.Drawing.Point(855, 2); - this.nLines.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.nLines.Margin = new System.Windows.Forms.Padding(2); this.nLines.Name = "nLines"; this.nLines.Size = new System.Drawing.Size(20, 23); this.nLines.TabIndex = 73; @@ -247,7 +252,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.bIN.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bIN.Location = new System.Drawing.Point(2, 2); - this.bIN.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.bIN.Margin = new System.Windows.Forms.Padding(2); this.bIN.MinimumSize = new System.Drawing.Size(19, 0); this.bIN.Name = "bIN"; this.bIN.Size = new System.Drawing.Size(20, 26); @@ -262,7 +267,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.bOUT.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bOUT.Location = new System.Drawing.Point(879, 2); - this.bOUT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.bOUT.Margin = new System.Windows.Forms.Padding(2); this.bOUT.MinimumSize = new System.Drawing.Size(19, 0); this.bOUT.Name = "bOUT"; this.bOUT.Size = new System.Drawing.Size(20, 26); @@ -274,15 +279,14 @@ // this.chkForceDequeue.AutoSize = true; this.chkForceDequeue.Dock = System.Windows.Forms.DockStyle.Fill; - this.chkForceDequeue.Font = new System.Drawing.Font("Arial Narrow", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkForceDequeue.Font = new System.Drawing.Font("Arial Narrow", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.chkForceDequeue.Location = new System.Drawing.Point(182, 2); - this.chkForceDequeue.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.chkForceDequeue.Margin = new System.Windows.Forms.Padding(2); this.chkForceDequeue.MinimumSize = new System.Drawing.Size(45, 0); this.chkForceDequeue.Name = "chkForceDequeue"; this.chkForceDequeue.Size = new System.Drawing.Size(45, 26); this.chkForceDequeue.TabIndex = 80; - this.chkForceDequeue.Text = "send"; - this.chkForceDequeue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.chkForceDequeue.Text = "snd"; this.chkForceDequeue.UseVisualStyleBackColor = true; // // lblQueueLenTop @@ -290,10 +294,10 @@ this.lblQueueLenTop.AutoEllipsis = true; this.lblQueueLenTop.AutoSize = true; this.lblQueueLenTop.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblQueueLenTop.Location = new System.Drawing.Point(262, 0); + this.lblQueueLenTop.Location = new System.Drawing.Point(310, 0); this.lblQueueLenTop.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblQueueLenTop.Name = "lblQueueLenTop"; - this.lblQueueLenTop.Size = new System.Drawing.Size(589, 30); + this.lblQueueLenTop.Size = new System.Drawing.Size(541, 30); this.lblQueueLenTop.TabIndex = 81; this.lblQueueLenTop.Text = "000"; this.lblQueueLenTop.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -324,7 +328,7 @@ this.tabRealtime.Controls.Add(this.tableLayoutPanel2); this.tabRealtime.Location = new System.Drawing.Point(4, 22); this.tabRealtime.Name = "tabRealtime"; - this.tabRealtime.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabRealtime.Padding = new System.Windows.Forms.Padding(3); this.tabRealtime.Size = new System.Drawing.Size(892, 519); this.tabRealtime.TabIndex = 2; this.tabRealtime.Text = "Monitor Variabili RealTime"; @@ -350,7 +354,7 @@ this.tableLayoutPanel2.Controls.Add(this.lblOutMessage3, 2, 1); this.tableLayoutPanel2.Controls.Add(this.lblOutMessage2, 3, 1); this.tableLayoutPanel2.Location = new System.Drawing.Point(2, 5); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 16F)); @@ -475,7 +479,7 @@ this.btnOpenLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnOpenLog.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; this.btnOpenLog.Location = new System.Drawing.Point(730, 6); - this.btnOpenLog.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnOpenLog.Margin = new System.Windows.Forms.Padding(2); this.btnOpenLog.Name = "btnOpenLog"; this.btnOpenLog.Size = new System.Drawing.Size(158, 22); this.btnOpenLog.TabIndex = 5; @@ -523,7 +527,7 @@ this.tabPlc.Controls.Add(this.splitContainer1); this.tabPlc.Location = new System.Drawing.Point(4, 22); this.tabPlc.Name = "tabPlc"; - this.tabPlc.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPlc.Padding = new System.Windows.Forms.Padding(3); this.tabPlc.Size = new System.Drawing.Size(892, 519); this.tabPlc.TabIndex = 4; this.tabPlc.Text = "PLC <--> IOB"; @@ -561,7 +565,7 @@ this.panel3.Controls.Add(this.label12); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(0, 0); - this.panel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel3.Margin = new System.Windows.Forms.Padding(2); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(426, 513); this.panel3.TabIndex = 91; @@ -590,7 +594,7 @@ // txtValue // this.txtValue.Location = new System.Drawing.Point(95, 91); - this.txtValue.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.txtValue.Margin = new System.Windows.Forms.Padding(2); this.txtValue.Name = "txtValue"; this.txtValue.Size = new System.Drawing.Size(236, 20); this.txtValue.TabIndex = 85; @@ -627,7 +631,7 @@ // this.btnSendPLC.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnSendPLC.Location = new System.Drawing.Point(19, 132); - this.btnSendPLC.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnSendPLC.Margin = new System.Windows.Forms.Padding(2); this.btnSendPLC.Name = "btnSendPLC"; this.btnSendPLC.Size = new System.Drawing.Size(312, 30); this.btnSendPLC.TabIndex = 6; @@ -649,7 +653,7 @@ // this.chkEdit.AutoSize = true; this.chkEdit.Location = new System.Drawing.Point(252, 22); - this.chkEdit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.chkEdit.Margin = new System.Windows.Forms.Padding(2); this.chkEdit.Name = "chkEdit"; this.chkEdit.Size = new System.Drawing.Size(79, 17); this.chkEdit.TabIndex = 8; @@ -679,7 +683,7 @@ this.panel4.Controls.Add(this.label16); this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; this.panel4.Location = new System.Drawing.Point(0, 0); - this.panel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel4.Margin = new System.Windows.Forms.Padding(2); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(347, 513); this.panel4.TabIndex = 92; @@ -762,7 +766,7 @@ this.tabMes.Controls.Add(this.panel1); this.tabMes.Location = new System.Drawing.Point(4, 22); this.tabMes.Name = "tabMes"; - this.tabMes.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabMes.Padding = new System.Windows.Forms.Padding(3); this.tabMes.Size = new System.Drawing.Size(892, 519); this.tabMes.TabIndex = 1; this.tabMes.Text = "IOB <--> MES"; @@ -786,7 +790,7 @@ this.panel1.Controls.Add(this.lblDataProc); this.panel1.Controls.Add(this.lblQueueLen); this.panel1.Location = new System.Drawing.Point(4, 6); - this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel1.Margin = new System.Windows.Forms.Padding(2); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(343, 231); this.panel1.TabIndex = 88; @@ -934,6 +938,32 @@ this.lblQueueLen.TabIndex = 83; this.lblQueueLen.Text = "###"; // + // lblPzCountIob + // + this.lblPzCountIob.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblPzCountIob.AutoSize = true; + this.lblPzCountIob.Font = new System.Drawing.Font("Arial Narrow", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPzCountIob.Location = new System.Drawing.Point(267, 0); + this.lblPzCountIob.Name = "lblPzCountIob"; + this.lblPzCountIob.Size = new System.Drawing.Size(38, 30); + this.lblPzCountIob.TabIndex = 82; + this.lblPzCountIob.Text = "pzIOB"; + this.lblPzCountIob.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lblPzCountMac + // + this.lblPzCountMac.AutoSize = true; + this.lblPzCountMac.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblPzCountMac.Font = new System.Drawing.Font("Arial Narrow", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPzCountMac.Location = new System.Drawing.Point(223, 0); + this.lblPzCountMac.Name = "lblPzCountMac"; + this.lblPzCountMac.Size = new System.Drawing.Size(38, 30); + this.lblPzCountMac.TabIndex = 83; + this.lblPzCountMac.Text = "pzMac"; + this.lblPzCountMac.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // AdapterForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -943,7 +973,7 @@ this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.statusStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "AdapterForm"; this.Text = "IOB-WIN"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); @@ -1050,5 +1080,7 @@ private System.Windows.Forms.Label lblQueueAlarmLen; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label lblQueueMessLen; + private System.Windows.Forms.Label lblPzCountIob; + private System.Windows.Forms.Label lblPzCountMac; } } \ No newline at end of file diff --git a/IOB-WIN/AdapterForm.cs b/IOB-WIN/AdapterForm.cs index ff114c18..4b89f6c0 100644 --- a/IOB-WIN/AdapterForm.cs +++ b/IOB-WIN/AdapterForm.cs @@ -440,6 +440,9 @@ namespace IOB_WIN flQueueLen = iobObj.QueueFLog.Count; alQueueLen = iobObj.QueueAlarm.Count; msQueueLen = iobObj.QueueMessages.Count; + // aggiorno labels counters... + counterMac = $"pz mac {iobObj.lastCountCNC}"; + counterIob = $"pz iob {iobObj.contapezzi}"; } private void gather_Tick(object sender, EventArgs e) { @@ -1368,6 +1371,30 @@ namespace IOB_WIN return qMsLen; } } + + public string counterMac + { + get + { + return lblPzCountMac.Text; + } + set + { + lblPzCountMac.Text = value; + } + } + public string counterIob + { + get + { + return lblPzCountIob.Text; + } + set + { + lblPzCountIob.Text = value; + } + } + /// /// Numero max linee da mostrare (da controllo)... /// diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs index 51431092..ce2b1b9d 100644 --- a/IOB-WIN/IobGeneric.cs +++ b/IOB-WIN/IobGeneric.cs @@ -85,11 +85,11 @@ namespace IOB_WIN /// /// Contapezzi attuale /// - protected Int32 contapezzi; + public Int32 contapezzi; /// /// Ultima lettura variabile contapezzi da CNC /// - protected Int32 lastCountCNC; + public Int32 lastCountCNC; /// /// ODL attualmente sulla macchina /// diff --git a/Jenkinsfile b/Jenkinsfile index 8353554d..e18c4242 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=590']) { + withEnv(['NEXT_BUILD_NUMBER=591']) { // env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN'