diff --git a/Jenkinsfile b/Jenkinsfile
index 9da69a0..639ee08 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -11,7 +11,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=700']) {
+ withEnv(['NEXT_BUILD_NUMBER=701']) {
// env.versionNumber = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
diff --git a/SteamWareLib/app.config b/SteamWareLib/app.config
index 320d82d..cdd01e7 100644
--- a/SteamWareLib/app.config
+++ b/SteamWareLib/app.config
@@ -71,18 +71,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -95,6 +83,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SteamWareLib/memLayer.cs b/SteamWareLib/memLayer.cs
index a512103..ed81abc 100644
--- a/SteamWareLib/memLayer.cs
+++ b/SteamWareLib/memLayer.cs
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
+using System.Text;
using System.Web;
namespace SteamWare
@@ -1307,6 +1308,30 @@ namespace SteamWare
#region gestione valori in RedisCache
+ ///
+ /// Restituisce un pò di info sul server redis connesso
+ ///
+ ///
+ public string getRedisInfoData()
+ {
+ string answ = "";
+ StringBuilder sb = new StringBuilder();
+ try
+ {
+ sb.AppendLine($"Configuration: {connRedis.Configuration}");
+ sb.AppendLine($"Connected: {connRedis.IsConnected}");
+ sb.AppendLine($"ClientName: {connRedis.ClientName}");
+ sb.AppendLine($"Total Ops: {connRedis.OperationCount}");
+ sb.AppendLine($"Status: {connRedis.GetStatus()}");
+ answ = sb.ToString();
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// Oggetto currentDb locale
+ ///
private IDatabase _currDB { get; set; }
///
/// Oggetto DB REDIS corrente
@@ -1457,7 +1482,6 @@ namespace SteamWare
}
return answ;
}
-
///
/// Restituisce una chiave salvata in RedisCache
///
diff --git a/TestBench/App.config b/TestBench/App.config
index d7b1749..cd60b27 100644
--- a/TestBench/App.config
+++ b/TestBench/App.config
@@ -16,8 +16,8 @@
-
-
+
+
@@ -40,8 +40,8 @@
-
-
+
+
diff --git a/TestBench/MainFOrm.Designer.cs b/TestBench/MainFOrm.Designer.cs
index 50dd35e..52be437 100644
--- a/TestBench/MainFOrm.Designer.cs
+++ b/TestBench/MainFOrm.Designer.cs
@@ -38,8 +38,12 @@
this.txtSourceDir = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.lblHwSwData = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
this.lblRedis = new System.Windows.Forms.Label();
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.txtMergedName = new System.Windows.Forms.TextBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.lblNumMerged = new System.Windows.Forms.Label();
+ this.button2 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
@@ -150,33 +154,71 @@
this.lblHwSwData.TabIndex = 3;
this.lblHwSwData.Text = "...";
//
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(22, 108);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(58, 13);
- this.label4.TabIndex = 4;
- this.label4.Text = "Redis Test";
- //
// lblRedis
//
this.lblRedis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblRedis.AutoEllipsis = true;
- this.lblRedis.Location = new System.Drawing.Point(109, 108);
+ this.lblRedis.Location = new System.Drawing.Point(109, 129);
this.lblRedis.Name = "lblRedis";
- this.lblRedis.Size = new System.Drawing.Size(482, 52);
+ this.lblRedis.Size = new System.Drawing.Size(482, 43);
this.lblRedis.TabIndex = 5;
this.lblRedis.Text = "---";
//
+ // openFileDialog1
+ //
+ this.openFileDialog1.DefaultExt = "pdf";
+ this.openFileDialog1.FileName = "openFileDialog1";
+ this.openFileDialog1.Multiselect = true;
+ this.openFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.openFileDialog1_FileOk);
+ //
+ // txtMergedName
+ //
+ this.txtMergedName.Location = new System.Drawing.Point(112, 94);
+ this.txtMergedName.Name = "txtMergedName";
+ this.txtMergedName.Size = new System.Drawing.Size(153, 20);
+ this.txtMergedName.TabIndex = 6;
+ this.txtMergedName.Text = "MergedPdfFile.pdf";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(25, 91);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 7;
+ this.button1.Text = "Select PDF";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // lblNumMerged
+ //
+ this.lblNumMerged.AutoSize = true;
+ this.lblNumMerged.Location = new System.Drawing.Point(320, 100);
+ this.lblNumMerged.Name = "lblNumMerged";
+ this.lblNumMerged.Size = new System.Drawing.Size(10, 13);
+ this.lblNumMerged.TabIndex = 8;
+ this.lblNumMerged.Text = "-";
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(25, 124);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(75, 23);
+ this.button2.TabIndex = 9;
+ this.button2.Text = "RedisInfo";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(600, 366);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.lblNumMerged);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.txtMergedName);
this.Controls.Add(this.lblRedis);
- this.Controls.Add(this.label4);
this.Controls.Add(this.lblHwSwData);
this.Controls.Add(this.label3);
this.Controls.Add(this.groupBox1);
@@ -202,8 +244,12 @@
private System.Windows.Forms.Label lblOutMessage;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblHwSwData;
- private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label lblRedis;
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;
+ private System.Windows.Forms.TextBox txtMergedName;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Label lblNumMerged;
+ private System.Windows.Forms.Button button2;
}
}
diff --git a/TestBench/MainFOrm.cs b/TestBench/MainFOrm.cs
index d3e3ed3..85c4cba 100644
--- a/TestBench/MainFOrm.cs
+++ b/TestBench/MainFOrm.cs
@@ -1,5 +1,7 @@
using SteamWare;
using System;
+using System.Collections.Generic;
+using System.IO;
using System.Reflection;
using System.Windows.Forms;
@@ -21,7 +23,6 @@ namespace TestBench
lblHwSwData.Text = SteamWare.HwSwInfo.man(Assembly.GetExecutingAssembly()).librariesVers;
- lblRedis.Text = memLayer.ML.getRSV("MoonPro:SQL2016DEV:MoonPro:CurrentParameters:SIMUL_01");
}
private void BtnCopyAll_Click(object sender, EventArgs e)
@@ -37,5 +38,43 @@ namespace TestBench
lblOutMessage.Text = "Copia completata!";
}
}
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ // apro selettore file...
+ openFileDialog1.ShowDialog();
+ }
+
+ private void openFileDialog1_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ // prendo i files selezionati --> merge in pdf e indico quanti...
+ List elencoFiles = new List();
+ foreach (var item in openFileDialog1.FileNames)
+ {
+ elencoFiles.Add(item);
+ }
+ int numFiles = 0;
+ string outPath = $"{Directory.GetCurrentDirectory()}\\{txtMergedName.Text}";
+ try
+ {
+ numFiles = pdfUtils.mergePdfFiles(txtMergedName.Text, elencoFiles);
+ }
+ catch
+ { }
+ lblNumMerged.Text = $"Effettuato merge di {numFiles} files!";
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ string answ = "";
+ try
+ {
+ answ = memLayer.ML.getRedisInfoData();
+ }
+ catch
+ { }
+
+ lblRedis.Text = answ;
+ }
}
}
diff --git a/TestBench/MainFOrm.resx b/TestBench/MainFOrm.resx
index 1af7de1..9bad2f5 100644
--- a/TestBench/MainFOrm.resx
+++ b/TestBench/MainFOrm.resx
@@ -117,4 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
\ No newline at end of file