Merge branch 'develop'

This commit is contained in:
Samuele E. Locatelli
2020-02-21 21:41:31 +01:00
35 changed files with 2987 additions and 576 deletions
+4
View File
@@ -0,0 +1,4 @@
[*.cs]
# CA1051: Non dichiarare campi di istanza visibili
dotnet_diagnostic.CA1051.severity = none
Binary file not shown.
Binary file not shown.
+5 -6
View File
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<appSettings>
<add key="appName" value="IOB-MAN" />
<add key="appNameExt" value="IOB-WIN" />
<add key="checkPeriod" value="250" />
<add key="chekMult" value="3" />
<add key="watchDogMult" value="60" />
<add key="forceCheckMult" value="10" />
<add key="uiPeriod" value="100" />
<add key="checkPeriod" value="1000" />
<add key="forceCheckPeriod" value="15000" />
<add key="autoRestartTimeoutMin" value="15" />
<add key="autoStartProc" value="true" />
<add key="closeOnChildUpdate" value="true" />
@@ -64,4 +63,4 @@
<probing privatePath="lib;libs" xmlns="" />
</assemblyBinding>
</runtime>
</configuration>
</configuration>
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >
<!-- optional, add some variabeles
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="myvar" value="myvalue"/>
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets async="true">
<target xsi:type="File"
name="SteamWareLib"
fileName="${basedir}/logs/${shortdate}-SteamWare.log"
layout="${longdate} ${uppercase:${level}} ${message}"
/>
</targets>
<rules>
<logger name="SteamWare.*" minlevel="Debug" writeTo="SteamWareLib" />
</rules>
</nlog>
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="SteamWare.Properties.Settings.loggerConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=Flamma_SC;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.SteamWare_VocabolarioConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.DS_AuthConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=SteamWare_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.AnagraficaBremboConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=AnagraficaBrembo;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.SteamWare_BremboConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=SteamWare_Brembo;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.Flamma_AnagraficaConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=Flamma_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.AnagraficaConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=SteamWare_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.SEL_fatture_SteamWareConnectionString" connectionString="Data Source=SQLSTEAM;Initial Catalog=SEL_fatture_SteamWare;User ID=sa;Password=keyhammer;Encrypt=False;TrustServerCertificate=True" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.Equa_AnagraficaConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=Equa_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.GMWConnectionString" connectionString="Data Source=SQL2012DEV;Initial Catalog=GMW;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.MoonProConnectionString" connectionString="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16" providerName="System.Data.SqlClient" />
<add name="SteamWare.Properties.Settings.DbConfConnectionString" connectionString="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
@@ -1,30 +0,0 @@
# chiave valore valoreStd note
_adminEmail samuele@steamware.net,info@steamware.net samuele@steamware.net,info@steamware.net info@steamware.net
_allowForceUser true true abilita login forzato
_commonPages menu menu pagina comune
_emailPwd drmfsls16 drmfsls16 drmfsls16
_emailUser steamwarebot@gmail.com steamwarebot@gmail.com steamwarebot@gmail.com
_enableSSL true true true
_fromEmail webmaster@admodelling.org webmaster@admodelling.org email mittente eventuali msg
_righeDataGrid 30 30 Num righe datagrid std
_righeDataGridAnagr 20 20 Num righe datagrid anagrafiche
_righeDataGridLong 30 30 Num righe datagrid long
_righeDataGridMed 15 15 Num righe datagrid med
_righeDataGridShort 10 10 Num righe datagrid short
_smtpCli smtp.gmail.com smtp.gmail.com smtp.gmail.com
_useAIMSmtp false false impiego client posta elettronica alternativo
_useAuthSmtp true true true
AuthCookieName admodellingAuth admodellingAuth Cookie applicativo
autoConfCmd true true Conferma automatica comandi barcode
baseUrl http://site_name http://iis02/site_name URL base del sito
cacheValSec 60 60 Validità cache dati in gestore Barcode
cookieDayExp 365 365 Periodo validità cookie
cookieUsed admodellingAuth admodellingAuth,CTrack_CodOpr,CTrack_CodPost Elenco dei cookie impiegati
enableCookie true true Abilitazione uso cookie
enableLogOut true false Abilita button logout COMPLETO in alto a sx
enablePlain true true Abilitazione decode plain
maxAuth 1000 1000 num auth minimo per NON consumare tokens
serializeSession true true Serializzazione valori in sessione (REDIS)
SiteName iis02/site_name iis02/site_name Nome sito
enableDumpDiag false false abilitazione dumb diagnostico x eccezioni di default
doShrinkFolder true true Imposta compressione area LOGS
+48
View File
@@ -0,0 +1,48 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.btnMaximixeAll_Click(System.Object,System.EventArgs)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.btnMinimizeAll_Click(System.Object,System.EventArgs)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.checkIstance(IOB_MAN.iobAdapt,System.Collections.Generic.List{IOB_MAN.iobAdapt},System.Diagnostics.Process[])~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.chiudiChildSel")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.closeAllChild(System.Boolean)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.dgvManagedItems_CellDoubleClick(System.Object,System.Windows.Forms.DataGridViewCellEventArgs)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.forceCheckTimer_Tick(System.Object,System.EventArgs)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.IOBManPanel.MainTimer_Tick(System.Object,System.EventArgs)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.deserializeVal(System.String)~System.Object")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.getRCnt(System.String)~System.Int32")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.getRedisInfoData~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.getRKeys(StackExchange.Redis.RedisKey[])~StackExchange.Redis.RedisValue[]")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.getRSV(System.String)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redCountKey(System.String)~System.Int32")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redDelKey(System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redFlushKey(System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redGetCounterByKey(System.String,IOB_MAN.RedisIobCache.kvpOrderBy)~System.Collections.Generic.List{System.Collections.Generic.KeyValuePair{System.String,System.Int32}}")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redGetHash(System.String)~System.Collections.Generic.KeyValuePair{System.String,System.String}[]")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redGetHashDict(System.String)~System.Collections.Generic.Dictionary{System.String,System.String}")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redGetHashField(System.String,System.String)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redHash(System.String)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redHashPresent(StackExchange.Redis.RedisKey)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redHashPresentSz(System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redKeyPresent(StackExchange.Redis.RedisKey)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redKeyPresentSz(System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redSaveHash(System.String,System.Collections.Generic.KeyValuePair{System.String,System.String}[])~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redSaveHash(System.String,System.Collections.Generic.KeyValuePair{System.String,System.String}[],System.Double)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redSaveHashDict(System.String,System.Collections.Generic.Dictionary{System.String,System.String})~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redSaveHashDict(System.String,System.Collections.Generic.Dictionary{System.String,System.String},System.Double)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redSaveHashList(System.String,System.Collections.Generic.List{System.Collections.Generic.KeyValuePair{System.String,System.String}})~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.redServInfo~StackExchange.Redis.IServer[]")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.resetRCnt(System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.serializeVal(System.Object)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.setRCntD(System.String)~System.Int64")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.setRCntI(System.String)~System.Int64")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.setRKeys(System.Collections.Generic.KeyValuePair{StackExchange.Redis.RedisKey,StackExchange.Redis.RedisValue}[])~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.setRSV(System.String,System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.RedisIobCache.setRSV(System.String,System.String,System.Int32)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.utils.CRB(System.String)~System.Boolean")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.utils.CRC(System.String)~System.Char")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.utils.CRI(System.String)~System.Int32")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:IOB_MAN.utils.CRS(System.String)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~P:IOB_MAN.RedisIobCache.numRecRedis")]
+18 -47
View File
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props')" />
<Import Project="..\packages\Microsoft.NetFramework.Analyzers.2.9.8\build\Microsoft.NetFramework.Analyzers.props" Condition="Exists('..\packages\Microsoft.NetFramework.Analyzers.2.9.8\build\Microsoft.NetFramework.Analyzers.props')" />
<Import Project="..\packages\Microsoft.NetCore.Analyzers.2.9.8\build\Microsoft.NetCore.Analyzers.props" Condition="Exists('..\packages\Microsoft.NetCore.Analyzers.2.9.8\build\Microsoft.NetCore.Analyzers.props')" />
<Import Project="..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\build\Microsoft.CodeQuality.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\build\Microsoft.CodeQuality.Analyzers.props')" />
<Import Project="..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.8\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.8\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -13,11 +8,12 @@
<OutputType>WinExe</OutputType>
<RootNamespace>IOB_MAN</RootNamespace>
<AssemblyName>IOB-MAN</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -42,12 +38,6 @@
<ApplicationIcon>IobManIcon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="AegisImplicitMail, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AIM.1.0.3\lib\AegisImplicitMail.dll</HintPath>
</Reference>
<Reference Include="AjaxControlToolkit, Version=19.1.0.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL">
<HintPath>..\packages\AjaxControlToolkit.19.1.0\lib\net40\AjaxControlToolkit.dll</HintPath>
</Reference>
<Reference Include="Crc32C.NET, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32C.NET.1.0.5.0\lib\net20\Crc32C.NET.dll</HintPath>
</Reference>
@@ -57,17 +47,17 @@
<Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.246, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.9.2001.1283, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.9.2001.1283\lib\net40\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.9.2002.1287, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.9.2002.1287\lib\net40\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Bson, Version=2.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.10.1\lib\net452\MongoDB.Bson.dll</HintPath>
<Reference Include="MongoDB.Bson, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.10.2\lib\net452\MongoDB.Bson.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.10.1\lib\net452\MongoDB.Driver.dll</HintPath>
<Reference Include="MongoDB.Driver, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.10.2\lib\net452\MongoDB.Driver.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.10.1\lib\net452\MongoDB.Driver.Core.dll</HintPath>
<Reference Include="MongoDB.Driver.Core, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.10.2\lib\net452\MongoDB.Driver.Core.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Libmongocrypt, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Libmongocrypt.1.0.0\lib\net452\MongoDB.Libmongocrypt.dll</HintPath>
@@ -78,12 +68,6 @@
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll</HintPath>
</Reference>
<Reference Include="PdfSharp.Charting, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.Charting.dll</HintPath>
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.1.1\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference>
@@ -96,6 +80,12 @@
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="SteamWare.IO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.IO.4.0.2002.731\lib\net462\SteamWare.IO.dll</HintPath>
</Reference>
<Reference Include="SteamWare.Logger, Version=4.0.2002.727, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.Logger.4.0.2002.727\lib\net462\SteamWare.Logger.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
@@ -148,6 +138,7 @@
<Compile Include="..\VersGen\VersGen.cs">
<Link>VersGen.cs</Link>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="iobAdapt.cs" />
<Compile Include="IOBManPanel.cs">
<SubType>Form</SubType>
@@ -160,7 +151,6 @@
<Compile Include="RedisMan.cs" />
<Compile Include="utils.cs" />
<Content Include="App_Readme\README_SteamWare.txt" />
<Content Include="App_Readme\SteamWare_demo\example-config-table.txt" />
<Content Include="App_Readme\SteamWare_demo\example-favicon.ico" />
<Content Include="IobManIcon.ico" />
<Content Include="mongocrypt.dll" />
@@ -178,9 +168,8 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="App_Readme\SteamWare_demo\example-app.config" />
<None Include="App_Readme\SteamWare_demo\example-NLog.config" />
<None Include="CONF\.placeholder">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -211,32 +200,14 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.8\analyzers\dotnet\cs\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll" />
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.8\analyzers\dotnet\Microsoft.CodeAnalysis.VersionCheckAnalyzer.dll" />
<Analyzer Include="..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\analyzers\dotnet\cs\Humanizer.dll" />
<Analyzer Include="..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\analyzers\dotnet\cs\Microsoft.CodeQuality.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\analyzers\dotnet\cs\Microsoft.CodeQuality.CSharp.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetCore.Analyzers.2.9.8\analyzers\dotnet\cs\Microsoft.NetCore.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetCore.Analyzers.2.9.8\analyzers\dotnet\cs\Microsoft.NetCore.CSharp.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetFramework.Analyzers.2.9.8\analyzers\dotnet\cs\Microsoft.NetFramework.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetFramework.Analyzers.2.9.8\analyzers\dotnet\cs\Microsoft.NetFramework.CSharp.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MongoDB.Libmongocrypt.1.0.0\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.0.0\build\MongoDB.Libmongocrypt.targets'))" />
<Error Condition="!Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.8\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.8\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\build\Microsoft.CodeQuality.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeQuality.Analyzers.2.9.8\build\Microsoft.CodeQuality.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NetCore.Analyzers.2.9.8\build\Microsoft.NetCore.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NetCore.Analyzers.2.9.8\build\Microsoft.NetCore.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NetFramework.Analyzers.2.9.8\build\Microsoft.NetFramework.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NetFramework.Analyzers.2.9.8\build\Microsoft.NetFramework.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props'))" />
</Target>
<Import Project="..\packages\MongoDB.Libmongocrypt.1.0.0\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.0.0\build\MongoDB.Libmongocrypt.targets')" />
<Import Project="..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
<Target Name="AfterBuild">
<ItemGroup>
<MoveToLibFolder Include="$(OutputPath)*.dll ; $(OutputPath)*.pdb ; $(OutputPath)*.xml" />
+14
View File
@@ -55,6 +55,8 @@
this.btnRestartAll = new System.Windows.Forms.Button();
this.btnCloseAll = new System.Windows.Forms.Button();
this.dgvManagedItems = new System.Windows.Forms.DataGridView();
this.UI_Timer = new System.Windows.Forms.Timer(this.components);
this.forceCheckTimer = new System.Windows.Forms.Timer(this.components);
this.statusStrip1.SuspendLayout();
this.panel1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@@ -330,6 +332,7 @@
this.dgvManagedItems.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.dgvManagedItems.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dgvManagedItems.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvManagedItems.Location = new System.Drawing.Point(3, 3);
this.dgvManagedItems.Name = "dgvManagedItems";
@@ -340,6 +343,15 @@
this.dgvManagedItems.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvManagedItems_CellDoubleClick);
this.dgvManagedItems.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.dgvManagedItems_CellFormatting);
//
// UI_Timer
//
this.UI_Timer.Tick += new System.EventHandler(this.UI_Timer_Tick);
//
// forceCheckTimer
//
this.forceCheckTimer.Interval = 5000;
this.forceCheckTimer.Tick += new System.EventHandler(this.forceCheckTimer_Tick);
//
// IOBManPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -397,6 +409,8 @@
private System.Windows.Forms.ToolStripStatusLabel lblVers;
private System.Windows.Forms.ToolStripStatusLabel lblApp;
private System.Windows.Forms.Button btnStartSel;
private System.Windows.Forms.Timer UI_Timer;
private System.Windows.Forms.Timer forceCheckTimer;
}
}
+175 -152
View File
@@ -28,10 +28,6 @@ namespace IOB_MAN
#endregion
/// <summary>
/// Token x cancellazione thread
/// </summary>
private CancellationTokenSource _cts;
/// <summary>
/// Context x sync thread
/// </summary>
@@ -46,21 +42,17 @@ namespace IOB_MAN
/// </summary>
protected int numProcRunning;
/// <summary>
/// Counter per verifica watchdog dei processi da riattivare...
/// Counter del timer di forceCheck
/// </summary>
protected int watchDogMult = 75;
/// <summary>
/// Counter x il force check status
/// </summary>
protected int forceCheckMult = 10;
/// <summary>
/// Counter per verifica processi (ogni volta che va a zero faccio vero check)
/// </summary>
protected int chekMult = 4;
protected int forceCheckPeriod = 5000;
/// <summary>
/// Counter del timer di base
/// </summary>
protected int checkPeriod = 200;
protected int checkPeriod = 1000;
/// <summary>
/// Counter del timer UI
/// </summary>
protected int uiPeriod = 200;
/// <summary>
/// Elenco ARGS (uno per child da avviare)
/// </summary>
@@ -85,34 +77,31 @@ namespace IOB_MAN
/// semaforo check...
/// </summary>
protected bool checkRunning = false;
protected bool doTaskRun = true;
protected bool doParallel = true;
/// <summary>
/// Oggetto locker x evitare problemi timer
/// </summary>
private static object _locker = new object();
/// <summary>
/// Init classe
/// </summary>
public IOBManPanel()
{
InitializeComponent();
synchronizationContext = SynchronizationContext.Current;
myInit();
preInit();
loadConfig();
initTimers();
initControls();
updateStatus();
}
private void myInit()
private void initControls()
{
utils.lgInfo("Starting App");
lblApp.Text = $"{ConfigurationManager.AppSettings.Get("appName")}";
lblVers.Text = string.Format(" v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
// init prog bar
tsProgBar.Maximum = 100;
tsProgBar.Step = 2;
// gestione eventi binding source
ElencoIOB.AddingNew += ElencoIOB_AddingNew;
ElencoIOB.ListChanged += ElencoIOB_ListChanged;
// collego tab a binding
dgvManagedItems.DataSource = ElencoIOB;
MainTimer.Interval = checkPeriod;
loadConfig();
MainTimer.Start();
utils.lgInfo("Timer started");
if (utils.CRB("autoStartProc"))
{
@@ -121,6 +110,29 @@ namespace IOB_MAN
}
}
/// <summary>
/// Inizializzazione timers
/// </summary>
private void initTimers()
{
MainTimer.Interval = checkPeriod;
MainTimer.Start();
UI_Timer.Interval = uiPeriod;
UI_Timer.Start();
forceCheckTimer.Interval = forceCheckPeriod;
forceCheckTimer.Start();
}
private void preInit()
{
utils.lgInfo("Starting App");
lblApp.Text = $"{ConfigurationManager.AppSettings.Get("appName")}";
lblVers.Text = $" v.{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
// init prog bar
tsProgBar.Maximum = 100;
tsProgBar.Step = 4;
}
/// <summary>
/// Caricamento configurazione
/// </summary>
@@ -128,13 +140,14 @@ namespace IOB_MAN
{
ArgsList.Clear();
checkPeriod = utils.CRI("checkPeriod");
chekMult = utils.CRI("chekMult");
watchDogMult = utils.CRI("watchDogMult");
uiPeriod = utils.CRI("uiPeriod");
forceCheckPeriod = utils.CRI("forceCheckPeriod");
TargetExe = utils.CRS("targetExe");
TargetName = utils.CRS("appNameExt");
if (string.IsNullOrEmpty(TargetExe))
{
TargetExe = string.Format(@"{0}\Resources\Test.bat", Application.StartupPath);
//TargetExe = string.Format(@"{0}\Resources\Test.bat", Application.StartupPath);
TargetExe = $@"{Application.StartupPath}\Resources\Test.bat";
}
utils.lgInfo($"Target exe: {TargetExe}");
// caricamento configurazione argomenti di avvio processi
@@ -168,7 +181,7 @@ namespace IOB_MAN
// ne creo rand (5-15) di default...
for (int i = 0; i < rand.Next(5, 10); i++)
{
ArgsList.Add("127.0.0.1");
ArgsList.Add($"127.0.0.{i + 1}");
}
}
else
@@ -229,7 +242,7 @@ namespace IOB_MAN
if (!chkAutoRestart.Checked)
{
tOutAutocheck--;
txtTOutAutoCheck.Text = (tOutAutocheck / (1000 / (utils.CRI("checkPeriod") * utils.CRI("chekMult")))).ToString();
txtTOutAutoCheck.Text = $"{(tOutAutocheck / (1000 / (utils.CRI("checkPeriod"))))}";
}
}
else
@@ -336,7 +349,7 @@ namespace IOB_MAN
foreach (DataGridViewRow riga in dgvManagedItems.SelectedRows)
{
// chiudo!
int.TryParse(riga.Cells["pID"].Value.ToString(), out pid);
_ = int.TryParse(riga.Cells["pID"].Value.ToString(), out pid);
if (pid >= 0)
{
@@ -364,7 +377,7 @@ namespace IOB_MAN
/// <param name="processlist"></param>
/// <param name="id"></param>
/// <returns></returns>
public Process myGetProcByID(Process[] processlist, int id)
public static Process myGetProcByID(Process[] processlist, int id)
{
return processlist.FirstOrDefault(pr => pr.Id == id);
}
@@ -376,38 +389,56 @@ namespace IOB_MAN
/// <param name="e"></param>
private void MainTimer_Tick(object sender, EventArgs e)
{
updateProgBar();
if (!checkRunning && forceCheckMult > 0)
MainTimer.Stop();
if (!checkRunning)
{
forceCheckMult = utils.CRI("forceCheckMult");
if (doTaskRun)
//checkProcessStatusAsync();
try
{
checkProcessStatusAsync();
Task result = checkProcessStatusAsync();
result.Wait();
}
else
{
checkProcessStatus();
}
checkWatchdog();
catch (Exception exc)
{ }
}
else
MainTimer.Start();
}
private void forceCheckTimer_Tick(object sender, EventArgs e)
{
if (!checkRunning)
{
forceCheckMult--;
//checkProcessStatusAsync();
try
{
Task result = checkProcessStatusAsync();
result.Wait();
}
catch (Exception exc)
{ }
}
checkWatchdog();
// riavvio i timer x sicurezza...
UI_Timer.Stop();
UI_Timer.Start();
MainTimer.Stop();
MainTimer.Start();
}
private void UI_Timer_Tick(object sender, EventArgs e)
{
UI_Timer.Stop();
Task result = updateProgBarAsync();
result.Wait();
UI_Timer.Start();
}
/// <summary>
/// Controllo periodico dei processi DA RIATTIVARE
/// </summary>
private void checkWatchdog()
{
watchDogMult--;
if (watchDogMult < 0)
{
watchDogMult = utils.CRI("watchDogMult");
processAutoRestart();
// aggiorno datagrid!
dgvManagedItems.Invalidate();
}
processAutoRestart();
// aggiorno datagrid!
dgvManagedItems.Invalidate();
}
/// <summary>
/// Effettua processing autorestart
@@ -450,54 +481,54 @@ namespace IOB_MAN
}
}
}
/// <summary>
/// Controllo periodico dei processi attivi
/// </summary>
private void checkProcessStatus()
{
chekMult--;
if (chekMult < 0)
{
// reset variabili appoggio
chekMult = utils.CRI("chekMult");
checkRunning = true;
// eseguo task!
checkRunningchild();
updateStatus();
checkRunning = false;
}
}
/// <summary>
/// Controllo periodico dei processi attivi
/// </summary>
private async Task checkProcessStatusAsync()
{
chekMult--;
if (chekMult < 0)
var hasLock = false;
try
{
// reset variabili appoggio
chekMult = utils.CRI("chekMult");
checkRunning = true;
// eseguo task!
//var taskRes = Task.Run(() => checkRunningchild());
//taskRes.Wait();
await Task.Run(() => checkRunningchild()).ConfigureAwait(false);
updateStatus();
checkRunning = false;
Monitor.TryEnter(_locker, ref hasLock);
if (!hasLock)
{
return;
}
if (!checkRunning)
{
// reset variabili appoggio
checkRunning = true;
// eseguo task!
await Task.Run(() => checkRunningchild()).ConfigureAwait(false);
updateStatus();
checkRunning = false;
}
}
finally
{
if (hasLock)
{
Monitor.Exit(_locker);
}
}
}
private void updateProgBar()
private async Task updateProgBarAsync()
{
tsProgBar.PerformStep();
if (tsProgBar.Value >= tsProgBar.Maximum)
await Task.Run(() => performBarAdvance()).ConfigureAwait(false);
}
private void performBarAdvance()
{
synchronizationContext.Post(new SendOrPostCallback(o =>
{
tsProgBar.Value = 0;
}
tsProgBar.PerformStep();
if (tsProgBar.Value >= tsProgBar.Maximum)
{
tsProgBar.Value = 0;
}
tsProgBar.Invalidate();
}), "");
}
/// <summary>
@@ -513,69 +544,52 @@ namespace IOB_MAN
// 2020.02.01 passato chiamata specifica x leggere in 1 sola volta TUTTO elenco processi (x nome)...
Process[] processList = Process.GetProcessesByName(TargetName);
if (doParallel)
// ciclo
Parallel.ForEach(allItems, item =>
{
// ciclo
Parallel.ForEach(allItems, item =>
needRem = checkIstance(item, item2rem, processList);
}
);
// aggiorno datagrid!
dgvManagedItems.Invalidate();
}
private bool checkIstance(iobAdapt item, List<iobAdapt> item2rem, Process[] processList)
{
bool needRem;
// verifico se esista il processo...
try
{
if (processList.Length > 0)
{
// verifico se esista il processo...
try
{
if (processList.Length > 0)
{
Process p = myGetProcByID(processList, item.pID);
needRem = p.HasExited;
}
else
{
needRem = true;
}
}
catch
{
needRem = true;
}
if (needRem)
{
item2rem.Add(item);
item.isRunning = false;
numProcRunning--;
}
else
{
item.isRunning = true;
}
Process p = myGetProcByID(processList, item.pID);
needRem = p.HasExited;
}
);
else
{
needRem = true;
}
}
catch
{
needRem = true;
}
if (needRem)
{
if (!item2rem.Contains(item))
{
item2rem.Add(item);
}
item.isRunning = false;
numProcRunning--;
}
else
{
foreach (iobAdapt item in allItems)
{
// verifico se esista il processo...
try
{
Process p = myGetProcByID(processList, item.pID);
needRem = p.HasExited;
}
catch
{
needRem = true;
}
if (needRem)
{
item2rem.Add(item);
item.isRunning = false;
numProcRunning--;
}
else
{
item.isRunning = true;
}
}
item.isRunning = true;
}
// aggiorno datagrid!
dgvManagedItems.Invalidate();
return needRem;
}
private void IOBManPanel_FormClosing(object sender, FormClosingEventArgs e)
@@ -583,7 +597,16 @@ namespace IOB_MAN
closeAllChild(true);
Thread.Sleep(500);
closeAllChild(true);
closeTimers();
}
private void closeTimers()
{
MainTimer.Dispose();
forceCheckTimer.Dispose();
UI_Timer.Dispose();
}
/// <summary>
/// Chiude tutti i child
/// </summary>
@@ -860,14 +883,14 @@ namespace IOB_MAN
private void chkAutoRestart_CheckedChanged(object sender, EventArgs e)
{
// se tolgo autorestart --> imposto NUOVA scadenza x forzare check
tOutAutocheck = 60 * utils.CRI("autoRestartTimeoutMin") * (1000 / (utils.CRI("checkPeriod") * utils.CRI("chekMult")));
tOutAutocheck = 60 * utils.CRI("autoRestartTimeoutMin") * (1000 / (utils.CRI("checkPeriod")));
// fa subito controllo riavvio...
processAutoRestart();
}
private void btnMoreTOut_Click(object sender, EventArgs e)
{
tOutAutocheck += 60 * utils.CRI("autoRestartTimeoutMin") * (1000 / (utils.CRI("checkPeriod") * utils.CRI("chekMult")));
tOutAutocheck += 60 * utils.CRI("autoRestartTimeoutMin") * (1000 / (utils.CRI("checkPeriod")));
}
private void txtTOutAutoCheck_TextChanged(object sender, EventArgs e)
+6
View File
@@ -126,6 +126,12 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>420, 17</value>
</metadata>
<metadata name="UI_Timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>535, 17</value>
</metadata>
<metadata name="forceCheckTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>634, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
+30 -38
View File
@@ -1,69 +1,61 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace IOB_MAN.Properties
{
namespace IOB_MAN.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
// tramite uno strumento quale ResGen o Visual Studio.
// Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
// con l'opzione /str oppure ricompilare il progetto VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_MAN.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
/// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}
+13 -17
View File
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace IOB_MAN.Properties
{
namespace IOB_MAN.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
public static Settings Default {
get {
return defaultInstance;
}
}
+69 -42
View File
@@ -1,5 +1,6 @@
using Newtonsoft.Json;
using StackExchange.Redis;
using SteamWare.Logger;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -68,7 +69,7 @@ namespace IOB_MAN
/// <summary>
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto...
/// </summary>
public string redHash(string keyName)
public static string redHash(string keyName)
{
keyName = keyName.Replace("\\", "_");
string answ = keyName;
@@ -176,7 +177,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"redServInfo:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -194,7 +195,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"getRSV:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -214,7 +215,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"setRSV:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -237,7 +238,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"setRSV + ttl:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -255,7 +256,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in setRCI:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"setRCntI:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -273,7 +274,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in setRCD:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"setRCntD:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -293,7 +294,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in getRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"getRCnt:{Environment.NewLine}{exc}");
}
return answInt;
}
@@ -311,7 +312,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in resetRCnt:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"resetRCnt:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -329,7 +330,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in getRKeys:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"getRKeys:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -348,7 +349,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in setRKeys:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"setRKeys:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -367,7 +368,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in redKeyPresent per la key {2}:{0}{1}", Environment.NewLine, exc, key), tipoLog.EXCEPTION);
Logging.Instance.Error($"redKeyPresent:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -384,8 +385,10 @@ namespace IOB_MAN
RedisKey chiave = key;
answ = redKeyPresent(chiave);
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redKeyPresentSz:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -403,7 +406,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("Errore in redHashPresent per la key {2}{0}{1}", Environment.NewLine, exc, key), tipoLog.EXCEPTION);
Logging.Instance.Error($"redHashPresent:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -420,8 +423,10 @@ namespace IOB_MAN
RedisKey chiave = key;
answ = redHashPresent(chiave);
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redHashPresentSz:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -445,8 +450,10 @@ namespace IOB_MAN
i++;
}
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redGetHash:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -467,8 +474,10 @@ namespace IOB_MAN
answ.Add(item.Name, item.Value);
}
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redGetHashDict:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -488,8 +497,10 @@ namespace IOB_MAN
RedisValue valOut = cache.HashGet(chiave, campo);
answ = valOut.ToString();
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redGetHashField:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -515,8 +526,10 @@ namespace IOB_MAN
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redSaveHash:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -542,8 +555,10 @@ namespace IOB_MAN
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redSaveHashDict:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -573,8 +588,10 @@ namespace IOB_MAN
cache.HashSet(chiave, valori);
answ = true;
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redSaveHashList:{Environment.NewLine}{exc}");
}
}
return answ;
}
@@ -599,8 +616,10 @@ namespace IOB_MAN
}
//answ = true;
}
catch
{ }
catch (Exception exc)
{
Logging.Instance.Error($"redSaveHash:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -624,8 +643,10 @@ namespace IOB_MAN
}
//answ = true;
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redSaveHashDict:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -643,8 +664,10 @@ namespace IOB_MAN
cache.KeyDelete(chiave);
answ = true;
}
catch
{ }
catch(Exception exc)
{
Logging.Instance.Error($"redDelKey:{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
@@ -673,7 +696,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"redFlushKey:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -701,7 +724,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"redCountKey:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -722,8 +745,10 @@ namespace IOB_MAN
answ += server.DatabaseSize();
}
}
catch
{ }
catch (Exception exc)
{
Logging.Instance.Error($"numRecRedis:{Environment.NewLine}{exc}");
}
return answ;
}
}
@@ -757,7 +782,7 @@ namespace IOB_MAN
}
catch (Exception exc)
{
//logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION);
Logging.Instance.Error($"redGetCounterByKey 01:{Environment.NewLine}{exc}");
}
// ora recupero valori!
var valori = getRKeys(chiavi);
@@ -771,8 +796,10 @@ namespace IOB_MAN
answ.Add(new KeyValuePair<string, int>(chiavi[i], currVal));
}
}
catch
{ }
catch (Exception exc)
{
Logging.Instance.Error($"redGetCounterByKey 02:{Environment.NewLine}{exc}");
}
// se richiesto riordino...
switch (orderBy)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

