Merge branch 'develop' into IobMan
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@
|
||||
<add key="checkPeriod" value="20" />
|
||||
<add key="chekMult" value="25"/>
|
||||
<add key="watchDogMult" value="1000"/>
|
||||
<!--<add key="targetExe" value="C:\tmp\IOB-WIN\IOB-WIN.exe" />
|
||||
<add key="ArgsList" value="SIMUL_01,SIMUL_02" />-->
|
||||
<add key="targetExe" value="C:\tmp\IOB-WIN\IOB-WIN.exe" />
|
||||
<add key="ArgsList" value="SIMUL_01,SIMUL_02" />
|
||||
<!--<add key="ArgsList" value="SIMUL_01,SIMUL_02,SIMUL_03,SIMUL_04" />-->
|
||||
</appSettings>
|
||||
</configuration>
|
||||
Generated
+2
@@ -29,6 +29,7 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IOBManPanel));
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.MainTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
@@ -279,6 +280,7 @@
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.IsMdiContainer = true;
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
|
||||
+14
-31
@@ -72,6 +72,14 @@ namespace IOB_MAN
|
||||
// colelgo tab a binding
|
||||
dgvManagedItems.DataSource = ElencoIOB;
|
||||
MainTimer.Interval = utils.CRI("checkPeriod");
|
||||
loadConfig();
|
||||
MainTimer.Start();
|
||||
utils.lgInfo("Timer started");
|
||||
}
|
||||
|
||||
private void loadConfig()
|
||||
{
|
||||
ArgsList.Clear();
|
||||
TargetExe = utils.CRS("targetExe");
|
||||
if (string.IsNullOrEmpty(TargetExe))
|
||||
{
|
||||
@@ -97,8 +105,6 @@ namespace IOB_MAN
|
||||
ArgsList.Add(item);
|
||||
}
|
||||
}
|
||||
MainTimer.Start();
|
||||
utils.lgInfo("Timer started");
|
||||
}
|
||||
|
||||
private void ElencoIOB_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
|
||||
@@ -164,31 +170,6 @@ namespace IOB_MAN
|
||||
}
|
||||
numProcAvviati = ArgsList.Count;
|
||||
numProcRunning = numProcAvviati;
|
||||
|
||||
#if false
|
||||
string path = Application.StartupPath;
|
||||
|
||||
// da testare x aprire chiudere risorsa...
|
||||
Process childProc = new Process();
|
||||
ProcessStartInfo psi = new ProcessStartInfo
|
||||
{
|
||||
FileName = string.Format(@"{0}\Test.bat", path),
|
||||
Arguments = "127.0.0.1"
|
||||
};
|
||||
|
||||
childProc.StartInfo = psi;
|
||||
Process p = Process.Start(psi);
|
||||
|
||||
// accodo nuovo IOB...
|
||||
iobAdapt newIob = new iobAdapt();
|
||||
DateTime adesso = DateTime.Now;
|
||||
newIob.CodIOB = p.Id.ToString();
|
||||
newIob.startTime = adesso;
|
||||
newIob.pID = p.Id;
|
||||
newIob.isRunning = true;
|
||||
// aggiungo a datasource
|
||||
ElencoIOB.Add(newIob);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -428,7 +409,7 @@ namespace IOB_MAN
|
||||
}
|
||||
}
|
||||
// per sicurezza CERCO i processi x nome...
|
||||
string nomeProc = Path.GetFileName(TargetExe);
|
||||
string nomeProc = Path.GetFileName(TargetExe).Replace(".exe","");
|
||||
var stillRunningProc = Process.GetProcessesByName(nomeProc);
|
||||
if (stillRunningProc != null)
|
||||
{
|
||||
@@ -436,6 +417,7 @@ namespace IOB_MAN
|
||||
{
|
||||
Process p = Process.GetProcessById(item.Id);
|
||||
p.CloseMainWindow();
|
||||
p.Kill();
|
||||
}
|
||||
}
|
||||
// resetto elenco!
|
||||
@@ -585,8 +567,11 @@ namespace IOB_MAN
|
||||
|
||||
private void loadConfToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
// per iscurezza chiudo tutto
|
||||
closeAllChild();
|
||||
Thread.Sleep(1000);
|
||||
// lettura conf file...
|
||||
|
||||
loadConfig();
|
||||
// apertura
|
||||
apriChild();
|
||||
updateStatus();
|
||||
@@ -602,8 +587,6 @@ namespace IOB_MAN
|
||||
apriOneUpdate();
|
||||
Thread.Sleep(1000);
|
||||
updateStatus();
|
||||
// si chiude x permettere update...
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void panel1_Paint(object sender, PaintEventArgs e)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user