Compare commits

..

1 Commits

Author SHA1 Message Date
Marco Locatelli ea6713ebb3 Update README.md 2024-09-20 13:16:33 +00:00
24 changed files with 558 additions and 1211 deletions
+11 -67
View File
@@ -3,15 +3,13 @@ variables:
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
SOL_NAME: 'SteamWare' SOL_NAME: 'SteamWare'
APP_NAME: 'SteamWare' APP_NAME: 'SteamWare'
NUM_PACK: '0.0.0.0'
NUM_REL: '0.1.2.3' NUM_REL: '0.1.2.3'
NUM_DEB: '0.1.2-beta.3' NUM_DEB: '0.1.2-beta.3'
CONFIG: '' CONFIG: ''
VERS_MAIN: '5.4' VERS_MAIN: '5.3'
NEW_COPYRIGHT: 'Egalware @' NEW_COPYRIGHT: 'Egalware @'
NET_SHARE_X: '\\codedoc.egalware.com\library' NET_SHARE_X: '\\codedoc.egalware.com\library'
NET_USER_X: 'gitlab' NET_USER_X: 'gitlab'
NU_TYPE: 'Release'
.DocReplica: &DocReplica .DocReplica: &DocReplica
- | - |
@@ -47,37 +45,8 @@ variables:
$newContenuto | Set-Content -Path $fileNameAss $newContenuto | Set-Content -Path $fileNameAss
# display versioni generate # display versioni generate
$resoconto = "Effettuato fix file nuspec | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB; $resoconto = "Effettuato fix file nuspec | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
# sistemo anche versioni in file nuspec
Write-Output $resoconto; Write-Output $resoconto;
# helper x fix nuspec file: se debug aggiunge -beta nel blocco 3 del SemVer
.nuspec-fix: &nuspec-fix
- |
echo "Modifica dati versione pacchetto nuspec"
$fileNameRel = "$env:APP_NAME/$env:APP_NAME.nuspec";
$fileContent = Get-Content $fileNameRel -Raw;
$pattern = '(?i)<version>\s*(.*?)\s*</version>'
$vers = if ($fileContent -match $pattern) { $matches[1] } else { $null }
echo "Versione corrente: $vers | NugetType: $env:NU_TYPE"
if ($env:NU_TYPE -eq "Debug")
{
# $env:NUM_PACK = $vers -replace '^(\d+)\.(\d+)\.(\d+)\.(\d+)$', '$1.$2.$3-beta.$4'
$env:NUM_PACK = $env:NUM_DEB
}
elseif($env:NU_TYPE -eq "Release")
{
$env:NUM_PACK = $env:NUM_REL
}
echo "Versione calcolata: $env:NUM_PACK"
$findVers = "<version>(.|\n)*?</version>";
$replVers = "<version>" + $env:NUM_PACK + "</version>";
$newContent = $fileContent -replace $findVers, $replVers;
Set-Content -Path $fileNameRel -Value $newContent;
echo "Modifica dati file progetto x nuspec completata su file $fileNameRel"
echo "-----------------------------"
echo "$newContent"
echo "-----------------------------"
stages: stages:
- build - build
- staging - staging
@@ -170,7 +139,6 @@ SteamWare.IO:staging:
variables: variables:
CONFIG: Debug CONFIG: Debug
APP_NAME: SteamWare.IO APP_NAME: SteamWare.IO
NU_TYPE: Debug
except: except:
refs: refs:
- main - main
@@ -181,9 +149,7 @@ SteamWare.IO:staging:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -195,7 +161,6 @@ SteamWare.Logger:staging:
variables: variables:
CONFIG: Debug CONFIG: Debug
APP_NAME: SteamWare.Logger APP_NAME: SteamWare.Logger
NU_TYPE: Debug
except: except:
refs: refs:
- main - main
@@ -206,9 +171,7 @@ SteamWare.Logger:staging:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -220,7 +183,6 @@ SteamWare:staging:
variables: variables:
CONFIG: Debug CONFIG: Debug
APP_NAME: SteamWare APP_NAME: SteamWare
NU_TYPE: Debug
except: except:
refs: refs:
- main - main
@@ -231,9 +193,7 @@ SteamWare:staging:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -245,7 +205,6 @@ SteamWare.Reports:staging:
variables: variables:
CONFIG: Debug CONFIG: Debug
APP_NAME: SteamWare.Reports APP_NAME: SteamWare.Reports
NU_TYPE: Debug
except: except:
refs: refs:
- main - main
@@ -256,9 +215,7 @@ SteamWare.Reports:staging:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -270,7 +227,6 @@ SteamWare.Scheduler:staging:
variables: variables:
CONFIG: Debug CONFIG: Debug
APP_NAME: SteamWare.Scheduler APP_NAME: SteamWare.Scheduler
NU_TYPE: Debug
except: except:
refs: refs:
- main - main
@@ -281,9 +237,7 @@ SteamWare.Scheduler:staging:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_DEB -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_DEB'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -308,9 +262,7 @@ SteamWare.IO:release:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -332,9 +284,7 @@ SteamWare.Logger:release:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -356,9 +306,7 @@ SteamWare:release:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -380,9 +328,7 @@ SteamWare.Reports:release:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
@@ -404,9 +350,7 @@ SteamWare.Scheduler:release:
- *version-fix - *version-fix
script: script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m' - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
- *nuspec-fix - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" pack $env:APP_NAME\$env:APP_NAME.csproj -Build -Properties Configuration=$env:CONFIG -Version $env:NUM_REL -IncludeReferencedProjects'
#- '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.nuspec" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted' - '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
+5 -8
View File
@@ -1,15 +1,12 @@
# SteamWare # SteamWare
Libreria di utility condivise per progetti SteamWare C# .Net Framework. Libreria di utility condivise per progetti SteamWare C# .net
## Note Rilascio ## Note Rilascio
### v.3.1 (2018.03.17)
Versione riorganizzata del progetto GIT x correzione problemi di packaging.
Versione | Data | Note ### v.3.3 (2019.10.10)
---------|----------|--------- Versione riorganizzata con pubblicazione in formato nuget su repo privato SteamWare (http://nexus.steamware.net)
5.4 | 2025.09.15 | Fix metodi x evitare Redis flood in init appConf
5.3 | 2023.09.13 | Last Net Framework version
3.3 | 2019.10.10 | Versione riorganizzata con pubblicazione in formato nuget su repo privato SteamWare (http://nexus.steamware.net)
3.1 | 2018.03.17 | Versione riorganizzata del progetto GIT x correzione problemi di packaging
BIN
View File
Binary file not shown.
+312 -352
View File
File diff suppressed because it is too large Load Diff
+20 -32
View File
@@ -245,18 +245,6 @@ SELECT chiave, valore, valoreStd, note FROM Config WHERE (chiave = @chiave)</Com
</DbCommand> </DbCommand>
</SelectCommand> </SelectCommand>
</DbSource> </DbSource>
<DbSource ConnectionRef="DbConfConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_config_updateQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="updateQuery" Modifier="Public" Name="updateQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="updateQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_config_updateQuery</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@chiave" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@valore" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources> </Sources>
</TableAdapter> </TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ConfigTmpTableAdapter" GeneratorDataComponentClassName="ConfigTmpTableAdapter" Name="ConfigTmp" UserDataComponentName="ConfigTmpTableAdapter"> <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ConfigTmpTableAdapter" GeneratorDataComponentClassName="ConfigTmpTableAdapter" Name="ConfigTmp" UserDataComponentName="ConfigTmpTableAdapter">
@@ -360,55 +348,55 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</DataSource> </DataSource>
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
<xs:element name="DS_Utility" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DS_Utility" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_Utility"> <xs:element name="DS_Utility" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_Utility" msprop:Generator_UserDSName="DS_Utility">
<xs:complexType> <xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ListValues" msprop:Generator_RowEvHandlerName="ListValuesRowChangeEventHandler" msprop:Generator_RowDeletedName="ListValuesRowDeleted" msprop:Generator_RowDeletingName="ListValuesRowDeleting" msprop:Generator_RowEvArgName="ListValuesRowChangeEvent" msprop:Generator_TablePropName="ListValues" msprop:Generator_RowChangedName="ListValuesRowChanged" msprop:Generator_UserTableName="ListValues" msprop:Generator_RowChangingName="ListValuesRowChanging" msprop:Generator_RowClassName="ListValuesRow" msprop:Generator_TableClassName="ListValuesDataTable" msprop:Generator_TableVarName="tableListValues"> <xs:element name="ListValues" msprop:Generator_TableClassName="ListValuesDataTable" msprop:Generator_TableVarName="tableListValues" msprop:Generator_TablePropName="ListValues" msprop:Generator_RowDeletingName="ListValuesRowDeleting" msprop:Generator_RowChangingName="ListValuesRowChanging" msprop:Generator_RowEvHandlerName="ListValuesRowChangeEventHandler" msprop:Generator_RowDeletedName="ListValuesRowDeleted" msprop:Generator_UserTableName="ListValues" msprop:Generator_RowChangedName="ListValuesRowChanged" msprop:Generator_RowEvArgName="ListValuesRowChangeEvent" msprop:Generator_RowClassName="ListValuesRow">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="TableName" msprop:Generator_UserColumnName="TableName" msprop:Generator_ColumnPropNameInTable="TableNameColumn" msprop:Generator_ColumnPropNameInRow="TableName" msprop:Generator_ColumnVarNameInTable="columnTableName"> <xs:element name="TableName" msprop:Generator_ColumnVarNameInTable="columnTableName" msprop:Generator_ColumnPropNameInRow="TableName" msprop:Generator_ColumnPropNameInTable="TableNameColumn" msprop:Generator_UserColumnName="TableName">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="FieldName" msprop:Generator_UserColumnName="FieldName" msprop:Generator_ColumnPropNameInTable="FieldNameColumn" msprop:Generator_ColumnPropNameInRow="FieldName" msprop:Generator_ColumnVarNameInTable="columnFieldName"> <xs:element name="FieldName" msprop:Generator_ColumnVarNameInTable="columnFieldName" msprop:Generator_ColumnPropNameInRow="FieldName" msprop:Generator_ColumnPropNameInTable="FieldNameColumn" msprop:Generator_UserColumnName="FieldName">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="value" msprop:Generator_UserColumnName="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnVarNameInTable="columnvalue"> <xs:element name="value" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_UserColumnName="value">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="10" /> <xs:maxLength value="10" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="label" msprop:Generator_UserColumnName="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnVarNameInTable="columnlabel" minOccurs="0"> <xs:element name="label" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_UserColumnName="label" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="ordinal" msprop:Generator_UserColumnName="ordinal" msprop:Generator_ColumnPropNameInTable="ordinalColumn" msprop:Generator_ColumnPropNameInRow="ordinal" msprop:Generator_ColumnVarNameInTable="columnordinal" type="xs:int" minOccurs="0" /> <xs:element name="ordinal" msprop:Generator_ColumnVarNameInTable="columnordinal" msprop:Generator_ColumnPropNameInRow="ordinal" msprop:Generator_ColumnPropNameInTable="ordinalColumn" msprop:Generator_UserColumnName="ordinal" type="xs:int" minOccurs="0" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="v_selListVal" msprop:Generator_RowEvHandlerName="v_selListValRowChangeEventHandler" msprop:Generator_RowDeletedName="v_selListValRowDeleted" msprop:Generator_RowDeletingName="v_selListValRowDeleting" msprop:Generator_RowEvArgName="v_selListValRowChangeEvent" msprop:Generator_TablePropName="v_selListVal" msprop:Generator_RowChangedName="v_selListValRowChanged" msprop:Generator_UserTableName="v_selListVal" msprop:Generator_RowChangingName="v_selListValRowChanging" msprop:Generator_RowClassName="v_selListValRow" msprop:Generator_TableClassName="v_selListValDataTable" msprop:Generator_TableVarName="tablev_selListVal"> <xs:element name="v_selListVal" msprop:Generator_TableClassName="v_selListValDataTable" msprop:Generator_TableVarName="tablev_selListVal" msprop:Generator_TablePropName="v_selListVal" msprop:Generator_RowDeletingName="v_selListValRowDeleting" msprop:Generator_RowChangingName="v_selListValRowChanging" msprop:Generator_RowEvHandlerName="v_selListValRowChangeEventHandler" msprop:Generator_RowDeletedName="v_selListValRowDeleted" msprop:Generator_UserTableName="v_selListVal" msprop:Generator_RowChangedName="v_selListValRowChanged" msprop:Generator_RowEvArgName="v_selListValRowChangeEvent" msprop:Generator_RowClassName="v_selListValRow">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="value" msdata:ReadOnly="true" msprop:Generator_UserColumnName="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnVarNameInTable="columnvalue" minOccurs="0"> <xs:element name="value" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnvalue" msprop:Generator_ColumnPropNameInRow="value" msprop:Generator_ColumnPropNameInTable="valueColumn" msprop:Generator_UserColumnName="value" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="112" /> <xs:maxLength value="112" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="label" msprop:Generator_UserColumnName="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnVarNameInTable="columnlabel" minOccurs="0"> <xs:element name="label" msprop:Generator_ColumnVarNameInTable="columnlabel" msprop:Generator_ColumnPropNameInRow="label" msprop:Generator_ColumnPropNameInTable="labelColumn" msprop:Generator_UserColumnName="label" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
@@ -418,31 +406,31 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="Config" msprop:Generator_RowEvHandlerName="ConfigRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigRowDeleted" msprop:Generator_RowDeletingName="ConfigRowDeleting" msprop:Generator_RowEvArgName="ConfigRowChangeEvent" msprop:Generator_TablePropName="Config" msprop:Generator_RowChangedName="ConfigRowChanged" msprop:Generator_UserTableName="Config" msprop:Generator_RowChangingName="ConfigRowChanging" msprop:Generator_RowClassName="ConfigRow" msprop:Generator_TableClassName="ConfigDataTable" msprop:Generator_TableVarName="tableConfig"> <xs:element name="Config" msprop:Generator_TableClassName="ConfigDataTable" msprop:Generator_TableVarName="tableConfig" msprop:Generator_TablePropName="Config" msprop:Generator_RowDeletingName="ConfigRowDeleting" msprop:Generator_RowChangingName="ConfigRowChanging" msprop:Generator_RowEvHandlerName="ConfigRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigRowDeleted" msprop:Generator_UserTableName="Config" msprop:Generator_RowChangedName="ConfigRowChanged" msprop:Generator_RowEvArgName="ConfigRowChangeEvent" msprop:Generator_RowClassName="ConfigRow">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="chiave" msprop:Generator_UserColumnName="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave"> <xs:element name="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_UserColumnName="chiave">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="valore" msprop:Generator_UserColumnName="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnVarNameInTable="columnvalore" minOccurs="0"> <xs:element name="valore" msprop:Generator_ColumnVarNameInTable="columnvalore" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_UserColumnName="valore" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="valoreStd" msprop:Generator_UserColumnName="valoreStd" msprop:Generator_ColumnPropNameInTable="valoreStdColumn" msprop:Generator_ColumnPropNameInRow="valoreStd" msprop:Generator_ColumnVarNameInTable="columnvaloreStd" minOccurs="0"> <xs:element name="valoreStd" msprop:Generator_ColumnVarNameInTable="columnvaloreStd" msprop:Generator_ColumnPropNameInRow="valoreStd" msprop:Generator_ColumnPropNameInTable="valoreStdColumn" msprop:Generator_UserColumnName="valoreStd" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="note" msprop:Generator_UserColumnName="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnVarNameInTable="columnnote" minOccurs="0"> <xs:element name="note" msprop:Generator_ColumnVarNameInTable="columnnote" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_UserColumnName="note" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
@@ -452,31 +440,31 @@ SELECT sorgente, chiave, valore, note FROM ConfigTmp WHERE (chiave = @chiave) AN
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="ConfigTmp" msprop:Generator_RowEvHandlerName="ConfigTmpRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigTmpRowDeleted" msprop:Generator_RowDeletingName="ConfigTmpRowDeleting" msprop:Generator_RowEvArgName="ConfigTmpRowChangeEvent" msprop:Generator_TablePropName="ConfigTmp" msprop:Generator_RowChangedName="ConfigTmpRowChanged" msprop:Generator_UserTableName="ConfigTmp" msprop:Generator_RowChangingName="ConfigTmpRowChanging" msprop:Generator_RowClassName="ConfigTmpRow" msprop:Generator_TableClassName="ConfigTmpDataTable" msprop:Generator_TableVarName="tableConfigTmp"> <xs:element name="ConfigTmp" msprop:Generator_TableClassName="ConfigTmpDataTable" msprop:Generator_TableVarName="tableConfigTmp" msprop:Generator_TablePropName="ConfigTmp" msprop:Generator_RowDeletingName="ConfigTmpRowDeleting" msprop:Generator_RowChangingName="ConfigTmpRowChanging" msprop:Generator_RowEvHandlerName="ConfigTmpRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfigTmpRowDeleted" msprop:Generator_UserTableName="ConfigTmp" msprop:Generator_RowChangedName="ConfigTmpRowChanged" msprop:Generator_RowEvArgName="ConfigTmpRowChangeEvent" msprop:Generator_RowClassName="ConfigTmpRow">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="sorgente" msprop:Generator_UserColumnName="sorgente" msprop:Generator_ColumnPropNameInTable="sorgenteColumn" msprop:Generator_ColumnPropNameInRow="sorgente" msprop:Generator_ColumnVarNameInTable="columnsorgente"> <xs:element name="sorgente" msprop:Generator_ColumnVarNameInTable="columnsorgente" msprop:Generator_ColumnPropNameInRow="sorgente" msprop:Generator_ColumnPropNameInTable="sorgenteColumn" msprop:Generator_UserColumnName="sorgente">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="chiave" msprop:Generator_UserColumnName="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave"> <xs:element name="chiave" msprop:Generator_ColumnVarNameInTable="columnchiave" msprop:Generator_ColumnPropNameInRow="chiave" msprop:Generator_ColumnPropNameInTable="chiaveColumn" msprop:Generator_UserColumnName="chiave">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="valore" msprop:Generator_UserColumnName="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnVarNameInTable="columnvalore"> <xs:element name="valore" msprop:Generator_ColumnVarNameInTable="columnvalore" msprop:Generator_ColumnPropNameInRow="valore" msprop:Generator_ColumnPropNameInTable="valoreColumn" msprop:Generator_UserColumnName="valore">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="250" /> <xs:maxLength value="250" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="note" msprop:Generator_UserColumnName="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnVarNameInTable="columnnote"> <xs:element name="note" msprop:Generator_ColumnVarNameInTable="columnnote" msprop:Generator_ColumnPropNameInRow="note" msprop:Generator_ColumnPropNameInTable="noteColumn" msprop:Generator_UserColumnName="note">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="250" /> <xs:maxLength value="250" />
+2 -2
View File
@@ -4,11 +4,11 @@
Changes to this file may cause incorrect behavior and will be lost if Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated. the code is regenerated.
</autogenerated>--> </autogenerated>-->
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes> <Shapes>
<Shape ID="DesignTable:ListValues" ZOrder="4" X="0" Y="0" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" /> <Shape ID="DesignTable:ListValues" ZOrder="4" X="0" Y="0" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:v_selListVal" ZOrder="2" X="634" Y="4" Height="153" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" /> <Shape ID="DesignTable:v_selListVal" ZOrder="2" X="634" Y="4" Height="153" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:Config" ZOrder="1" X="957" Y="6" Height="191" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" /> <Shape ID="DesignTable:Config" ZOrder="1" X="957" Y="6" Height="172" Width="183" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:ConfigTmp" ZOrder="3" X="324" Y="4" Height="210" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" /> <Shape ID="DesignTable:ConfigTmp" ZOrder="3" X="324" Y="4" Height="210" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
</Shapes> </Shapes>
<Connectors /> <Connectors />
+9 -9
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // Il codice è stato generato da uno strumento.
// Runtime Version:4.0.30319.42000 // Versione runtime:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// the code is regenerated. // il codice viene rigenerato.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -12,7 +12,7 @@ namespace SteamWare.IO.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -26,8 +26,8 @@ namespace SteamWare.IO.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabo" + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=" +
"lario;Persist Security Info=True;User ID=sa;Password=keyhammer;")] "True;User ID=sa;Password=keyhammer")]
public string SteamWare_VocabolarioConnectionString { public string SteamWare_VocabolarioConnectionString {
get { get {
return ((string)(this["SteamWare_VocabolarioConnectionString"])); return ((string)(this["SteamWare_VocabolarioConnectionString"]));
@@ -37,8 +37,8 @@ namespace SteamWare.IO.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persis" + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID" +
"t Security Info=True;User ID=sa;")] "=sa;Password=keyhammer16")]
public string DbConfConnectionString { public string DbConfConnectionString {
get { get {
return ((string)(this["DbConfConnectionString"])); return ((string)(this["DbConfConnectionString"]));
+6 -6
View File
@@ -4,19 +4,19 @@
<Settings> <Settings>
<Setting Name="SteamWare_VocabolarioConnectionString" Type="(Connection string)" Scope="Application"> <Setting Name="SteamWare_VocabolarioConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;&lt;/ConnectionString&gt; &lt;ConnectionString&gt;Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt; &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;</Value> <Value Profile="(Default)">Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer</Value>
</Setting> </Setting>
<Setting Name="DbConfConnectionString" Type="(Connection string)" Scope="Application"> <Setting Name="DbConfConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;&lt;/ConnectionString&gt; &lt;ConnectionString&gt;Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt; &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;</Value> <Value Profile="(Default)">Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16</Value>
</Setting> </Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>
-2
View File
@@ -9,8 +9,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.IO</RootNamespace> <RootNamespace>SteamWare.IO</RootNamespace>
<AssemblyName>SteamWare.IO</AssemblyName> <AssemblyName>SteamWare.IO</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware IO helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.IO</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>Steamware IO helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
<!-- Include everything from the build output -->
<!-- <files>
<file src="bin\$configuration$\**\SteamWare*.*" target="lib\net462" exclude="content\*.*;content\**\*.*" />
</files> -->
</package>
+2 -6
View File
@@ -3,12 +3,8 @@
<configSections> <configSections>
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="SteamWare.IO.Properties.Settings.SteamWare_VocabolarioConnectionString" <add name="SteamWare.IO.Properties.Settings.SteamWare_VocabolarioConnectionString" connectionString="Data Source=SQLSTEAM;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
connectionString="Data Source=SQLSTEAM;TrustServerCertificate=True;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;" <add name="SteamWare.IO.Properties.Settings.DbConfConnectionString" connectionString="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16" providerName="System.Data.SqlClient" />
providerName="System.Data.SqlClient" />
<add name="SteamWare.IO.Properties.Settings.DbConfConnectionString"
connectionString="Data Source=SQL2016DEV;TrustServerCertificate=True;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;"
providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+94 -200
View File
@@ -31,11 +31,6 @@ namespace SteamWare.IO
/// </summary> /// </summary>
public Dictionary<string, string> AppConf; public Dictionary<string, string> AppConf;
/// <summary>
/// Definisce il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf = 5;
/// <summary> /// <summary>
/// Table adapter accesso conf parameters /// Table adapter accesso conf parameters
/// </summary> /// </summary>
@@ -48,28 +43,6 @@ namespace SteamWare.IO
#endregion Public Fields #endregion Public Fields
#region Public Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
public memLayer()
{
if (Log == null)
{
Log = LogManager.GetCurrentClassLogger();
}
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
setupParams();
}
#endregion Public Constructors
#region Public Enums #region Public Enums
/// <summary> /// <summary>
@@ -202,6 +175,27 @@ namespace SteamWare.IO
} }
} }
/// <summary>
/// Recupera il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf
{
get
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in lettura valore maxAgeAppConf_min{0}{1}", Environment.NewLine, exc));
}
return maxAge * 60;
}
}
/// <summary> /// <summary>
/// Numero record salvati in AppConf /// Numero record salvati in AppConf
/// </summary> /// </summary>
@@ -515,14 +509,12 @@ namespace SteamWare.IO
public string configDbVal(string chiave) public string configDbVal(string chiave)
{ {
string answ = ""; string answ = "";
bool cacheReloaded = false;
if (confReadString("DbConfConnectionString") != "") if (confReadString("DbConfConnectionString") != "")
{ {
// verifico esista oggetto... // verifico esista oggetto...
if (AppConf == null) if (AppConf == null)
{ {
resetAppConf(); resetAppConf();
cacheReloaded = true;
} }
if (AppConf != null) if (AppConf != null)
{ {
@@ -530,12 +522,11 @@ namespace SteamWare.IO
if (AppConf.Count == 0) if (AppConf.Count == 0)
{ {
resetAppConf(); resetAppConf();
cacheReloaded = true;
} }
// controllo SE in redis ci sia ancora il valore, altrimenti rileggo... // controllo SE in redis ci sia ancora il valore, altrimenti rileggo...
if (!cacheReloaded && DateTime.Now > vetoCacheCheck && !redKeyPresent(ACBH)) if (!redKeyPresent(ACBH))
{ {
Log.Info($"Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {ACBH} | {chiave}"); Log.Info(string.Format("Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {0} | {1}", ACBH, chiave));
resetAppConf(); resetAppConf();
} }
// provo a leggere da DICT // provo a leggere da DICT
@@ -547,7 +538,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in lettura AppConf[{chiave}] durante configDbVal{Environment.NewLine}{exc}"); Log.Error(string.Format("Errore in lettura AppConf[{0}] durante configDbVal{1}{2}", chiave, Environment.NewLine, exc));
} }
} }
} }
@@ -894,7 +885,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in getRSV:{Environment.NewLine}{exc}"); Log.Error(string.Format("Eccezione in getRSV:{0}{1}", Environment.NewLine, exc));
} }
return answInt; return answInt;
} }
@@ -935,7 +926,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in getRKeys:{Environment.NewLine}{exc}"); Log.Error(string.Format("Eccezione in getRKeys:{0}{1}", Environment.NewLine, exc));
} }
return answ; return answ;
} }
@@ -973,10 +964,8 @@ namespace SteamWare.IO
{ {
answ = HttpContext.Current.Request.Cookies[nome].Value != ""; answ = HttpContext.Current.Request.Cookies[nome].Value != "";
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in hasCookieVal:{Environment.NewLine}{exc}");
}
} }
return answ; return answ;
} }
@@ -1011,20 +1000,6 @@ namespace SteamWare.IO
{ {
try try
{ {
// cerco come key...
var redVal = getRSV(redHash(nomeVar));
answ = !string.IsNullOrEmpty(redVal);
if (!answ)
{
answ = redKeyPresent(redHash(nomeVar));
// cerco come variabile se NON trovata...
if (!answ)
{
// cerco come hash...
answ = redHashPresent(redHash(nomeVar));
}
}
#if false
// cerco come key... // cerco come key...
answ = redKeyPresent(redHash(nomeVar)); answ = redKeyPresent(redHash(nomeVar));
if (!answ) if (!answ)
@@ -1036,13 +1011,12 @@ namespace SteamWare.IO
if (!answ) if (!answ)
{ {
var redVal = getRSV(redHash(nomeVar)); var redVal = getRSV(redHash(nomeVar));
answ = !string.IsNullOrEmpty(redVal); answ = redVal != null && redVal != "";
} }
#endif
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in verifica isInCacheObject REDIS per chiave{nomeVar}{Environment.NewLine}{exc}"); Log.Error(string.Format("Eccezzione in verifica isInCacheObject REDIS per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc));
} }
} }
else else
@@ -1052,10 +1026,8 @@ namespace SteamWare.IO
{ {
stringAnsw = HttpContext.Current.Cache[nomeVar].ToString() != ""; stringAnsw = HttpContext.Current.Cache[nomeVar].ToString() != "";
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in verifica HttpContext.Current.Cache per chiave{nomeVar}{Environment.NewLine}{exc}");
}
// infine condizione doppia... // infine condizione doppia...
try try
{ {
@@ -1063,7 +1035,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in verifica NULL per HttpContext.Current.Cache per chiave{nomeVar}{Environment.NewLine}{exc}"); Log.Error(string.Format("Eccezzione in verifica isInCacheObject per chiave{0}{1}{2}", nomeVar, Environment.NewLine, exc));
} }
} }
return answ; return answ;
@@ -1084,19 +1056,15 @@ namespace SteamWare.IO
//stringAnsw = (string)HttpContext.Current.Session[nomeVar].ToString() != ""; //stringAnsw = (string)HttpContext.Current.Session[nomeVar].ToString() != "";
stringAnsw = HttpContext.Current.Session[nomeVar] != null; stringAnsw = HttpContext.Current.Session[nomeVar] != null;
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore 01 | isInSessionObject:{Environment.NewLine}{exc}");
}
// infine condizione doppia... // infine condizione doppia...
try try
{ {
answ = (HttpContext.Current.Session[nomeVar] != null && stringAnsw); answ = (HttpContext.Current.Session[nomeVar] != null && stringAnsw);
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore 02 | isInSessionObject:{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1173,10 +1141,8 @@ namespace SteamWare.IO
{ {
answ = Convert.ToBoolean(HttpContext.Current.Request.QueryString[nome]); answ = Convert.ToBoolean(HttpContext.Current.Request.QueryString[nome]);
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in QSB:{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1192,10 +1158,8 @@ namespace SteamWare.IO
{ {
answ = Convert.ToDateTime(HttpContext.Current.Request.QueryString[nome]); answ = Convert.ToDateTime(HttpContext.Current.Request.QueryString[nome]);
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in QSD:{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1211,10 +1175,8 @@ namespace SteamWare.IO
{ {
answ = Convert.ToInt32(HttpContext.Current.Request.QueryString[nome]); answ = Convert.ToInt32(HttpContext.Current.Request.QueryString[nome]);
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in QSI:{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1232,10 +1194,8 @@ namespace SteamWare.IO
{ {
answ = HttpContext.Current.Request.QueryString[nome].ToString().Trim(); answ = HttpContext.Current.Request.QueryString[nome].ToString().Trim();
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in QSS:{Environment.NewLine}{exc}");
}
} }
return answ; return answ;
} }
@@ -1255,7 +1215,7 @@ namespace SteamWare.IO
foreach (var ep in connRedis.GetEndPoints()) foreach (var ep in connRedis.GetEndPoints())
{ {
var server = connRedis.GetServer(ep); var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern, database: _currDB.Database)) foreach (var key in server.Keys(pattern: keyPattern))
{ {
answ++; answ++;
} }
@@ -1306,10 +1266,8 @@ namespace SteamWare.IO
cache.KeyDelete(chiave); cache.KeyDelete(chiave);
answ = true; answ = true;
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redDelKey:{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1387,10 +1345,8 @@ namespace SteamWare.IO
answ.Add(new KeyValuePair<string, int>(chiavi[i], currVal)); answ.Add(new KeyValuePair<string, int>(chiavi[i], currVal));
} }
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redGetCounterByKey 02{Environment.NewLine}{exc}");
}
// se richiesto riordino... // se richiesto riordino...
switch (orderBy) switch (orderBy)
{ {
@@ -1437,10 +1393,8 @@ namespace SteamWare.IO
i++; i++;
} }
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redGetHash{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1462,10 +1416,8 @@ namespace SteamWare.IO
answ.Add(item.Name, item.Value); answ.Add(item.Name, item.Value);
} }
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redGetHashDict{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1486,38 +1438,8 @@ namespace SteamWare.IO
RedisValue valOut = cache.HashGet(chiave, campo); RedisValue valOut = cache.HashGet(chiave, campo);
answ = valOut.ToString(); answ = valOut.ToString();
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redGetHashField{Environment.NewLine}{exc}");
}
return answ;
}
/// <summary>
/// Elenco oggetti cache redis che rispondono a pattern
/// </summary>
/// <param name="keyPattern">** = tutti</param>
/// <returns></returns>
public List<RedisKey> redGetKeys(string keyPattern)
{
List<RedisKey> answ = new List<RedisKey>();
// cerco se ci sia valore in redis... se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try
{
foreach (var ep in connRedis.GetEndPoints())
{
var server = connRedis.GetServer(ep);
foreach (var key in server.Keys(pattern: keyPattern, database: _currDB.Database))
{
answ.Add(key);
}
}
}
catch (Exception exc)
{
Log.Error($"Errore in redGetKeys{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1532,10 +1454,8 @@ namespace SteamWare.IO
{ {
answ = string.Format("{0}:{1}:{2}:{3}", confReadString("CodModulo"), taConfig.Connection.DataSource, taConfig.Connection.Database, keyName).Replace("\\", "_"); answ = string.Format("{0}:{1}:{2}:{3}", confReadString("CodModulo"), taConfig.Connection.DataSource, taConfig.Connection.Database, keyName).Replace("\\", "_");
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redHash{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1554,7 +1474,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in redHashPresent | {key}{Environment.NewLine}{exc}"); Log.Error(string.Format("Eccezione in redHashPresent per la key {2}{0}{1}", Environment.NewLine, exc, key));
} }
return answ; return answ;
} }
@@ -1572,10 +1492,8 @@ namespace SteamWare.IO
RedisKey chiave = key; RedisKey chiave = key;
answ = redHashPresent(chiave); answ = redHashPresent(chiave);
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redHashPresentSz | {key}{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1594,7 +1512,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in redKeyPresent | RedisKey: {key}{Environment.NewLine}{exc}"); Log.Error(string.Format("Eccezione in redKeyPresent per la key {2}:{0}{1}", Environment.NewLine, exc, key));
} }
return answ; return answ;
} }
@@ -1612,10 +1530,8 @@ namespace SteamWare.IO
RedisKey chiave = key; RedisKey chiave = key;
answ = redKeyPresent(chiave); answ = redKeyPresent(chiave);
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redKeyPresentSz | {key}{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1642,10 +1558,8 @@ namespace SteamWare.IO
cache.HashSet(chiave, valori); cache.HashSet(chiave, valori);
answ = true; answ = true;
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redSaveHash{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1672,10 +1586,8 @@ namespace SteamWare.IO
} }
//answ = true; //answ = true;
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redSaveHash | {hashKey}{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -1702,10 +1614,8 @@ namespace SteamWare.IO
cache.HashSet(chiave, valori); cache.HashSet(chiave, valori);
answ = true; answ = true;
} }
catch (Exception exc) catch
{ { }
Log.Error($"Errore in redSaveHashDict | {hashKey}{Environment.NewLine}{exc}");
}
return answ; return answ;
} }
@@ -2210,19 +2120,6 @@ namespace SteamWare.IO
return answ; return answ;
} }
/// <summary>
/// Aggiornamento di una chiave in tabella config
/// </summary>
/// <param name="chiave"></param>
/// <param name="valore"></param>
public void updateAppConf(string chiave, string valore)
{
// recupero valore attuale...
memLayer nML = new memLayer();
nML.taConfig.updateQuery(chiave, valore);
resetAppConf();
}
#endregion Public Methods #endregion Public Methods
#region Protected Fields #region Protected Fields
@@ -2239,6 +2136,27 @@ namespace SteamWare.IO
#endregion Protected Fields #endregion Protected Fields
#region Protected Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
protected memLayer()
{
if (Log == null)
{
Log = LogManager.GetCurrentClassLogger();
}
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
}
#endregion Protected Constructors
#region Protected Properties #region Protected Properties
/// <summary> /// <summary>
@@ -2330,11 +2248,11 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore procedura ricaricaAppConf per kvp: {riga.chiave} / {riga.valore}{Environment.NewLine}{exc}"); Log.Error(string.Format("Errore procedura ricaricaAppConf per kvp: {0} / {1}{2}{3}", riga.chiave, riga.valore, Environment.NewLine, exc));
} }
} }
// log ricarica // log ricarica
Log.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records"); Log.Info(string.Format("Effettuata procedura ricaricaAppConf per {0} records", answ.Count));
} }
return answ; return answ;
} }
@@ -2388,8 +2306,6 @@ namespace SteamWare.IO
} }
// salvo in redis valori (con TTL) // salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf); redSaveHash(ACBH, valori, maxAgeAppConf);
// salvo info cache riletta 2 sec prima della scadenza
vetoCacheCheck = DateTime.Now.AddSeconds(maxAgeAppConf + 1);
Log.Info("Completato procedura startupAppConf"); Log.Info("Completato procedura startupAppConf");
} }
else else
@@ -2400,7 +2316,7 @@ namespace SteamWare.IO
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore in startupAppConf:{Environment.NewLine}{exc}"); Log.Error(string.Format("Errore in startupAppConf:{0}{1}", Environment.NewLine, exc));
} }
} }
} }
@@ -2439,8 +2355,6 @@ namespace SteamWare.IO
return ConnectionMultiplexer.Connect(RedisConnAdmin); return ConnectionMultiplexer.Connect(RedisConnAdmin);
}); });
private DateTime vetoCacheCheck = DateTime.Now;
#endregion Private Fields #endregion Private Fields
#region Private Properties #region Private Properties
@@ -2484,26 +2398,6 @@ namespace SteamWare.IO
currMongoClient = new MongoClient(mongoConnString); currMongoClient = new MongoClient(mongoConnString);
} }
private void setupParams()
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error($"Errore in lettura valore maxAgeAppConf_min{Environment.NewLine}{exc}");
}
// controllo maxage valida...
if (maxAge < 1)
{
maxAge = 5;
}
maxAgeAppConf = maxAge * 60;
}
#endregion Private Methods #endregion Private Methods
} }
} }
-2
View File
@@ -9,8 +9,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.Logger</RootNamespace> <RootNamespace>SteamWare.Logger</RootNamespace>
<AssemblyName>SteamWare.Logger</AssemblyName> <AssemblyName>SteamWare.Logger</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware Logger helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.Logger</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>Steamware Logger helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
</package>
@@ -9,8 +9,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.Reports</RootNamespace> <RootNamespace>SteamWare.Reports</RootNamespace>
<AssemblyName>SteamWare.Reports</AssemblyName> <AssemblyName>SteamWare.Reports</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware Reports helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
@@ -1,10 +0,0 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.Reports</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>Steamware Reports helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
</package>
-2
View File
@@ -10,8 +10,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare</RootNamespace> <RootNamespace>SteamWare</RootNamespace>
<AssemblyName>SteamWare</AssemblyName> <AssemblyName>SteamWare</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware global helper lib for framework projects</Description>
<SignAssembly>false</SignAssembly> <SignAssembly>false</SignAssembly>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<owners>Samuele E. Locatelli</owners>
<description>Steamware global helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>steamware helper</tags>
</metadata>
</package>
+56 -105
View File
@@ -7,7 +7,6 @@ using System.Collections.Generic;
using System.Configuration; using System.Configuration;
using System.Data; using System.Data;
using System.Text; using System.Text;
using System.Threading;
using System.Web; using System.Web;
namespace SteamWare namespace SteamWare
@@ -29,11 +28,6 @@ namespace SteamWare
/// </summary> /// </summary>
public Dictionary<string, string> AppConf; public Dictionary<string, string> AppConf;
/// <summary>
/// Definisce il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf = 5;
/// <summary> /// <summary>
/// Table adapter accesso conf parameters /// Table adapter accesso conf parameters
/// </summary> /// </summary>
@@ -46,24 +40,6 @@ namespace SteamWare
#endregion Public Fields #endregion Public Fields
#region Public Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
public memLayer()
{
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
setupParams();
}
#endregion Public Constructors
#region Public Enums #region Public Enums
/// <summary> /// <summary>
@@ -196,6 +172,27 @@ namespace SteamWare
} }
} }
/// <summary>
/// Recupera il TTL x appConf (secondi)
/// </summary>
public int maxAgeAppConf
{
get
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error(string.Format("Errore in lettura valore maxAgeAppConf_min{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
}
return maxAge * 60;
}
}
/// <summary> /// <summary>
/// Numero record salvati in AppConf /// Numero record salvati in AppConf
/// </summary> /// </summary>
@@ -509,14 +506,12 @@ namespace SteamWare
public string configDbVal(string chiave) public string configDbVal(string chiave)
{ {
string answ = ""; string answ = "";
bool cacheReloaded = false;
if (confReadString("DbConfConnectionString") != "") if (confReadString("DbConfConnectionString") != "")
{ {
// verifico esista oggetto... // verifico esista oggetto...
if (AppConf == null) if (AppConf == null)
{ {
resetAppConf(); resetAppConf();
cacheReloaded = true;
} }
if (AppConf != null) if (AppConf != null)
{ {
@@ -524,10 +519,9 @@ namespace SteamWare
if (AppConf.Count == 0) if (AppConf.Count == 0)
{ {
resetAppConf(); resetAppConf();
cacheReloaded = true;
} }
// controllo SE in redis ci sia ancora il valore, altrimenti rileggo... // controllo SE in redis ci sia ancora il valore, altrimenti rileggo...
if (!cacheReloaded && DateTime.Now > vetoCacheCheck && !redKeyPresent(ACBH)) if (!redKeyPresent(ACBH))
{ {
Log.Info($"Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {ACBH} | {chiave}"); Log.Info($"Manca HASH in redis --> rileggo da DB --> REDIS --> Memoria | {ACBH} | {chiave}");
resetAppConf(); resetAppConf();
@@ -1071,25 +1065,14 @@ namespace SteamWare
public bool isInSessionObject(string nomeVar) public bool isInSessionObject(string nomeVar)
{ {
bool answ = false; bool answ = false;
bool stringAnsw = false;
// cerco se ci sia... // cerco se ci sia...
try try
{ {
//stringAnsw = (string)HttpContext.Current.Session[nomeVar].ToString() != ""; answ = (HttpContext.Current.Session[nomeVar] != null);
stringAnsw = HttpContext.Current.Session[nomeVar] != null;
} }
catch (Exception exc) catch (Exception exc)
{ {
Log.Error($"Errore 01 | isInSessionObject:{Environment.NewLine}{exc}"); Log.Error($"Errore in isInSessionObject:{Environment.NewLine}{exc}");
}
// infine condizione doppia...
try
{
answ = (HttpContext.Current.Session[nomeVar] != null && stringAnsw);
}
catch (Exception exc)
{
Log.Error($"Errore 02 | isInSessionObject:{Environment.NewLine}{exc}");
} }
return answ; return answ;
} }
@@ -2233,6 +2216,23 @@ namespace SteamWare
#endregion Protected Fields #endregion Protected Fields
#region Protected Constructors
/// <summary>
/// classe gestione accessi a Session, cache, viewstate, configuration...
/// </summary>
protected memLayer()
{
// istanzia il conf setting reader...
configAppSetReader = new AppSettingsReader();
// avvio e configuro TA
initTA();
setupConnectionStringBase();
setupMongo();
}
#endregion Protected Constructors
#region Protected Properties #region Protected Properties
/// <summary> /// <summary>
@@ -2297,39 +2297,21 @@ namespace SteamWare
Dictionary<string, string> answ = new Dictionary<string, string>(); Dictionary<string, string> answ = new Dictionary<string, string>();
// istanzio un NUOVO oggetto x evitare problemi init contestuali // istanzio un NUOVO oggetto x evitare problemi init contestuali
memLayer nML = new memLayer(); memLayer nML = new memLayer();
DS_Utility.ConfigDataTable tabDati = null; var tabDati = nML.taConfig.GetData();
int waitMs = 100; // carico
int numTry = 5; foreach (DS_Utility.ConfigRow riga in tabDati)
do
{ {
try try
{ {
tabDati = nML.taConfig.GetData(); answ.Add(riga.chiave, riga.valore);
} }
catch (Exception exc) catch (Exception exc)
{ {
numTry--; Log.Error($"Errore procedura ricaricaAppConf per kvp: {riga.chiave} / {riga.valore}{Environment.NewLine}{exc}");
Log.Error($"Errore procedura nML.taConfig.GetData(), numTry = {numTry}, now {waitMs}ms wait{Environment.NewLine}{exc}");
Thread.Sleep(waitMs);
} }
} while (numTry > 0 && tabDati == null);
if (tabDati != null)
{
// carico
foreach (DS_Utility.ConfigRow riga in tabDati)
{
try
{
answ.Add(riga.chiave, riga.valore);
}
catch (Exception exc)
{
Log.Error($"Errore procedura ricaricaAppConf per kvp: {riga.chiave} / {riga.valore}{Environment.NewLine}{exc}");
}
}
// log ricarica
Log.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records");
} }
// log ricarica
Log.Info($"Effettuata procedura ricaricaAppConf per {answ.Count} records");
return answ; return answ;
} }
@@ -2371,25 +2353,16 @@ namespace SteamWare
else else
{ {
AppConf = ricaricaAppConf(); AppConf = ricaricaAppConf();
if (AppConf.Count > 0) KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[AppConf.Count];
int i = 0;
foreach (var item in AppConf)
{ {
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[AppConf.Count]; valori[i] = new KeyValuePair<string, string>(item.Key, item.Value);
int i = 0; i++;
foreach (var item in AppConf)
{
valori[i] = new KeyValuePair<string, string>(item.Key, item.Value);
i++;
}
// salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf);
// salvo info cache riletta 2 sec prima della scadenza
vetoCacheCheck = DateTime.Now.AddSeconds(maxAgeAppConf + 1);
Log.Info("Completato procedura startupAppConf");
}
else
{
Log.Error("Errore in procedura startupAppConf, ritornato insieme vuoto");
} }
// salvo in redis valori (con TTL)
redSaveHash(ACBH, valori, maxAgeAppConf);
Log.Info("Completato procedura startupAppConf");
} }
} }
catch (Exception exc) catch (Exception exc)
@@ -2433,8 +2406,6 @@ namespace SteamWare
return ConnectionMultiplexer.Connect(RedisConnAdmin); return ConnectionMultiplexer.Connect(RedisConnAdmin);
}); });
private DateTime vetoCacheCheck = DateTime.Now;
#endregion Private Fields #endregion Private Fields
#region Private Properties #region Private Properties
@@ -2478,26 +2449,6 @@ namespace SteamWare
currMongoClient = new MongoClient(mongoConnString); currMongoClient = new MongoClient(mongoConnString);
} }
private void setupParams()
{
// default 5 minuti x refresh...
int maxAge = 5;
try
{
maxAge = confReadInt("maxAgeAppConf_min");
}
catch (Exception exc)
{
Log.Error($"Errore in lettura valore maxAgeAppConf_min{Environment.NewLine}{exc}");
}
// controllo maxage valida...
if (maxAge < 1)
{
maxAge = 5;
}
maxAgeAppConf = maxAge * 60;
}
#endregion Private Methods #endregion Private Methods
} }
} }
@@ -1,11 +0,0 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>SteamWare.Scheduler</id>
<version>0.0.0.0</version>
<authors>Samuele E. Locatelli</authors>
<description>SteamWare Scheduler helper lib for framework projects</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>steamware helper</tags>
</metadata>
</package>
@@ -9,8 +9,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamWare.Scheduler</RootNamespace> <RootNamespace>SteamWare.Scheduler</RootNamespace>
<AssemblyName>SteamWare.Scheduler</AssemblyName> <AssemblyName>SteamWare.Scheduler</AssemblyName>
<Authors>Samuele E. Locatelli</Authors>
<Description>Steamware Scheduler helper lib for framework projects</Description>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
+2 -8
View File
@@ -5,17 +5,11 @@
</startup> </startup>
<appSettings> <appSettings>
<!--Redis conn--> <!--Redis conn-->
<add key="RedisConn" value="redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false" /> <add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
<add key="RedisConnAdmin" value="redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true" /> <add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false" />
<!--<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false" />-->
<add key="cacheOnRedis" value="true" /> <add key="cacheOnRedis" value="true" />
<add key="redisDb" value="1" /> <add key="redisDb" value="1" />
<add key="_logDir" value="./logs/" /> <add key="_logDir" value="./logs/" />
<!--Email-->
<add key="_PortSSL" value="587"/>
<add key="_enableSSL" value="true"/>
<add key="_useAIMSmtp" value="false" />
<add key="vetoRedisCheckLimit" value="100" /> <add key="vetoRedisCheckLimit" value="100" />
<add key="vetoRedisPausePurge" value="10" /> <add key="vetoRedisPausePurge" value="10" />
<add key="vetoRedisPurgeMax" value="300" /> <add key="vetoRedisPurgeMax" value="300" />
+39 -298
View File
@@ -97,34 +97,13 @@
this.btnSendMessage = new System.Windows.Forms.Button(); this.btnSendMessage = new System.Windows.Forms.Button();
this.txtChannelName = new System.Windows.Forms.TextBox(); this.txtChannelName = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.tabPage9 = new System.Windows.Forms.TabPage();
this.lblOutTestMatr = new System.Windows.Forms.Label();
this.btnTestUserLoad = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.txtMatr = new System.Windows.Forms.TextBox();
this.clockTimer = new System.Windows.Forms.Timer(this.components); this.clockTimer = new System.Windows.Forms.Timer(this.components);
this.LogTimer = new System.Windows.Forms.Timer(this.components); this.LogTimer = new System.Windows.Forms.Timer(this.components);
this.tabPage10 = new System.Windows.Forms.TabPage(); this.tabPage9 = new System.Windows.Forms.TabPage();
this.chkSSL = new System.Windows.Forms.CheckBox(); this.txtMatr = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
this.txtEmailTestOut = new System.Windows.Forms.TextBox(); this.btnTestUserLoad = new System.Windows.Forms.Button();
this.btnSendEmail = new System.Windows.Forms.Button(); this.lblOutTestMatr = new System.Windows.Forms.Label();
this.txtSubj = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.txtMessage = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtEmailDest = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.txtEmailFrom = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txtEmailPwd = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.txtEmailUser = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
this.txtServerPort = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.txtSmtpServ = new System.Windows.Forms.TextBox();
this.label23 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
@@ -140,7 +119,6 @@
this.tabPage7.SuspendLayout(); this.tabPage7.SuspendLayout();
this.tabPage8.SuspendLayout(); this.tabPage8.SuspendLayout();
this.tabPage9.SuspendLayout(); this.tabPage9.SuspendLayout();
this.tabPage10.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// groupBox1 // groupBox1
@@ -307,7 +285,6 @@
// //
// tabControl1 // tabControl1
// //
this.tabControl1.Controls.Add(this.tabPage10);
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage3);
@@ -322,7 +299,7 @@
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(776, 392); this.tabControl1.Size = new System.Drawing.Size(776, 392);
this.tabControl1.TabIndex = 1; this.tabControl1.TabIndex = 10;
// //
// tabPage1 // tabPage1
// //
@@ -883,6 +860,16 @@
this.label12.TabIndex = 0; this.label12.TabIndex = 0;
this.label12.Text = "Channel Name"; this.label12.Text = "Channel Name";
// //
// clockTimer
//
this.clockTimer.Interval = 50;
this.clockTimer.Tick += new System.EventHandler(this.clockTimer_Tick);
//
// LogTimer
//
this.LogTimer.Interval = 10;
this.LogTimer.Tick += new System.EventHandler(this.LogTimer_Tick);
//
// tabPage9 // tabPage9
// //
this.tabPage9.Controls.Add(this.lblOutTestMatr); this.tabPage9.Controls.Add(this.lblOutTestMatr);
@@ -897,14 +884,23 @@
this.tabPage9.Text = "Test Vari"; this.tabPage9.Text = "Test Vari";
this.tabPage9.UseVisualStyleBackColor = true; this.tabPage9.UseVisualStyleBackColor = true;
// //
// lblOutTestMatr // txtMatr
// //
this.lblOutTestMatr.AutoSize = true; this.txtMatr.Location = new System.Drawing.Point(41, 11);
this.lblOutTestMatr.Location = new System.Drawing.Point(218, 14); this.txtMatr.Name = "txtMatr";
this.lblOutTestMatr.Name = "lblOutTestMatr"; this.txtMatr.Size = new System.Drawing.Size(69, 20);
this.lblOutTestMatr.Size = new System.Drawing.Size(16, 13); this.txtMatr.TabIndex = 0;
this.lblOutTestMatr.TabIndex = 3; this.txtMatr.Text = "102";
this.lblOutTestMatr.Text = "---"; this.txtMatr.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 14);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(27, 13);
this.label13.TabIndex = 1;
this.label13.Text = "matr";
// //
// btnTestUserLoad // btnTestUserLoad
// //
@@ -916,246 +912,14 @@
this.btnTestUserLoad.UseVisualStyleBackColor = true; this.btnTestUserLoad.UseVisualStyleBackColor = true;
this.btnTestUserLoad.Click += new System.EventHandler(this.btnTestUserLoad_Click); this.btnTestUserLoad.Click += new System.EventHandler(this.btnTestUserLoad_Click);
// //
// label13 // lblOutTestMatr
// //
this.label13.AutoSize = true; this.lblOutTestMatr.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 14); this.lblOutTestMatr.Location = new System.Drawing.Point(218, 14);
this.label13.Name = "label13"; this.lblOutTestMatr.Name = "lblOutTestMatr";
this.label13.Size = new System.Drawing.Size(27, 13); this.lblOutTestMatr.Size = new System.Drawing.Size(16, 13);
this.label13.TabIndex = 1; this.lblOutTestMatr.TabIndex = 3;
this.label13.Text = "matr"; this.lblOutTestMatr.Text = "---";
//
// txtMatr
//
this.txtMatr.Location = new System.Drawing.Point(41, 11);
this.txtMatr.Name = "txtMatr";
this.txtMatr.Size = new System.Drawing.Size(69, 20);
this.txtMatr.TabIndex = 0;
this.txtMatr.Text = "102";
this.txtMatr.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// clockTimer
//
this.clockTimer.Interval = 50;
this.clockTimer.Tick += new System.EventHandler(this.clockTimer_Tick);
//
// LogTimer
//
this.LogTimer.Interval = 10;
this.LogTimer.Tick += new System.EventHandler(this.LogTimer_Tick);
//
// tabPage10
//
this.tabPage10.Controls.Add(this.chkSSL);
this.tabPage10.Controls.Add(this.label14);
this.tabPage10.Controls.Add(this.txtEmailTestOut);
this.tabPage10.Controls.Add(this.btnSendEmail);
this.tabPage10.Controls.Add(this.txtSubj);
this.tabPage10.Controls.Add(this.label16);
this.tabPage10.Controls.Add(this.txtMessage);
this.tabPage10.Controls.Add(this.label17);
this.tabPage10.Controls.Add(this.txtEmailDest);
this.tabPage10.Controls.Add(this.label18);
this.tabPage10.Controls.Add(this.txtEmailFrom);
this.tabPage10.Controls.Add(this.label19);
this.tabPage10.Controls.Add(this.txtEmailPwd);
this.tabPage10.Controls.Add(this.label20);
this.tabPage10.Controls.Add(this.txtEmailUser);
this.tabPage10.Controls.Add(this.label21);
this.tabPage10.Controls.Add(this.txtServerPort);
this.tabPage10.Controls.Add(this.label22);
this.tabPage10.Controls.Add(this.txtSmtpServ);
this.tabPage10.Controls.Add(this.label23);
this.tabPage10.Location = new System.Drawing.Point(4, 22);
this.tabPage10.Name = "tabPage10";
this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
this.tabPage10.Size = new System.Drawing.Size(768, 366);
this.tabPage10.TabIndex = 9;
this.tabPage10.Text = "Email test";
this.tabPage10.UseVisualStyleBackColor = true;
this.tabPage10.Enter += new System.EventHandler(this.tabPage10_Enter);
//
// chkSSL
//
this.chkSSL.AutoSize = true;
this.chkSSL.Checked = true;
this.chkSSL.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkSSL.Enabled = false;
this.chkSSL.Location = new System.Drawing.Point(110, 69);
this.chkSSL.Name = "chkSSL";
this.chkSSL.Size = new System.Drawing.Size(68, 17);
this.chkSSL.TabIndex = 41;
this.chkSSL.Text = "Use SSL";
this.chkSSL.UseVisualStyleBackColor = true;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(2, 69);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(42, 13);
this.label14.TabIndex = 40;
this.label14.Text = "Opzioni";
//
// txtEmailTestOut
//
this.txtEmailTestOut.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.txtEmailTestOut.ForeColor = System.Drawing.SystemColors.Info;
this.txtEmailTestOut.Location = new System.Drawing.Point(295, 4);
this.txtEmailTestOut.Multiline = true;
this.txtEmailTestOut.Name = "txtEmailTestOut";
this.txtEmailTestOut.Size = new System.Drawing.Size(472, 362);
this.txtEmailTestOut.TabIndex = 39;
this.txtEmailTestOut.Text = "...";
//
// btnSendEmail
//
this.btnSendEmail.Location = new System.Drawing.Point(5, 320);
this.btnSendEmail.Name = "btnSendEmail";
this.btnSendEmail.Size = new System.Drawing.Size(284, 43);
this.btnSendEmail.TabIndex = 37;
this.btnSendEmail.Text = "Send Message";
this.btnSendEmail.UseVisualStyleBackColor = true;
this.btnSendEmail.Click += new System.EventHandler(this.btnSendEmail_Click);
//
// txtSubj
//
this.txtSubj.Location = new System.Drawing.Point(110, 234);
this.txtSubj.Name = "txtSubj";
this.txtSubj.Size = new System.Drawing.Size(179, 20);
this.txtSubj.TabIndex = 36;
this.txtSubj.Text = "Invio messaggio di prova";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(2, 237);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(43, 13);
this.label16.TabIndex = 35;
this.label16.Text = "Subject";
//
// txtMessage
//
this.txtMessage.Location = new System.Drawing.Point(110, 267);
this.txtMessage.Multiline = true;
this.txtMessage.Name = "txtMessage";
this.txtMessage.Size = new System.Drawing.Size(179, 47);
this.txtMessage.TabIndex = 34;
this.txtMessage.Text = "Messaggio di prova - test librerie SteamWareLibs.dll net Framework.";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(2, 270);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(50, 13);
this.label17.TabIndex = 33;
this.label17.Text = "Message";
//
// txtEmailDest
//
this.txtEmailDest.Location = new System.Drawing.Point(110, 201);
this.txtEmailDest.Name = "txtEmailDest";
this.txtEmailDest.Size = new System.Drawing.Size(179, 20);
this.txtEmailDest.TabIndex = 32;
this.txtEmailDest.Text = "samuele.locatelli@egalware.com";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(2, 204);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(53, 13);
this.label18.TabIndex = 31;
this.label18.Text = "To (email)";
//
// txtEmailFrom
//
this.txtEmailFrom.Location = new System.Drawing.Point(110, 168);
this.txtEmailFrom.Name = "txtEmailFrom";
this.txtEmailFrom.Size = new System.Drawing.Size(179, 20);
this.txtEmailFrom.TabIndex = 30;
this.txtEmailFrom.Text = "info@steamware.net";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(2, 171);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(63, 13);
this.label19.TabIndex = 29;
this.label19.Text = "From (email)";
//
// txtEmailPwd
//
this.txtEmailPwd.Location = new System.Drawing.Point(110, 135);
this.txtEmailPwd.Name = "txtEmailPwd";
this.txtEmailPwd.PasswordChar = '*';
this.txtEmailPwd.Size = new System.Drawing.Size(179, 20);
this.txtEmailPwd.TabIndex = 28;
this.txtEmailPwd.Text = "vpsad24068";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(2, 138);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(53, 13);
this.label20.TabIndex = 27;
this.label20.Text = "Password";
//
// txtEmailUser
//
this.txtEmailUser.Location = new System.Drawing.Point(110, 102);
this.txtEmailUser.Name = "txtEmailUser";
this.txtEmailUser.Size = new System.Drawing.Size(179, 20);
this.txtEmailUser.TabIndex = 26;
this.txtEmailUser.Text = "services@steamware.net";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(2, 105);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(55, 13);
this.label21.TabIndex = 25;
this.label21.Text = "Username";
//
// txtServerPort
//
this.txtServerPort.Enabled = false;
this.txtServerPort.Location = new System.Drawing.Point(110, 36);
this.txtServerPort.Name = "txtServerPort";
this.txtServerPort.Size = new System.Drawing.Size(179, 20);
this.txtServerPort.TabIndex = 24;
this.txtServerPort.Text = "25";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(2, 39);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(58, 13);
this.label22.TabIndex = 23;
this.label22.Text = "SMTP port";
//
// txtSmtpServ
//
this.txtSmtpServ.Location = new System.Drawing.Point(110, 3);
this.txtSmtpServ.Name = "txtSmtpServ";
this.txtSmtpServ.Size = new System.Drawing.Size(179, 20);
this.txtSmtpServ.TabIndex = 22;
this.txtSmtpServ.Text = "smtp.gmail.com";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(2, 6);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(93, 13);
this.label23.TabIndex = 21;
this.label23.Text = "SMTP server addr";
// //
// MainForm // MainForm
// //
@@ -1194,8 +958,6 @@
this.tabPage8.PerformLayout(); this.tabPage8.PerformLayout();
this.tabPage9.ResumeLayout(false); this.tabPage9.ResumeLayout(false);
this.tabPage9.PerformLayout(); this.tabPage9.PerformLayout();
this.tabPage10.ResumeLayout(false);
this.tabPage10.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -1277,27 +1039,6 @@
private System.Windows.Forms.Button btnTestUserLoad; private System.Windows.Forms.Button btnTestUserLoad;
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtMatr; private System.Windows.Forms.TextBox txtMatr;
private System.Windows.Forms.TabPage tabPage10;
private System.Windows.Forms.CheckBox chkSSL;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtEmailTestOut;
private System.Windows.Forms.Button btnSendEmail;
private System.Windows.Forms.TextBox txtSubj;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox txtMessage;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtEmailDest;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox txtEmailFrom;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtEmailPwd;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txtEmailUser;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txtServerPort;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtSmtpServ;
private System.Windows.Forms.Label label23;
} }
} }
-51
View File
@@ -8,7 +8,6 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using NLog; using NLog;
using System.Xml.Linq;
namespace TestBench namespace TestBench
{ {
@@ -423,55 +422,5 @@ namespace TestBench
} }
} }
private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private bool ParamPresent
{
get
{
bool serverOk = !string.IsNullOrEmpty(txtSmtpServ.Text) && !string.IsNullOrEmpty(txtServerPort.Text);
bool userOk = chkSSL.Checked && (!string.IsNullOrEmpty(txtUser.Text) && !string.IsNullOrEmpty(txtEmailPwd.Text));
bool mailOk = !string.IsNullOrEmpty(txtEmailFrom.Text) && !string.IsNullOrEmpty(txtEmailDest.Text);
bool messOk = !string.IsNullOrEmpty(txtSubj.Text) && !string.IsNullOrEmpty(txtMessage.Text);
return serverOk && userOk && mailOk && messOk;
}
}
private void btnSendEmail_Click(object sender, EventArgs e)
{
try
{
// se ho tutti i valori, altrimenti mostro messaggio...
if (!ParamPresent)
{
txtEmailTestOut.Text = "Mancano parametri per invio, prego completare";
}
else
{
gestEmail emailSend = new gestEmail("");
if (chkSSL.Checked)
{
emailSend = new gestEmail(txtSmtpServ.Text, txtEmailUser.Text, txtEmailPwd.Text);
}
else
{
emailSend = new gestEmail(txtSmtpServ.Text);
}
// invio!
var result = emailSend.mandaEmail(txtEmailFrom.Text, txtEmailDest.Text, txtSubj.Text, txtMessage.Text);
txtEmailTestOut.Text = $"Inviato messaggio, esito: {result}";
}
}
catch(Exception exc)
{
txtEmailTestOut.Text = $"Eccezione in invio:{Environment.NewLine}{exc}";
}
}
private void tabPage10_Enter(object sender, EventArgs e)
{
// imposto setup...
txtServerPort.Text = memLayer.ML.CRS("_PortSSL");
chkSSL.Checked = memLayer.ML.CRB("_enableSSL");
}
} }
} }