+7 -8
View File
@@ -10,7 +10,7 @@ namespace IOB_MAN
/// </summary>
protected DateTime scadIobStatus = DateTime.Now;
/// <summary>
///Ultimo status IOB letto
/// Ultimo status IOB letto
/// </summary>
protected IobWinStatus lastIobStatus { get; set; }
/// <summary>
@@ -24,7 +24,6 @@ namespace IOB_MAN
if (scadIobStatus > DateTime.Now && lastIobStatus != null)
{
answ = lastIobStatus;
//answ = lastIobStatus != null ? lastIobStatus : redisMan.iobStatus;
}
else
{
@@ -54,7 +53,7 @@ namespace IOB_MAN
/// <summary>
/// Calcola uptime processo...
/// </summary>
[DisplayName("Uptime")]
[DisplayName("Uptime Total")]
public string uptime
{
get
@@ -71,7 +70,7 @@ namespace IOB_MAN
/// <summary>
/// Verifica se il processo sia in RUN
/// </summary>
[DisplayName("Running")]
[DisplayName("Run")]
public bool isRunning { get; set; }
/// <summary>
/// Gestore processi redis
@@ -91,7 +90,7 @@ namespace IOB_MAN
/// <summary>
/// Counter dell'IOB
/// </summary>
[DisplayName("pz IOB")]
[DisplayName("pz.IOB")]
public int iobCounter
{
get
@@ -102,7 +101,7 @@ namespace IOB_MAN
/// <summary>
/// Counter del CNC
/// </summary>
[DisplayName("pz MAC")]
[DisplayName("pz.CNC")]
public int cncCounter
{
get
@@ -113,7 +112,7 @@ namespace IOB_MAN
/// <summary>
/// lunghezza coda EVENTI
/// </summary>
[DisplayName("coda EV")]
[DisplayName("# EV")]
public int queueElLen
{
get
@@ -124,7 +123,7 @@ namespace IOB_MAN
/// <summary>
/// lunghezza coda FLog
/// </summary>
[DisplayName("coda FL")]
[DisplayName("# FL")]
public int queueFlLen
{
get
+6 -15
View File
@@ -1,33 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AIM" version="1.0.3" targetFramework="net461" />
<package id="AjaxControlToolkit" version="19.1.0" targetFramework="net461" />
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net461" />
<package id="DnsClient" version="1.2.0" targetFramework="net461" />
<package id="MapoSDK" version="6.9.2001.1283" targetFramework="net461" />
<package id="Microsoft.CodeAnalysis.FxCopAnalyzers" version="2.9.8" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.CodeAnalysis.VersionCheckAnalyzer" version="2.9.8" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.CodeQuality.Analyzers" version="2.9.8" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.NetCore.Analyzers" version="2.9.8" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.NETCore.Platforms" version="3.1.0" targetFramework="net461" />
<package id="Microsoft.NetFramework.Analyzers" version="2.9.8" targetFramework="net461" developmentDependency="true" />
<package id="MongoDB.Bson" version="2.10.1" targetFramework="net461" />
<package id="MongoDB.Driver" version="2.10.1" targetFramework="net461" />
<package id="MongoDB.Driver.Core" version="2.10.1" targetFramework="net461" />
<package id="MapoSDK" version="6.9.2002.1287" targetFramework="net461" />
<package id="MongoDB.Bson" version="2.10.2" targetFramework="net461" />
<package id="MongoDB.Driver" version="2.10.2" targetFramework="net461" />
<package id="MongoDB.Driver.Core" version="2.10.2" targetFramework="net461" />
<package id="MongoDB.Libmongocrypt" version="1.0.0" targetFramework="net461" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" />
<package id="NLog.Config" version="4.6.8" targetFramework="net461" />
<package id="NLog.Schema" version="4.6.8" targetFramework="net461" />
<package id="PDFsharp" version="1.50.5147" targetFramework="net461" />
<package id="Pipelines.Sockets.Unofficial" version="2.1.1" targetFramework="net461" />
<package id="PrettyBin" version="1.1.0" targetFramework="net461" />
<package id="SharpCompress" version="0.24.0" targetFramework="net461" />
<package id="SharpZipLib" version="1.2.0" targetFramework="net461" />
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net461" />
<package id="StackExchange.Redis" version="2.0.601" targetFramework="net461" />
<package id="SteamWare" version="3.5.2002.715" targetFramework="net461" />
<package id="SteamWare.IO" version="4.0.2002.731" targetFramework="net462" />
<package id="SteamWare.Logger" version="4.0.2002.727" targetFramework="net462" />
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
<package id="System.Diagnostics.PerformanceCounter" version="4.7.0" targetFramework="net461" />
<package id="System.IO.Pipelines" version="4.7.0" targetFramework="net461" />
+34 -13
View File
@@ -40,13 +40,16 @@ namespace IOB_MAN
/// Helper formattazione durata human readable
/// </summary>
/// <param name="timeSpan"></param>
/// <param name="textMode">textMode = come linguaggio scritto</param>
/// <returns></returns>
public static string FormatTimeSpan(TimeSpan timeSpan)
public static string FormatTimeSpan(TimeSpan timeSpan, bool textMode=false)
{
//Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1} {t.Item2}{(t.Item1 == 1 ? string.Empty : "s")}";
//Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1}{t.Item2}";
Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1} {(t.Item1 == 1 ? t.Item2 : t.Item2.Replace("giorno", "giorni").Replace("ora", "ore"))}";
var components = new List<Tuple<int, string>>
if (textMode)
{
//Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1} {t.Item2}{(t.Item1 == 1 ? string.Empty : "s")}";
//Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1}{t.Item2}";
Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1} {(t.Item1 == 1 ? t.Item2 : t.Item2.Replace("giorno", "giorni").Replace("ora", "ore"))}";
var components = new List<Tuple<int, string>>
{
Tuple.Create((int) timeSpan.TotalDays, "giorno"),
Tuple.Create(timeSpan.Hours, "ora"),
@@ -54,18 +57,36 @@ namespace IOB_MAN
Tuple.Create(timeSpan.Seconds, "sec"),
};
components.RemoveAll(i => i.Item1 == 0);
components.RemoveAll(i => i.Item1 == 0);
string extra = "";
string extra = "";
if (components.Count > 1)
{
var finalComponent = components[components.Count - 1];
components.RemoveAt(components.Count - 1);
extra = $" e {tupleFormatter(finalComponent)}";
if (components.Count > 1)
{
var finalComponent = components[components.Count - 1];
components.RemoveAt(components.Count - 1);
extra = $" e {tupleFormatter(finalComponent)}";
}
return $"{string.Join(", ", components.Select(tupleFormatter))}{extra}";
}
else
{
//Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1} {t.Item2}{(t.Item1 == 1 ? string.Empty : "s")}";
//Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1}{t.Item2}";
Func<Tuple<int, string>, string> tupleFormatter = t => $"{t.Item1:00}";
var components = new List<Tuple<int, string>>
{
Tuple.Create((int) timeSpan.TotalDays, "g"),
Tuple.Create(timeSpan.Hours, ""),
Tuple.Create(timeSpan.Minutes, ""),
Tuple.Create(timeSpan.Seconds, ""),
};
return $"{string.Join(", ", components.Select(tupleFormatter))}{extra}";
//components.RemoveAll(i => i.Item1 == 0);
return $"{string.Join(":", components.Select(tupleFormatter))}";
}
}
#region utils lettura app.config
+5
View File
@@ -18,6 +18,11 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CVCncLib", "CVCncLib\CVCncL
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-MAN", "IOB-MAN\IOB-MAN.csproj", "{8DFE2AC9-611D-44D5-8E8F-204DCF01EDF8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B52E3E86-1B82-4F4D-982C-0C8909CD2A28}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CMS-FANUC|Any CPU = CMS-FANUC|Any CPU
-2
View File
@@ -1177,8 +1177,6 @@ namespace IOB_WIN
// init max queue
maxEvQueue = 1;
maxFlQueue = 1;
// forzo check allarmi..
iobObj.forceAlarmCheck();
try
{
-7
View File
@@ -472,13 +472,6 @@ namespace IOB_WIN
{
dtAvvioAdp = DateTime.Now;
if (adpRunning)
{
// carico status allarmi (completo)
lgInfo("Inizio refresh completo stato allarmi...");
forceAlarmCheck();
lgInfo("Completato refresh completo stato allarmi!");
}
else
{
lgInfo("Connessione OK");
}
+29 -24
View File
@@ -265,7 +265,7 @@ namespace IOB_WIN
/// <summary>
/// Verifica se sia in modalità DEMO avanzata (campionamento da set di valori ammessi...)
/// </summary>
public bool DemoInSample
public static bool DemoInSample
{
get
{
@@ -291,7 +291,7 @@ namespace IOB_WIN
/// <summary>
/// Verifica se sia in modalità DEMO x dati OUTPUT
/// </summary>
public bool DemoOut
public static bool DemoOut
{
get
{
@@ -1423,9 +1423,9 @@ namespace IOB_WIN
private void svuotaCodaContapezzi()
{
// se ho contapezzi OLTRE limite...
while (lastCountCNC > contapezzi + minSendPzCountBlock)
while ((MPOnline) && (lastCountCNC > contapezzi + minSendPzCountBlock))
{
lgInfo("Inizio svuotaCodaContapezzi");
lgInfo($"Inizio svuotaCodaContapezzi --> lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
pzCntReload(true);
// provo invio
trySendPzCountBlock();
@@ -1712,10 +1712,10 @@ namespace IOB_WIN
/// <summary>
/// processa dataLayer e se necessario salva/mostra
/// </summary>
public void checkSavePersDataLayer()
public static void checkSavePersDataLayer()
{
}
public void resetDebugConsole()
public static void resetDebugConsole()
{
}
@@ -2090,7 +2090,7 @@ namespace IOB_WIN
/// <param name="memSize">dimensione singolo slot in byte</param>
/// <param name="BitNum">indirizzo bit: numero riga x calcolo indice bit</param>
/// <returns></returns>
protected otherData decodeBitData(string linea, char separator, int ByteNum, int memSize, int BitNum)
protected static otherData decodeBitData(string linea, char separator, int ByteNum, int memSize, int BitNum)
{
string[] valori = linea.Split(separator);
int shift = 0;
@@ -2153,19 +2153,12 @@ namespace IOB_WIN
#endregion
/// <summary>
/// effettua ogni log period una rilettura di TUTTI gli allarmi...
/// </summary>
public virtual void forceAlarmCheck()
{
}
#region IOB METHODS
/// <summary>
/// Valore del num max invii consecutivi da coda...
/// </summary>
protected int nMaxSend
protected static int nMaxSend
{
get
{
@@ -2528,13 +2521,13 @@ namespace IOB_WIN
return answ;
}
}
public string GetMACAddress()
public static string GetMACAddress()
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
String sMacAddress = string.Empty;
foreach (NetworkInterface adapter in nics)
{
if (sMacAddress == String.Empty)// only return MAC Address from first card
if (string.IsNullOrEmpty(sMacAddress))// only return MAC Address from first card
{
IPInterfaceProperties properties = adapter.GetIPProperties();
//sMacAddress = adapter.GetPhysicalAddress().ToString();
@@ -2675,7 +2668,7 @@ namespace IOB_WIN
/// <summary>
/// Reset dei webclients
/// </summary>
public void resetwebClients()
public static void resetWebClients()
{
utils.resetWebClients();
}
@@ -2811,7 +2804,7 @@ namespace IOB_WIN
// se NON OK riprovo ANCORA 1 volta...
if (!answ)
{
resetwebClients();
resetWebClients();
Thread.Sleep(rand.Next(500, 1000));
callResp = callUrl(urlAlive, false);
answ = (callResp == "OK");
@@ -2908,7 +2901,7 @@ namespace IOB_WIN
// se NON OK riprovo ANCORA 1 volta...
if (!answ)
{
resetwebClients();
resetWebClients();
Thread.Sleep(rand.Next(250, 1000));
callResp = callUrl(urlIobEnabled, false);
answ = (callResp == "OK");
@@ -3326,8 +3319,6 @@ namespace IOB_WIN
// verifico se la funzione SIA abilitata
if (enableSendPzCountBlock)
{
//// rileggo qta da server...
//pzCntReload(true);
int delta = lastCountCNC - contapezzi;
// se è abilitata verifico differenza: se ho DELTA > minSendPzCountBlock --> invio un blocco <= maxSendPzCountBlock
if (delta > minSendPzCountBlock)
@@ -3345,10 +3336,16 @@ namespace IOB_WIN
int.TryParse(resp, out qtyAdded);
if (qtyAdded > 0)
{
lgInfo($"Inviato incremento contapezzi: send {numIncr} | resp {qtyAdded}");
// aggiorno IL MIO contapezzi...
contapezzi += qtyAdded;
lgInfo($"Inviato incremento contapezzi: send: {numIncr} | resp: {qtyAdded} | contapezzi: {contapezzi}");
// invio conferma contapezzi..
string retVal = utils.callUrl($"{urlSetPzCount}{contapezzi}");
}
else
{
lgError($"Richiesto incremento {numIncr} ma NON registrato su server MP-IO");
}
}
currDispData.newUrlCallData = lastUrl;
currDispData.counter = contapezzi;
@@ -3357,6 +3354,14 @@ namespace IOB_WIN
}
}
}
else
{
lgInfo("Impossibile trySendPzCountBlock: IobOnline è false");
}
}
else
{
lgInfo("Impossibile trySendPzCountBlock: MPOnline è false");
}
}
/// <summary>
@@ -3773,7 +3778,7 @@ namespace IOB_WIN
}
/// <summary>
/// Effettua processing del recupero delle speed (RPM, feedrate) degli assi
/// Effettua processing degli allarmi CNC SE disponibili
/// </summary>
public void processCncAlarms()
{
+42 -38
View File
@@ -317,7 +317,7 @@ namespace IOB_WIN
KAWASAKI_ref = new KRcc.Commu(connPar);
//KAWASAKI_ref = new KRcc.Commu("TCP 192.168.0.92");
// disconnetto e connetto...
if (isVerboseLog)
if (isVerboseLog)
{
lgInfo("KAWASAKI: tryDisconnect");
}
@@ -326,7 +326,7 @@ namespace IOB_WIN
//lgInfo("KAWASAKI: tryConnect");
//tryConnect();
lgInfo("End init Adapter KAWASAKI");
if (isVerboseLog)
if (isVerboseLog)
{
lgInfo("KAWASAKI CONNESSIONE AVVENUTA");
}
@@ -433,13 +433,6 @@ namespace IOB_WIN
if (connectionOk)
{
if (adpRunning)
{
// carico status allarmi (completo)
lgInfo("Inizio refresh completo stato allarmi...");
forceAlarmCheck();
lgInfo("Completato refresh completo stato allarmi!");
}
else
{
lgInfo("Connessione OK");
}
@@ -902,46 +895,57 @@ namespace IOB_WIN
lastWarnODL = DateTime.Now;
}
}
if (currODL != null && currODL != "" && currODL != "0")
if (!string.IsNullOrEmpty(currODL))
{
// ora processo il contapezzi...
// controllo se è passato intervallo minimo tra 2 controlli/elaborazioni x distanziare invio e ridurre letture
if (DateTime.Now >= lastPzCountSend.AddMilliseconds(pzCountDelay))
if (currODL != "0")
{
// se sono differenti MOSTRO...
if (lastCountCNC != contapezzi)
// ora processo il contapezzi...
// controllo se è passato intervallo minimo tra 2 controlli/elaborazioni x distanziare invio e ridurre letture
if (DateTime.Now >= lastPzCountSend.AddMilliseconds(pzCountDelay))
{
// registro contapezzi
lgInfo(string.Format("Differenza Contapezzi: READ: {0} | Interno {1}", lastCountCNC, contapezzi));
}
// verifico se variato contapezzi... e se passato ritardo minimo...
if (lastCountCNC > contapezzi)
{
// salvo nuovo contapezzi (incremento di 1...)
contapezzi++;
// salvo in semaforo!
B_input += (1 << 2);
// registro contapezzi
lgInfo(string.Format("Contapezzi KAWASAKI: {0} | Contapezzi interno {1}", lastCountCNC, contapezzi));
}
// se sono differenti MOSTRO...
if (lastCountCNC != contapezzi)
{
// registro contapezzi
lgInfo($"Differenza Contapezzi CNC/IOB: lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
}
// verifico se variato contapezzi... e se passato ritardo minimo...
if (lastCountCNC > contapezzi)
{
// salvo nuovo contapezzi (incremento di 1...)
contapezzi++;
// salvo in semaforo!
B_input += (1 << 2);
// registro contapezzi
lgInfo(string.Format("Contapezzi KAWASAKI: {0} | Contapezzi interno {1}", lastCountCNC, contapezzi));
}
else if (contapezzi > lastCountCNC)
{
lgInfo($"Contapezzi IOB > CNC --> NON INVIO (CNC: {lastCountCNC} < IOB: {contapezzi})");
}
// invio a server contapezzi (aggiornato)
string retVal = utils.callUrl(urlSetPzCount + contapezzi.ToString());
// verifica se tutto OK
if (retVal != "OK")
{
// errore salvataggio contapezzi
lgInfo(string.Format("Errore salvataggio Contapezzi KAWASAKI {0} | Contapezzi interno {1} | Errore salvataggio: {2}", lastCountCNC, contapezzi, retVal));
// invio a server contapezzi (aggiornato)
string retVal = utils.callUrl(urlSetPzCount + contapezzi.ToString());
// verifica se tutto OK
if (retVal != "OK")
{
// errore salvataggio contapezzi
lgInfo(string.Format("Errore salvataggio Contapezzi KAWASAKI {0} | Contapezzi interno {1} | Errore salvataggio: {2}", lastCountCNC, contapezzi, retVal));
}
// resetto timer...
lastPzCountSend = DateTime.Now;
}
// resetto timer...
lastPzCountSend = DateTime.Now;
}
else
{
lgError("Attenzione non trovato ODL --> currODL = 0");
}
}
else
{
if (DateTime.Now >= lastPzCountSend.AddMilliseconds(pzCountDelay))
{
lgInfo(string.Format("Attenzione: mancanza ODL non procedo con gestione contapezzi. Contapezzi KAWASAKI {0} | Contapezzi interno {1}", lastCountCNC, contapezzi));
lgError(string.Format("Attenzione: mancanza ODL non procedo con gestione contapezzi. Contapezzi KAWASAKI {0} | Contapezzi interno {1}", lastCountCNC, contapezzi));
// resetto timer...
lastPzCountSend = DateTime.Now;
}
-15
View File
@@ -820,13 +820,6 @@ namespace IOB_WIN
if (connectionOk)
{
if (adpRunning)
{
// carico status allarmi (completo)
lgInfo("Inizio refresh completo stato allarmi...");
forceAlarmCheck();
lgInfo("Completato refresh completo stato allarmi!");
}
else
{
lgInfo("Connessione OK");
}
@@ -868,14 +861,6 @@ namespace IOB_WIN
#region Metodi specifici (da verificare/completare in implementazione)
/// <summary>
/// controllo allarmi
/// </summary>
public override void forceAlarmCheck()
{
// controllo tutta la memoria allarmi SE richiesto
}
/// <summary>
/// Effettua vero processing contapezzi
/// </summary>
+27 -29
View File
@@ -43,24 +43,29 @@ namespace IOB_WIN
pzCountDelay = utils.CRI("pzCountDelay");
lastPzCountSend = DateTime.Now;
lastWarnODL = DateTime.Now;
// inizializzo correttamente aree memoria secondo CONF - iniFileName
IniFile fIni = new IniFile(IOBConf.iniFileName);
// fix enable prgName
enablePrgName = fIni.ReadBoolean("CNC", "GETPRGNAME", true);
// effettuo lettura della conf sigLUT... cercando 1:1 i bit...
string currBit = "";
string memArea = "";
for (int i = 0; i < 8; i++)
if (IOBConf != null)
{
currBit = string.Format("BIT{0}", i);
memArea = fIni.ReadString("MEMORY", currBit, "");
// se trovo un valore...
if (memArea != "")
// inizializzo correttamente aree memoria secondo CONF - iniFileName
if (!string.IsNullOrEmpty(IOBConf.iniFileName))
{
signLUT.Add(currBit, memArea);
IniFile fIni = new IniFile(IOBConf.iniFileName);
// fix enable prgName
enablePrgName = fIni.ReadBoolean("CNC", "GETPRGNAME", true);
// effettuo lettura della conf sigLUT... cercando 1:1 i bit...
string currBit = "";
string memArea = "";
for (int i = 0; i < 8; i++)
{
currBit = string.Format("BIT{0}", i);
memArea = fIni.ReadString("MEMORY", currBit, "");
// se trovo un valore...
if (!string.IsNullOrEmpty(memArea))
{
signLUT.Add(currBit, memArea);
}
}
}
}
@@ -84,13 +89,13 @@ namespace IOB_WIN
}
parentForm.commPlcActive = false;
if (isVerboseLog)
if (isVerboseLog)
{
lgInfo(string.Format("INIT OSAI_ref da CncLib come {0}", IOBConf.tipoIob));
}
// disconnetto e connetto...
if (isVerboseLog)
if (isVerboseLog)
{
lgInfo("OSAI: tryDisconnect");
}
@@ -124,7 +129,7 @@ namespace IOB_WIN
try
{
// verifico quale modalità sia richiesta: STD (6711) oppure BIT (Custom, con indicazione area)
if (cIobConf.optPar.Count > 0 && getOptPar("PZCOUNT_MODE") != "")
if (cIobConf.optPar.Count > 0 && !string.IsNullOrEmpty(getOptPar("PZCOUNT_MODE")))
{
if (getOptPar("PZCOUNT_MODE").StartsWith("OVAR"))
{
@@ -234,13 +239,6 @@ namespace IOB_WIN
{
dtAvvioAdp = DateTime.Now;
if (adpRunning)
{
// carico status allarmi (completo)
lgInfo("Inizio refresh completo stato allarmi...");
forceAlarmCheck();
lgInfo("Completato refresh completo stato allarmi!");
}
else
{
lgInfo("Connessione OK");
}
@@ -346,7 +344,7 @@ namespace IOB_WIN
{
currODL = utils.callUrl(urlGetCurrODL);
// solo SE HO un ODL...
if (currODL == "" || currODL == "0")
if (string.IsNullOrEmpty(currODL) || currODL == "0")
{
if (periodicLog)
{
@@ -368,7 +366,7 @@ namespace IOB_WIN
lastWarnODL = DateTime.Now;
}
}
if (currODL != null && currODL != "" && currODL != "0")
if (!string.IsNullOrEmpty(currODL) && currODL != "0")
{
// controllo se è passato intervallo minimo tra 2 controlli/elaborazioni x distanziare invio e ridurre letture
if (DateTime.Now >= lastPzCountSend.AddMilliseconds(pzCountDelay))
@@ -474,7 +472,7 @@ namespace IOB_WIN
try
{
// verifico quale modalità sia richiesta: STD (6711) oppure BIT (Custom, con indicazione area)
if (cIobConf.optPar.Count > 0 && getOptPar("PZCOUNT_MODE") != "")
if (cIobConf.optPar.Count > 0 && !string.IsNullOrEmpty(getOptPar("PZCOUNT_MODE")))
{
string memAddr = getOptPar("PZCOUNT_MODE");
if (memAddr.StartsWith("STD"))
+1 -15
View File
@@ -271,17 +271,10 @@ namespace IOB_WIN
// imposto i parametri...
setParamPlc();
connectionOk = true;
// refresh stato allarmi!!!
// refresh stato connessione!!!
if (connectionOk)
{
if (adpRunning)
{
// carico status allarmi (completo)
lgInfo("Inizio refresh completo stato allarmi...");
forceAlarmCheck();
lgInfo("Completato refresh completo stato allarmi!");
}
else
{
lgInfo("Connessione OK");
}
@@ -323,13 +316,6 @@ namespace IOB_WIN
#region Metodi specifici (da verificare/completare in implementazione)
/// <summary>
/// controllo allarmi
/// </summary>
public override void forceAlarmCheck()
{
// controllo tutta la memoria allarmi SE richiesto
}
/// <summary>
/// Oggetto per lettura PESO rilevato (DM20-21)
/// </summary>
-7
View File
@@ -993,13 +993,6 @@ namespace IOB_WIN
if (connectionOk)
{
if (adpRunning)
{
// carico status allarmi (completo)
lgInfo("Inizio refresh completo stato allarmi...");
forceAlarmCheck();
lgInfo("Completato refresh completo stato allarmi!");
}
else
{
lgInfo("Connessione OK");
}
+6 -3
View File
@@ -205,10 +205,8 @@ namespace IOB_WIN
// registro contapezzi
lgInfo($"Differenza Contapezzi: CNC READ: {lastCountCNC} | Interno IOB {contapezzi}");
}
// verifico se variato contapezzi... e se passato ritardo minimo...
if ((lastCountCNC - contapezzi) > minSendPzCountBlock)
if ((lastCountCNC > contapezzi))
{
trySendPzCountBlock();
// salvo nuovo contapezzi (incremento di 1...)
contapezzi++;
// salvo in semaforo!
@@ -216,6 +214,11 @@ namespace IOB_WIN
// registro contapezzi
lgInfo($"Contapezzi SIEMENST-TORRI: {lastCountCNC} | Contapezzi interno IOB {contapezzi}");
}
// verifico se variato contapezzi... e se passato ritardo minimo...
if ((lastCountCNC - contapezzi) > minSendPzCountBlock)
{
trySendPzCountBlock();
}
// invio a server contapezzi (aggiornato)
retVal = utils.callUrlNow(urlSetPzCount + contapezzi.ToString());
+3 -3
View File
@@ -72,11 +72,11 @@ namespace IOB_WIN
lgInfo("BEGIN reloadAdapterConf");
// inizializzo LUT decodifica
string jsonConf = getOptPar("LUT_CONF");
if (jsonConf != "")
if (!string.IsNullOrEmpty(jsonConf))
{
StreamReader reader = new StreamReader($"DATA/CONF/{jsonConf}");
string jsonData = reader.ReadToEnd();
if (jsonData != "")
if (!string.IsNullOrEmpty(jsonData))
{
try
{
@@ -246,7 +246,7 @@ namespace IOB_WIN
element = driver.FindElement(By.Id(item.val));
cVal = element.Text;
// verifico nome o key...
if (item.name != "")
if (!string.IsNullOrEmpty(item.name))
{
cKey = item.name;
}
+7 -5
View File
@@ -29,6 +29,7 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lblApp = new System.Windows.Forms.ToolStripStatusLabel();
this.lblVers = new System.Windows.Forms.ToolStripStatusLabel();
@@ -71,10 +72,10 @@
this.lblStatus,
this.toolStripStatusLabel1,
this.tslRunTime});
this.statusStrip1.Location = new System.Drawing.Point(0, 633);
this.statusStrip1.Location = new System.Drawing.Point(0, 507);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 10, 0);
this.statusStrip1.Size = new System.Drawing.Size(786, 23);
this.statusStrip1.Size = new System.Drawing.Size(713, 23);
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
//
@@ -138,7 +139,7 @@
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(786, 24);
this.menuStrip1.Size = new System.Drawing.Size(713, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
@@ -271,14 +272,15 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(786, 656);
this.ClientSize = new System.Drawing.Size(713, 530);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsMdiContainer = true;
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "MainForm";
this.Text = "IOB MANAGER";
this.Text = "IOB WIN";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Resize += new System.EventHandler(this.MainForm_Resize);
+11 -3
View File
@@ -379,8 +379,10 @@ namespace IOB_WIN
notifyIcon1.Icon = Icon.ExtractAssociatedIcon(utils.defIconFilePath);
// fix versione!
lblApp.Text = $"{ConfigurationManager.AppSettings.Get("appName")} ({ModoAvvio})";
lblVers.Text = string.Format(" v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
string nomeApp = $"{ConfigurationManager.AppSettings.Get("appName")} ({ModoAvvio})";
string versione = $" v.{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
lblApp.Text = nomeApp;
lblVers.Text = versione;
#if DEBUG
@@ -402,6 +404,12 @@ namespace IOB_WIN
lg = LogManager.GetCurrentClassLogger();
displayTaskAndLog("MainForm Starting");
// salvo versione SW!
lgInfo("------ STARTUP DATA ------");
lgInfo($"App Mode : {nomeApp}");
lgInfo($"Versione : {versione}");
lgInfo("--------------------------");
// se abilitato autoload conf leggo file corretto...
if (utils.CRB("autoLoadConf"))
{
@@ -421,7 +429,7 @@ namespace IOB_WIN
{
displayTaskAndLog("Waiting for config file selection");
}
displayTaskAndLog("Program Running");
createTrayMenu();
displayTaskAndLog("Tray Menu OK");
File diff suppressed because it is too large Load Diff
+11
View File
@@ -6,6 +6,17 @@
<br />
Note di rilascio:
<ul>
<li>
<b>v.2.6.* &rarr; v.3.0.*</b>
<ul>
<li>revisione sistema metodi invio in blocco</li>
<li>Gestione invio contapezzi in step > 1</li>
<li>Gestione eventi in blocco (indipendente e prioritario su EvBlock)</li>
<li>Gestione limite eventi memorizzabili</li>
<li>Integrazione REDIS</li>
<li>Integrazione IOB-MAN</li>
</ul>
</li>
<li>
<b>v.2.5.* &rarr; v.2.6.*</b>
<ul>
Vendored
+31 -9
View File
@@ -9,7 +9,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=661']) {
withEnv(['NEXT_BUILD_NUMBER=673']) {
// 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'
@@ -77,19 +77,11 @@ pipeline {
// a seconda del branch decido cosa e come compilare e caricare...
script {
if(env.BRANCH_NAME == "IobMan") {
// // CAMBIO numero versione in file sorgente!!!
// bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
// // checkout NuGet in file sorgente!!!
// fixNuget("${WORKSPACE}\\IOB-WIN.sln")
// BUILD!
bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m"
}
// procedo solo se NON si tratta di commit in ramo DOCUMentazione...
else if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("master") ) {
// // CAMBIO numero versione in file sorgente!!!
// bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
// // checkout NuGet in file sorgente!!!
// fixNuget("${WORKSPACE}\\IOB-WIN.sln")
// BUILD!
bat "\"${tool 'MSBuild-16.0'}\" IOB-WIN/IOB-WIN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m"
}
@@ -156,6 +148,36 @@ pipeline {
bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\IOB-WIN\\${env.versionNumber}\\ "
// copio in area WebDeploy
bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\IOB-WIN\\${env.BRANCH_NAME}\\ "
// fix classificazione x develop/master...
if (env.BRANCH_NAME == "develop")
{
// env.classifier = "unstable"
env.version = "unstable"
}
else
{
// env.classifier = ""
env.version = "stable"
}
// ora mi occupo delle operazioni di invio a NEXUS...
nexusArtifactUploader(
nexusVersion: 'nexus3',
protocol: 'http',
nexusUrl: 'nexus.steamware.net',
groupId: 'MAPO',
//version: "${env.versionNumber}",
version: "${env.version}",
repository: 'utility',
credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5',
artifacts: [
[artifactId: 'IOB-WIN',
classifier: "",
// classifier: "${env.classifier}",
file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip",
type: 'zip']
]
)
}
else
{