diff --git a/IOB-MAN/App.config b/IOB-MAN/App.config
index 42d14c09..b2e84702 100644
--- a/IOB-MAN/App.config
+++ b/IOB-MAN/App.config
@@ -8,8 +8,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/IOB-MAN/IOBManPanel.cs b/IOB-MAN/IOBManPanel.cs
index 413213c5..a116dd48 100644
--- a/IOB-MAN/IOBManPanel.cs
+++ b/IOB-MAN/IOBManPanel.cs
@@ -149,7 +149,7 @@ namespace IOB_MAN
psi = new ProcessStartInfo
{
FileName = TargetExe,
- Arguments = item,
+ Arguments = $"{utils.CRS("BaseArg")}{item}",
WindowStyle = ProcessWindowStyle.Minimized
};
@@ -183,7 +183,7 @@ namespace IOB_MAN
psi = new ProcessStartInfo
{
FileName = TargetExe,
- Arguments = "MODE=MAN IOB=NONE",
+ Arguments = "MODE=UPD IOB=NONE",
WindowStyle = ProcessWindowStyle.Normal
};
diff --git a/IOB-WIN/AdapterForm.cs b/IOB-WIN/AdapterForm.cs
index dcdc1bd1..3b9cb91a 100644
--- a/IOB-WIN/AdapterForm.cs
+++ b/IOB-WIN/AdapterForm.cs
@@ -1005,8 +1005,8 @@ namespace IOB_WIN
start.Enabled = false;
break;
}
- lblCNC.Text = string.Format("CNC: {0} [{1}:{2}]", IOBConf.tipoIob, IOBConf.cncIpAddr, IOBConf.cncPort);
- lblSrvUrl.Text = string.Format("SRV: {0} | URL: {1}{2}", IOBConf.serverData.MPIP, IOBConf.serverData.MPURL, IOBConf.serverData.CMDBASE);
+ lblCNC.Text = $"CNC: {IOBConf.tipoIob} [{IOBConf.cncIpAddr}:{IOBConf.cncPort}]";
+ lblSrvUrl.Text = $"SRV: {IOBConf.serverData.MPIP} | URL: {IOBConf.serverData.MPURL}{IOBConf.serverData.CMDBASE}";
// aggancio evento refresh
iobObj.eh_refreshed += IobObj_eh_refreshed;
diff --git a/IOB-WIN/Enums.cs b/IOB-WIN/Enums.cs
index bff4897d..a3f521d2 100644
--- a/IOB-WIN/Enums.cs
+++ b/IOB-WIN/Enums.cs
@@ -5,7 +5,19 @@ using System.Text;
namespace IOB_WIN
{
- public class Enums
+ public enum StartMode
{
+ ///
+ /// modalità standard (standalone, multi IOB)
+ ///
+ STD = 0,
+ ///
+ /// Modalità managed (da IOB-MAN)
+ ///
+ MAN = 1,
+ ///
+ /// Modalità update (per aggiornare IOB-WIN) senza IOB
+ ///
+ UPD = 2
}
}
diff --git a/IOB-WIN/MainForm.cs b/IOB-WIN/MainForm.cs
index 5641af80..d55e118e 100644
--- a/IOB-WIN/MainForm.cs
+++ b/IOB-WIN/MainForm.cs
@@ -31,6 +31,10 @@ namespace IOB_WIN
///
protected Dictionary startParams = new Dictionary();
///
+ /// Modalità di avvio
+ ///
+ protected StartMode ModoAvvio = StartMode.STD;
+ ///
/// Ramo applicazione (x update)
///
protected string branchName = "master";
@@ -324,6 +328,10 @@ namespace IOB_WIN
}
}
}
+ ///
+ /// effettua salvataggio argomenti
+ ///
+ ///
protected void saveArgs(string[] args)
{
if (args != null)
@@ -339,6 +347,16 @@ namespace IOB_WIN
startParams.Add(kvp[0], kvp[1]);
}
}
+ // verifico gli args...
+ if (startParams.ContainsKey("MODE"))
+ {
+ try
+ {
+ ModoAvvio = (StartMode)Enum.Parse(typeof(StartMode), startParams["MODE"]);
+ }
+ catch
+ { }
+ }
}
}
@@ -356,7 +374,7 @@ namespace IOB_WIN
notifyIcon1.Icon = Icon.ExtractAssociatedIcon(utils.defIconFilePath);
// fix versione!
- lblApp.Text = string.Format("{0}", ConfigurationManager.AppSettings.Get("appName"));
+ lblApp.Text = $"{ConfigurationManager.AppSettings.Get("appName")} ({ModoAvvio})";
lblVers.Text = string.Format(" v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
@@ -384,7 +402,6 @@ namespace IOB_WIN
{
try
{
-
loadIniFile(utils.mainConfFilePath);
lgInfo("INI LOADED");
// avvio child come richiesto!
@@ -491,13 +508,37 @@ namespace IOB_WIN
CMDIOB2CALL = fIni.ReadString("SERVER", "CMDIOB2CALL", "/IOB/getIob2call?GWIP=");
MAXCNC = fIni.ReadInteger("IOB", "MAXCNC", 1);
string STARTLIST = fIni.ReadString("IOB", "STARTLIST", "");
- if (STARTLIST != "")
+ // Gestione IOB da avviare
+ IOB2START = new List();
+ // SE se sono in modo UPD --> nessuno
+ if (ModoAvvio == StartMode.UPD)
{
- IOB2START = new List();
- string[] elenco = STARTLIST.Split(',');
- foreach (var item in elenco)
+ IOB2START.Add("NONE");
+ }
+ else
+ {
+ string[] elenco = null;
+ // se modalità MAN CERCO se sostituire STARTLIST
+ if (ModoAvvio == StartMode.MAN)
{
- IOB2START.Add(item);
+ if (!string.IsNullOrEmpty(startParams["IOB"]))
+ {
+ STARTLIST = startParams["IOB"];
+ }
+ }
+ // se ho qualcosa...
+ if (!string.IsNullOrEmpty(STARTLIST))
+ {
+ elenco = STARTLIST.Split(',');
+ // inserisco da elenco!
+ foreach (var item in elenco)
+ {
+ IOB2START.Add(item);
+ }
+ }
+ else
+ {
+ IOB2START.Add("NONE");
}
}
}
@@ -891,11 +932,19 @@ namespace IOB_WIN
{
WindowState = FormWindowState.Minimized;
}
- // controllo cosa devo mostrare...
- if (WindowState == FormWindowState.Minimized)
+ // SOLO SE se sono in modo STD
+ if (ModoAvvio == StartMode.STD)
{
- notifyIcon1.Visible = false;
- sendToTray();
+ // controllo cosa devo mostrare...
+ if (WindowState == FormWindowState.Minimized)
+ {
+ notifyIcon1.Visible = false;
+ sendToTray();
+ }
+ else
+ {
+ notifyIcon1.Visible = false;
+ }
}
else
{
@@ -1008,11 +1057,15 @@ namespace IOB_WIN
///
private void MainForm_Shown(object sender, EventArgs e)
{
- // avvio minimizzato se richiesto
- if (utils.CRB("startMinimized"))
+ // SOLO SE se sono in modo STD
+ if (ModoAvvio == StartMode.STD)
{
- // controllo e mando a tray...
- sendToTray();
+ // avvio minimizzato se richiesto
+ if (utils.CRB("startMinimized"))
+ {
+ // controllo e mando a tray...
+ sendToTray();
+ }
}
displayTaskAndLog("Main Form SHOWN");
}
diff --git a/Jenkinsfile b/Jenkinsfile
index f8ae983d..e5977cbf 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -16,7 +16,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=615']) {
+ withEnv(['NEXT_BUILD_NUMBER=617']) {
// env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'