Update display aggiornamenti
- maca gestione timer autorefresh componente - manca testing finale - manca clickonce finale
This commit is contained in:
@@ -29,6 +29,7 @@ namespace EgwControlCenter.Core
|
||||
#region Public Events
|
||||
|
||||
public event Action EA_ConfigUpdated = null!;
|
||||
public event Action EA_StatusUpdated = null!;
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
@@ -67,14 +68,34 @@ namespace EgwControlCenter.Core
|
||||
get => CurrCheck.CurrPatrolCont.TargetList;
|
||||
set
|
||||
{
|
||||
if (CurrCheck.CurrPatrolCont.TargetList != value)
|
||||
{
|
||||
CurrCheck.CurrPatrolCont.TargetList = value;
|
||||
ReportConfigUpd();
|
||||
}
|
||||
CurrCheck.CurrPatrolCont.TargetList = value;
|
||||
ReportConfigUpd();
|
||||
}
|
||||
}
|
||||
|
||||
public List<VersStatusDTO> ListAppStatus
|
||||
{
|
||||
get => CurrCheck.ListAppStatus;
|
||||
set
|
||||
{
|
||||
CurrCheck.ListAppStatus = value;
|
||||
ReportStatusUpd();
|
||||
}
|
||||
}
|
||||
|
||||
public void ForceCheck()
|
||||
{
|
||||
//// forzo rilettura...
|
||||
//CurrCheck = new ReleaseChecker(ConfDir, DataDir);
|
||||
// effettua un refresh del controllo status...
|
||||
bool locCheckOk = CurrCheck.UpdateLocalStatus(true);
|
||||
if (locCheckOk)
|
||||
{
|
||||
bool remCheckOk = CurrCheck.CheckRemoteReleases();
|
||||
}
|
||||
ReportStatusUpd();
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -147,6 +168,13 @@ namespace EgwControlCenter.Core
|
||||
EA_ConfigUpdated?.Invoke();
|
||||
}
|
||||
}
|
||||
private void ReportStatusUpd()
|
||||
{
|
||||
if (EA_StatusUpdated!= null)
|
||||
{
|
||||
EA_StatusUpdated?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
|
||||
@@ -33,6 +33,11 @@ namespace EgwControlCenter.Core.Models
|
||||
/// </summary>
|
||||
public string RelTagsLast { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// indica se esista un update alla versione
|
||||
/// </summary>
|
||||
public bool HasUpdate { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
}
|
||||
|
||||
@@ -443,13 +443,14 @@ namespace EgwControlCenter.Core
|
||||
}
|
||||
// aggiorno obj calcolato versioni...
|
||||
ListAppStatus = ListStatus
|
||||
.Where(x => x.HasUpdate())
|
||||
//.Where(x => x.HasUpdate())
|
||||
.Select(x => new VersStatusDTO
|
||||
{
|
||||
CodApp = x.CodApp,
|
||||
VersNumCurr = x.CurrLocal.VersNum,
|
||||
VersNumLast = x.CurrRemote.VersNum,
|
||||
RelTagsLast = x.CurrRemote.RelTags
|
||||
RelTagsLast = x.CurrRemote.RelTags,
|
||||
HasUpdate= x.HasUpdate()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user