Completato allineamento a versioen attuale x comportamento blink
This commit is contained in:
@@ -21,7 +21,7 @@ namespace MP.Mon.Components
|
||||
public partial class DetailMSE
|
||||
{
|
||||
|
||||
protected string baseCss = "";
|
||||
protected string baseCss = "sem";
|
||||
protected bool dataLoaded { get; set; } = false;
|
||||
protected int kaFactor = 60 / 2;
|
||||
|
||||
@@ -35,7 +35,19 @@ namespace MP.Mon.Components
|
||||
|
||||
private string cssStatus(string codSemaforo)
|
||||
{
|
||||
return $"{baseCss}{codSemaforo.Substring(1, 2)}";
|
||||
string answ= $"{baseCss}{codSemaforo.Substring(1, 2)}";
|
||||
if (doAnimate)
|
||||
{
|
||||
// blink se secondo pari...
|
||||
DateTime adesso = DateTime.Now;
|
||||
int resto = 0;
|
||||
Math.DivRem(adesso.Second, 2, out resto);
|
||||
if (resto == 0)
|
||||
{
|
||||
answ += "_b";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private string cssComStatus(string semaforo, DateTime? lastUpdateN)
|
||||
@@ -45,6 +57,14 @@ namespace MP.Mon.Components
|
||||
if (DateTime.Now.Subtract(lastUpdate).TotalSeconds > (keepAliveMin * kaFactor))
|
||||
{
|
||||
answ = $"{baseCss}Ro";
|
||||
// blink se secondo pari...
|
||||
DateTime adesso = DateTime.Now;
|
||||
int resto = 0;
|
||||
Math.DivRem(adesso.Second, 2, out resto);
|
||||
if (resto == 0)
|
||||
{
|
||||
answ += "_b";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -58,7 +78,7 @@ namespace MP.Mon.Components
|
||||
}
|
||||
private void setupConf()
|
||||
{
|
||||
baseCss = doAnimate ? "semBlink" : "sem";
|
||||
//baseCss = doAnimate ? "semBlink" : "sem";
|
||||
}
|
||||
private bool showComErr(DateTime? lastUpdateN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user