Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a512b14b6 | |||
| 51aaba515f | |||
| 05d38253a2 | |||
| 8b2be815a5 | |||
| 81704a5182 | |||
| e0ab2cf853 | |||
| 21eec2959c | |||
| 2011d1104c | |||
| f6fb374c23 | |||
| 5f422d3cc6 | |||
| 5292da811b | |||
| 8ec8e76fb5 | |||
| bfcd476190 | |||
| eb722c6e44 | |||
| 502d5ba092 | |||
| 1cb1878e8a | |||
| a54cd875ce | |||
| 4ab4a9c0ae | |||
| f1762a078f | |||
| 8781679ce7 |
Vendored
+3
-6
@@ -7,12 +7,9 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=758']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '5.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'SteamWareLib'
|
||||
}
|
||||
env.versionNumber = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILD_DATE_FORMATTED, "ddHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '5.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILD_DATE_FORMATTED, "ddHH"}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'SteamWareLib'
|
||||
}
|
||||
script {
|
||||
currentBuild.displayName = "${env.versionNumber}"
|
||||
|
||||
+1752
-1655
File diff suppressed because it is too large
Load Diff
+291
-257
@@ -3,274 +3,308 @@ using System.Collections.Generic;
|
||||
|
||||
namespace SteamWare
|
||||
{
|
||||
/// <summary>
|
||||
/// classe di wrap verso i TableAdapter impiegati
|
||||
/// </summary>
|
||||
public class DataWrap
|
||||
{
|
||||
#region area protected
|
||||
/// <summary>
|
||||
/// classe di wrap verso i TableAdapter impiegati
|
||||
/// </summary>
|
||||
public class DataWrap
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
/// <summary>
|
||||
/// metodo protected di avvio della classe
|
||||
/// </summary>
|
||||
protected DataWrap()
|
||||
{
|
||||
// inizializzo i table adapters
|
||||
avvioTableAdaptersBase();
|
||||
setupConnectionStringBase();
|
||||
avvioTableAdaptersSpec();
|
||||
setupConnectionStringSpec();
|
||||
setupVocabolario();
|
||||
}
|
||||
/// <summary>
|
||||
/// classe singleton x la gestione dei tableadapters
|
||||
/// </summary>
|
||||
public static DataWrap DW = new DataWrap();
|
||||
|
||||
/// <summary>
|
||||
/// procedura di avvio dei tableAdapter
|
||||
/// </summary>
|
||||
protected virtual void avvioTableAdaptersBase()
|
||||
{
|
||||
taLingue = new DataLayer_genericTableAdapters.LingueTableAdapter();
|
||||
taVocabolario = new DataLayer_genericTableAdapters.VocabolarioTableAdapter();
|
||||
taLogVoc = new DataLayer_genericTableAdapters.LogUpdateDbTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// procedura di avvio dei tableAdapter
|
||||
/// </summary>
|
||||
protected virtual void avvioTableAdaptersSpec()
|
||||
{
|
||||
taCdc = new DataLayer_AnagGenTableAdapters.CDCTableAdapter();
|
||||
taDiritti = new DataLayer_AnagGenTableAdapters.DIRITTITableAdapter();
|
||||
taPermessi = new DataLayer_AnagGenTableAdapters.PermessiTableAdapter();
|
||||
taFunzione = new DataLayer_AnagGenTableAdapters.FUNZIONETableAdapter();
|
||||
taPermessi2Funzione = new DataLayer_AnagGenTableAdapters.Permessi2FunzioneTableAdapter();
|
||||
taUtente = new DataLayer_AnagGenTableAdapters.UTENTETableAdapter();
|
||||
taUserData = new DataLayer_AnagGenTableAdapters.UserDataTableAdapter();
|
||||
taUserDataExt = new DataLayer_AnagGenTableAdapters.UserDataExtTableAdapter();
|
||||
taLogAna = new DataLayer_AnagGenTableAdapters.LogUpdateDbTableAdapter();
|
||||
taAnagDev = new DS_devicesTableAdapters.AnagDevicesTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config delal singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
string connStr = memLayer.ML.confReadString("VocabolarioConnectionString");
|
||||
// connections del db vocabolario
|
||||
taLingue.Connection.ConnectionString = connStr;
|
||||
taVocabolario.Connection.ConnectionString = connStr;
|
||||
taLogVoc.Connection.ConnectionString = connStr;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config della singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringSpec()
|
||||
{
|
||||
string connStrUt = memLayer.ML.confReadString("UtenteCdcConnectionString");
|
||||
string connStrPerm = memLayer.ML.confReadString("PermessiConnectionString");
|
||||
// cambio le connString - db anagrafica principale
|
||||
taCdc.Connection.ConnectionString = connStrUt;
|
||||
taDiritti.Connection.ConnectionString = connStrUt;
|
||||
taFunzione.Connection.ConnectionString = connStrUt;
|
||||
taUtente.Connection.ConnectionString = connStrUt;
|
||||
taUserData.Connection.ConnectionString = connStrUt;
|
||||
taUserDataExt.Connection.ConnectionString = connStrUt;
|
||||
taLogAna.Connection.ConnectionString = connStrUt;
|
||||
taAnagDev.Connection.ConnectionString = connStrUt;
|
||||
// connections del db dell'applicazione
|
||||
taPermessi.Connection.ConnectionString = connStrPerm;
|
||||
taPermessi2Funzione.Connection.ConnectionString = connStrPerm;
|
||||
}
|
||||
/// <summary>
|
||||
/// setup delle tabelle vocabolario
|
||||
/// </summary>
|
||||
protected void setupVocabolario()
|
||||
{
|
||||
if (memLayer.ML.isInCacheObject("dictVocabolario"))
|
||||
{
|
||||
if (memLayer.ML.cacheOnRedis)
|
||||
{
|
||||
dictVocabolario = JsonConvert.DeserializeObject<Dictionary<string, string>>(memLayer.ML.objCacheObj("dictVocabolario").ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
dictVocabolario = (Dictionary<string, string>)memLayer.ML.objCacheObj("dictVocabolario");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dictVocabolario = ricaricaDictVocabolario();
|
||||
if (memLayer.ML.cacheOnRedis)
|
||||
{
|
||||
string serVal = JsonConvert.SerializeObject(dictVocabolario);
|
||||
memLayer.ML.setCacheVal("dictVocabolario", serVal, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.setCacheVal("dictVocabolario", dictVocabolario, true);
|
||||
}
|
||||
}
|
||||
// scrivo quanti lemmi ha caricato!
|
||||
logger.lg.scriviLog(string.Format("Caricati {0} lemmi!", dictVocabolario.Count));
|
||||
}
|
||||
/// <summary>
|
||||
/// oggetto vocabolario organizzato come dizionario con chiave lang#lemma e valore la traduzione
|
||||
/// </summary>
|
||||
public Dictionary<string, string> dictVocabolario;
|
||||
|
||||
/// <summary>
|
||||
/// prende l'oggetto tabVocabolario in ram e lo trasforma in dictionary
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, string> ricaricaDictVocabolario()
|
||||
{
|
||||
// continuo
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
if (taVocabolario == null)
|
||||
{
|
||||
foreach (DataLayer_generic.VocabolarioRow riga in DW.taVocabolario.GetData())
|
||||
/// <summary>
|
||||
/// table adapter Devices utente
|
||||
/// </summary>
|
||||
public DS_devicesTableAdapters.AnagDevicesTableAdapter taAnagDev;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter CdC
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.CDCTableAdapter taCdc;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter diritti
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.DIRITTITableAdapter taDiritti;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter funzione
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.FUNZIONETableAdapter taFunzione;
|
||||
|
||||
/// <summary>
|
||||
/// table adapter lingue
|
||||
/// </summary>
|
||||
public DataLayer_genericTableAdapters.LingueTableAdapter taLingue;
|
||||
|
||||
/// <summary>
|
||||
/// table adapter versione anagrafica
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.LogUpdateDbTableAdapter taLogAna;
|
||||
|
||||
/// <summary>
|
||||
/// table adapter versione vocabolario
|
||||
/// </summary>
|
||||
public DataLayer_genericTableAdapters.LogUpdateDbTableAdapter taLogVoc;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter permessi
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.PermessiTableAdapter taPermessi;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter permessi2funzione
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.Permessi2FunzioneTableAdapter taPermessi2Funzione;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter userData (user/pwd)
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.UserDataTableAdapter taUserData;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter userDataExt (user/pwd)
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.UserDataExtTableAdapter taUserDataExt;
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter utenti
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.UTENTETableAdapter taUtente;
|
||||
|
||||
/// <summary>
|
||||
/// table adapter vocabolario
|
||||
/// </summary>
|
||||
public DataLayer_genericTableAdapters.VocabolarioTableAdapter taVocabolario;
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// metodo protected di avvio della classe
|
||||
/// </summary>
|
||||
public DataWrap()
|
||||
{
|
||||
answ.Add(riga.Lingua.ToUpper() + "#" + riga.Lemma.ToUpper(), riga.Traduzione);
|
||||
// inizializzo i table adapters
|
||||
avvioTableAdaptersBase();
|
||||
setupConnectionStringBase();
|
||||
avvioTableAdaptersSpec();
|
||||
setupConnectionStringSpec();
|
||||
setupVocabolario();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (DataLayer_generic.VocabolarioRow riga in taVocabolario.GetData())
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// elenco lingue ammesse da vocabolario...
|
||||
/// </summary>
|
||||
public DataLayer_generic.LingueDataTable lingue
|
||||
{
|
||||
answ.Add(riga.Lingua.ToUpper() + "#" + riga.Lemma.ToUpper(), riga.Traduzione);
|
||||
get
|
||||
{
|
||||
return taLingue.GetData();
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// tableAdapter diritti
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.DIRITTITableAdapter taDiritti;
|
||||
/// <summary>
|
||||
/// tableAdapter permessi
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.PermessiTableAdapter taPermessi;
|
||||
/// <summary>
|
||||
/// tableAdapter funzione
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.FUNZIONETableAdapter taFunzione;
|
||||
/// <summary>
|
||||
/// tableAdapter permessi2funzione
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.Permessi2FunzioneTableAdapter taPermessi2Funzione;
|
||||
/// <summary>
|
||||
/// tableAdapter CdC
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.CDCTableAdapter taCdc;
|
||||
/// <summary>
|
||||
/// tableAdapter utenti
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.UTENTETableAdapter taUtente;
|
||||
/// <summary>
|
||||
/// tableAdapter userData (user/pwd)
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.UserDataTableAdapter taUserData;
|
||||
/// <summary>
|
||||
/// tableAdapter userDataExt (user/pwd)
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.UserDataExtTableAdapter taUserDataExt;
|
||||
/// <summary>
|
||||
/// table adapter lingue
|
||||
/// </summary>
|
||||
public DataLayer_genericTableAdapters.LingueTableAdapter taLingue;
|
||||
/// <summary>
|
||||
/// table adapter vocabolario
|
||||
/// </summary>
|
||||
public DataLayer_genericTableAdapters.VocabolarioTableAdapter taVocabolario;
|
||||
/// <summary>
|
||||
/// table adapter versione vocabolario
|
||||
/// </summary>
|
||||
public DataLayer_genericTableAdapters.LogUpdateDbTableAdapter taLogVoc;
|
||||
/// <summary>
|
||||
/// table adapter versione anagrafica
|
||||
/// </summary>
|
||||
public DataLayer_AnagGenTableAdapters.LogUpdateDbTableAdapter taLogAna;
|
||||
/// <summary>
|
||||
/// table adapter Devices utente
|
||||
/// </summary>
|
||||
public DS_devicesTableAdapters.AnagDevicesTableAdapter taAnagDev;
|
||||
/// <summary>
|
||||
/// oggetto vocabolario organizzato come dizionario con chiave lang#lemma e valore la traduzione
|
||||
/// </summary>
|
||||
public Dictionary<string, string> dictVocabolario;
|
||||
/// <summary>
|
||||
/// resetta il vocabolario rileggendo i dati...
|
||||
/// </summary>
|
||||
public void resetVocabolario()
|
||||
{
|
||||
memLayer.ML.emptyCacheVal("dictVocabolario");
|
||||
setupVocabolario();
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se il vocabolario sia ok...
|
||||
/// </summary>
|
||||
public bool vocabolarioOk
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
/// <summary>
|
||||
/// restituisce conteggio numero record dell'oggetto vocabolario
|
||||
/// </summary>
|
||||
public int numRecVoc
|
||||
{
|
||||
answ = (dictVocabolario != null);
|
||||
if (answ)
|
||||
{
|
||||
answ = dictVocabolario.Count > 0;
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = dictVocabolario.Count;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// crea nel db corrente il lemma richiesto e lo valorizza come "--{0}--"
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public void creaNuovoLemmaVoc(string lemma)
|
||||
{
|
||||
foreach (DataLayer_generic.LingueRow rigaLingua in taLingue.GetData())
|
||||
{
|
||||
taVocabolario.Insert(rigaLingua.Lingua, lemma, string.Format("--{0}--", lemma));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce conteggio numero record dell'oggetto vocabolario
|
||||
/// </summary>
|
||||
public int numRecVoc
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
/// <summary>
|
||||
/// Verifica se il vocabolario sia ok...
|
||||
/// </summary>
|
||||
public bool vocabolarioOk
|
||||
{
|
||||
answ = dictVocabolario.Count;
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = (dictVocabolario != null);
|
||||
if (answ)
|
||||
{
|
||||
answ = dictVocabolario.Count > 0;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco lingue ammesse da vocabolario...
|
||||
/// </summary>
|
||||
public DataLayer_generic.LingueDataTable lingue
|
||||
{
|
||||
get
|
||||
{
|
||||
return taLingue.GetData();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// classe singleton x la gestione dei tableadapters
|
||||
/// </summary>
|
||||
public static DataWrap DW = new DataWrap();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// procedura di avvio dei tableAdapter
|
||||
/// </summary>
|
||||
protected virtual void avvioTableAdaptersBase()
|
||||
{
|
||||
taLingue = new DataLayer_genericTableAdapters.LingueTableAdapter();
|
||||
taVocabolario = new DataLayer_genericTableAdapters.VocabolarioTableAdapter();
|
||||
taLogVoc = new DataLayer_genericTableAdapters.LogUpdateDbTableAdapter();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// procedura di avvio dei tableAdapter
|
||||
/// </summary>
|
||||
protected virtual void avvioTableAdaptersSpec()
|
||||
{
|
||||
taCdc = new DataLayer_AnagGenTableAdapters.CDCTableAdapter();
|
||||
taDiritti = new DataLayer_AnagGenTableAdapters.DIRITTITableAdapter();
|
||||
taPermessi = new DataLayer_AnagGenTableAdapters.PermessiTableAdapter();
|
||||
taFunzione = new DataLayer_AnagGenTableAdapters.FUNZIONETableAdapter();
|
||||
taPermessi2Funzione = new DataLayer_AnagGenTableAdapters.Permessi2FunzioneTableAdapter();
|
||||
taUtente = new DataLayer_AnagGenTableAdapters.UTENTETableAdapter();
|
||||
taUserData = new DataLayer_AnagGenTableAdapters.UserDataTableAdapter();
|
||||
taUserDataExt = new DataLayer_AnagGenTableAdapters.UserDataExtTableAdapter();
|
||||
taLogAna = new DataLayer_AnagGenTableAdapters.LogUpdateDbTableAdapter();
|
||||
taAnagDev = new DS_devicesTableAdapters.AnagDevicesTableAdapter();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// prende l'oggetto tabVocabolario in ram e lo trasforma in dictionary
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, string> ricaricaDictVocabolario()
|
||||
{
|
||||
// continuo
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
if (taVocabolario == null)
|
||||
{
|
||||
foreach (DataLayer_generic.VocabolarioRow riga in DW.taVocabolario.GetData())
|
||||
{
|
||||
answ.Add(riga.Lingua.ToUpper() + "#" + riga.Lemma.ToUpper(), riga.Traduzione);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (DataLayer_generic.VocabolarioRow riga in taVocabolario.GetData())
|
||||
{
|
||||
answ.Add(riga.Lingua.ToUpper() + "#" + riga.Lemma.ToUpper(), riga.Traduzione);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config delal singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringBase()
|
||||
{
|
||||
string connStr = memLayer.ML.confReadString("VocabolarioConnectionString");
|
||||
// connections del db vocabolario
|
||||
taLingue.Connection.ConnectionString = connStr;
|
||||
taVocabolario.Connection.ConnectionString = connStr;
|
||||
taLogVoc.Connection.ConnectionString = connStr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config della singola applicazione
|
||||
/// </summary>
|
||||
protected virtual void setupConnectionStringSpec()
|
||||
{
|
||||
string connStrUt = memLayer.ML.confReadString("UtenteCdcConnectionString");
|
||||
string connStrPerm = memLayer.ML.confReadString("PermessiConnectionString");
|
||||
// cambio le connString - db anagrafica principale
|
||||
taCdc.Connection.ConnectionString = connStrUt;
|
||||
taDiritti.Connection.ConnectionString = connStrUt;
|
||||
taFunzione.Connection.ConnectionString = connStrUt;
|
||||
taUtente.Connection.ConnectionString = connStrUt;
|
||||
taUserData.Connection.ConnectionString = connStrUt;
|
||||
taUserDataExt.Connection.ConnectionString = connStrUt;
|
||||
taLogAna.Connection.ConnectionString = connStrUt;
|
||||
taAnagDev.Connection.ConnectionString = connStrUt;
|
||||
// connections del db dell'applicazione
|
||||
taPermessi.Connection.ConnectionString = connStrPerm;
|
||||
taPermessi2Funzione.Connection.ConnectionString = connStrPerm;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// setup delle tabelle vocabolario
|
||||
/// </summary>
|
||||
protected void setupVocabolario()
|
||||
{
|
||||
if (memLayer.ML.isInCacheObject("dictVocabolario"))
|
||||
{
|
||||
if (memLayer.ML.cacheOnRedis)
|
||||
{
|
||||
dictVocabolario = JsonConvert.DeserializeObject<Dictionary<string, string>>(memLayer.ML.objCacheObj("dictVocabolario").ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
dictVocabolario = (Dictionary<string, string>)memLayer.ML.objCacheObj("dictVocabolario");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dictVocabolario = ricaricaDictVocabolario();
|
||||
if (memLayer.ML.cacheOnRedis)
|
||||
{
|
||||
string serVal = JsonConvert.SerializeObject(dictVocabolario);
|
||||
memLayer.ML.setCacheVal("dictVocabolario", serVal, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.setCacheVal("dictVocabolario", dictVocabolario, true);
|
||||
}
|
||||
}
|
||||
// scrivo quanti lemmi ha caricato!
|
||||
logger.lg.scriviLog(string.Format("Caricati {0} lemmi!", dictVocabolario.Count));
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// crea nel db corrente il lemma richiesto e lo valorizza come "--{0}--"
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public void creaNuovoLemmaVoc(string lemma)
|
||||
{
|
||||
foreach (DataLayer_generic.LingueRow rigaLingua in taLingue.GetData())
|
||||
{
|
||||
taVocabolario.Insert(rigaLingua.Lingua, lemma, string.Format("--{0}--", lemma));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// resetta il vocabolario rileggendo i dati...
|
||||
/// </summary>
|
||||
public void resetVocabolario()
|
||||
{
|
||||
memLayer.ML.emptyCacheVal("dictVocabolario");
|
||||
setupVocabolario();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
+25
-18
@@ -118,7 +118,7 @@ namespace SteamWare
|
||||
if (updateData.IsUpdateAvailable)
|
||||
{
|
||||
string DownloadURL = updateData.DownloadURL;
|
||||
localFile = string.Format(@"{0}\{2}_Build_{1}.zip", localRepo, updateData.CurrentVersion, packName);
|
||||
localFile = string.Format(@"{0}\{1}_Build_{2}.zip", localRepo, packName, updateData.CurrentVersion);
|
||||
localLast = string.Format(@"{0}\{1}.zip", localRepo, packName);
|
||||
// scarica file e salva in directory locale...
|
||||
var client = new WebClient();
|
||||
@@ -185,31 +185,38 @@ namespace SteamWare
|
||||
// lettura
|
||||
var data = http.GetAsync(remoteUrl).Result;
|
||||
var myReader = data.Content.ReadAsStreamAsync();
|
||||
recXml.Load(myReader.Result);
|
||||
|
||||
XmlNodeList recData = recXml.SelectNodes("item");
|
||||
if (recData != null)
|
||||
if (data.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
foreach (XmlNode item in recData)
|
||||
logger.lg.scriviLog($"Errore in chiamata getUpdateInfo per URL {remoteUrl}: status code: {data.StatusCode}", tipoLog.INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
recXml.Load(myReader.Result);
|
||||
|
||||
XmlNodeList recData = recXml.SelectNodes("item");
|
||||
if (recData != null)
|
||||
{
|
||||
XmlNode appCastVersion = item.SelectSingleNode("version");
|
||||
Version.TryParse(appCastVersion?.InnerText, out CurrentVersion);
|
||||
args.CurrentVersion = CurrentVersion;
|
||||
XmlNode appCastChangeLog = item.SelectSingleNode("changelog");
|
||||
args.ChangelogURL = appCastChangeLog?.InnerText;
|
||||
XmlNode appCastUrl = item.SelectSingleNode("url");
|
||||
args.DownloadURL = appCastUrl?.InnerText;
|
||||
XmlNode mandatory = item.SelectSingleNode("mandatory");
|
||||
Boolean.TryParse(mandatory?.InnerText, out Mandatory);
|
||||
args.Mandatory = Mandatory;
|
||||
args.IsUpdateAvailable = true;
|
||||
foreach (XmlNode item in recData)
|
||||
{
|
||||
XmlNode appCastVersion = item.SelectSingleNode("version");
|
||||
Version.TryParse(appCastVersion?.InnerText, out CurrentVersion);
|
||||
args.CurrentVersion = CurrentVersion;
|
||||
XmlNode appCastChangeLog = item.SelectSingleNode("changelog");
|
||||
args.ChangelogURL = appCastChangeLog?.InnerText;
|
||||
XmlNode appCastUrl = item.SelectSingleNode("url");
|
||||
args.DownloadURL = appCastUrl?.InnerText;
|
||||
XmlNode mandatory = item.SelectSingleNode("mandatory");
|
||||
Boolean.TryParse(mandatory?.InnerText, out Mandatory);
|
||||
args.Mandatory = Mandatory;
|
||||
args.IsUpdateAvailable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Console.WriteLine($"Eccezione in getUpdateInfo:{Environment.NewLine}{exc}");
|
||||
logger.lg.scriviLog($"Eccezione in getUpdateInfo:{Environment.NewLine}{exc}");
|
||||
// metto versione = 0 + errore...
|
||||
args.IsUpdateAvailable = false;
|
||||
args.CurrentVersion = new Version("0.0.0.0");
|
||||
|
||||
@@ -629,7 +629,7 @@ namespace SteamWare
|
||||
protected void newLogfileName()
|
||||
{
|
||||
DateTime CurrentDateTime = DateTime.Now;
|
||||
_logfileName = _logBaseDir + String.Format("{0}.log", CurrentDateTime.ToString("yyyyMMdd"));
|
||||
_logfileName = _logBaseDir + String.Format("{0}.log", CurrentDateTime.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+1115
-1102
File diff suppressed because it is too large
Load Diff
+988
-941
File diff suppressed because it is too large
Load Diff
Generated
+70
-70
@@ -80,18 +80,18 @@
|
||||
this.txtQueueMessage = new System.Windows.Forms.TextBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.lblQueueRead = new System.Windows.Forms.Label();
|
||||
this.clockTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.LogTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.tabPage7 = new System.Windows.Forms.TabPage();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.txtUser = new System.Windows.Forms.TextBox();
|
||||
this.txtPass = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.btnDownload = new System.Windows.Forms.Button();
|
||||
this.lblOutUpdMan = new System.Windows.Forms.Label();
|
||||
this.btnReadUpdMan = new System.Windows.Forms.Button();
|
||||
this.txtRemoteUrl = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.btnReadUpdMan = new System.Windows.Forms.Button();
|
||||
this.lblOutUpdMan = new System.Windows.Forms.Label();
|
||||
this.btnDownload = new System.Windows.Forms.Button();
|
||||
this.txtPass = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.txtUser = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.clockTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.LogTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
@@ -668,16 +668,6 @@
|
||||
this.lblQueueRead.TabIndex = 1;
|
||||
this.lblQueueRead.Text = "...";
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// tabPage7
|
||||
//
|
||||
this.tabPage7.Controls.Add(this.btnDownload);
|
||||
@@ -697,22 +687,51 @@
|
||||
this.tabPage7.Text = "Update Man";
|
||||
this.tabPage7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label9
|
||||
// btnDownload
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(19, 20);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(29, 13);
|
||||
this.label9.TabIndex = 0;
|
||||
this.label9.Text = "User";
|
||||
this.btnDownload.Location = new System.Drawing.Point(496, 15);
|
||||
this.btnDownload.Name = "btnDownload";
|
||||
this.btnDownload.Size = new System.Drawing.Size(175, 23);
|
||||
this.btnDownload.TabIndex = 8;
|
||||
this.btnDownload.Text = "Download latest";
|
||||
this.btnDownload.UseVisualStyleBackColor = true;
|
||||
this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click);
|
||||
//
|
||||
// txtUser
|
||||
// lblOutUpdMan
|
||||
//
|
||||
this.txtUser.Location = new System.Drawing.Point(60, 17);
|
||||
this.txtUser.Name = "txtUser";
|
||||
this.txtUser.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtUser.TabIndex = 1;
|
||||
this.txtUser.Text = "SWDownloader";
|
||||
this.lblOutUpdMan.AutoSize = true;
|
||||
this.lblOutUpdMan.Location = new System.Drawing.Point(19, 76);
|
||||
this.lblOutUpdMan.Name = "lblOutUpdMan";
|
||||
this.lblOutUpdMan.Size = new System.Drawing.Size(16, 13);
|
||||
this.lblOutUpdMan.TabIndex = 7;
|
||||
this.lblOutUpdMan.Text = "---";
|
||||
//
|
||||
// btnReadUpdMan
|
||||
//
|
||||
this.btnReadUpdMan.Location = new System.Drawing.Point(315, 15);
|
||||
this.btnReadUpdMan.Name = "btnReadUpdMan";
|
||||
this.btnReadUpdMan.Size = new System.Drawing.Size(175, 23);
|
||||
this.btnReadUpdMan.TabIndex = 6;
|
||||
this.btnReadUpdMan.Text = "Retrieve Info";
|
||||
this.btnReadUpdMan.UseVisualStyleBackColor = true;
|
||||
this.btnReadUpdMan.Click += new System.EventHandler(this.btnReadUpdMan_Click);
|
||||
//
|
||||
// txtRemoteUrl
|
||||
//
|
||||
this.txtRemoteUrl.Location = new System.Drawing.Point(60, 43);
|
||||
this.txtRemoteUrl.Name = "txtRemoteUrl";
|
||||
this.txtRemoteUrl.Size = new System.Drawing.Size(611, 20);
|
||||
this.txtRemoteUrl.TabIndex = 5;
|
||||
this.txtRemoteUrl.Text = "http://nexus.steamware.net/repository/SWS/ZCode/master/LAST/manifest.xml";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(19, 46);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(20, 13);
|
||||
this.label11.TabIndex = 4;
|
||||
this.label11.Text = "Url";
|
||||
//
|
||||
// txtPass
|
||||
//
|
||||
@@ -731,51 +750,32 @@
|
||||
this.label10.TabIndex = 2;
|
||||
this.label10.Text = "Pass";
|
||||
//
|
||||
// txtRemoteUrl
|
||||
// txtUser
|
||||
//
|
||||
this.txtRemoteUrl.Location = new System.Drawing.Point(60, 43);
|
||||
this.txtRemoteUrl.Name = "txtRemoteUrl";
|
||||
this.txtRemoteUrl.Size = new System.Drawing.Size(611, 20);
|
||||
this.txtRemoteUrl.TabIndex = 5;
|
||||
this.txtRemoteUrl.Text = "http://nexus.steamware.net/repository/SWS/MP-STATS/unstable/0/manifest.xml";
|
||||
this.txtUser.Location = new System.Drawing.Point(60, 17);
|
||||
this.txtUser.Name = "txtUser";
|
||||
this.txtUser.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtUser.TabIndex = 1;
|
||||
this.txtUser.Text = "SWDownloader";
|
||||
//
|
||||
// label11
|
||||
// label9
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(19, 46);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(20, 13);
|
||||
this.label11.TabIndex = 4;
|
||||
this.label11.Text = "Url";
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(19, 20);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(29, 13);
|
||||
this.label9.TabIndex = 0;
|
||||
this.label9.Text = "User";
|
||||
//
|
||||
// btnReadUpdMan
|
||||
// clockTimer
|
||||
//
|
||||
this.btnReadUpdMan.Location = new System.Drawing.Point(315, 15);
|
||||
this.btnReadUpdMan.Name = "btnReadUpdMan";
|
||||
this.btnReadUpdMan.Size = new System.Drawing.Size(175, 23);
|
||||
this.btnReadUpdMan.TabIndex = 6;
|
||||
this.btnReadUpdMan.Text = "Retrieve Info";
|
||||
this.btnReadUpdMan.UseVisualStyleBackColor = true;
|
||||
this.btnReadUpdMan.Click += new System.EventHandler(this.btnReadUpdMan_Click);
|
||||
this.clockTimer.Interval = 50;
|
||||
this.clockTimer.Tick += new System.EventHandler(this.clockTimer_Tick);
|
||||
//
|
||||
// lblOutUpdMan
|
||||
// LogTimer
|
||||
//
|
||||
this.lblOutUpdMan.AutoSize = true;
|
||||
this.lblOutUpdMan.Location = new System.Drawing.Point(19, 76);
|
||||
this.lblOutUpdMan.Name = "lblOutUpdMan";
|
||||
this.lblOutUpdMan.Size = new System.Drawing.Size(16, 13);
|
||||
this.lblOutUpdMan.TabIndex = 7;
|
||||
this.lblOutUpdMan.Text = "---";
|
||||
//
|
||||
// btnDownload
|
||||
//
|
||||
this.btnDownload.Location = new System.Drawing.Point(496, 15);
|
||||
this.btnDownload.Name = "btnDownload";
|
||||
this.btnDownload.Size = new System.Drawing.Size(175, 23);
|
||||
this.btnDownload.TabIndex = 8;
|
||||
this.btnDownload.Text = "Download latest";
|
||||
this.btnDownload.UseVisualStyleBackColor = true;
|
||||
this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click);
|
||||
this.LogTimer.Interval = 10;
|
||||
this.LogTimer.Tick += new System.EventHandler(this.LogTimer_Tick);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user