update decodifica XML conf moduli
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
<xs:element name="idParam" type="xs:int" />
|
||||
<xs:element name="showDelay" type="xs:boolean" />
|
||||
<xs:element name="priority" type="xs:int" />
|
||||
<xs:element name="scaleFactor" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="numDec" type="xs:int" minOccurs="0" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -625,7 +625,7 @@ namespace Thermo.Active.Config
|
||||
NumDec = Convert.ToInt32(x.Element("numDec").Value),
|
||||
MinVal = Convert.ToInt32(x.Element("minVal").Value),
|
||||
MaxVal = Convert.ToInt32(x.Element("maxVal").Value),
|
||||
|
||||
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
@@ -644,14 +644,14 @@ namespace Thermo.Active.Config
|
||||
{
|
||||
Id = Convert.ToInt16(x.Element("id").Value),
|
||||
Label = x.Element("label").Value,
|
||||
//LocalizedLabels = x.Element("localizedLabels").Elements().ToDictionary(
|
||||
// y => y.Attribute("langKey").Value, y => y.Value
|
||||
// ),
|
||||
Type = GetTActMB_Type(x.Element("type").Value),
|
||||
Section = GetTActMB_Section(x.Element("section").Value),
|
||||
IdParam = Convert.ToInt16(x.Element("idParam").Value),
|
||||
ShowDelay = Convert.ToBoolean(x.Element("showDelay").Value),
|
||||
Priority = Convert.ToInt16(x.Element("priority").Value)
|
||||
Priority = Convert.ToInt16(x.Element("priority").Value),
|
||||
// attributi presi da default se NON presenti...
|
||||
ScaleFactor = x.Element("scaleFactor") != null ? Convert.ToInt16(x.Element("scaleFactor").Value) : 1000,
|
||||
NumDec = x.Element("numDec") != null ? Convert.ToInt16(x.Element("numDec").Value) : 1
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -12,5 +12,7 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public int IdParam { get; set; }
|
||||
public bool ShowDelay { get; set; }
|
||||
public int Priority { get; set; }
|
||||
public int ScaleFactor { get; set; } = 1000;
|
||||
public int NumDec { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Format { get; set; }
|
||||
public int ScaleFactor { get; set; }
|
||||
public int NumDec { get; set; }
|
||||
public int ScaleFactor { get; set; } = 1;
|
||||
public int NumDec { get; set; } = 0;
|
||||
public Dictionary<string, EnumDetail> EnumVal { get; set; }
|
||||
public string Anim { get; set; }
|
||||
}
|
||||
|
||||
@@ -13,10 +13,12 @@ namespace Thermo.Active.Model.DTOModels.ThModules
|
||||
public int IdParam { get; set; } = 0;
|
||||
public bool ShowDelay { get; set; } = false;
|
||||
public int Priority { get; set; } = 0;
|
||||
public int ActualDelay { get; set; } = 0;
|
||||
public int ActualDuration { get; set; } = 0;
|
||||
public int EstimatedDelay { get; set; } = 0;
|
||||
public int EstimatedDuration { get; set; } = 0;
|
||||
public int ScaleFactor { get; set; } = 1000;
|
||||
public int NumDec { get; set; } = 1;
|
||||
public double ActualDelay { get; set; } = 0;
|
||||
public double ActualDuration { get; set; } = 0;
|
||||
public double EstimatedDelay { get; set; } = 0;
|
||||
public double EstimatedDuration { get; set; } = 0;
|
||||
public List<short> PrecedingId { get; set; } = new List<short>();
|
||||
public bool Visible { get; set; } = false;
|
||||
public bool Running { get; set; } = false;
|
||||
@@ -42,6 +44,10 @@ namespace Thermo.Active.Model.DTOModels.ThModules
|
||||
return false;
|
||||
if (Priority != item.Priority)
|
||||
return false;
|
||||
if (ScaleFactor != item.ScaleFactor)
|
||||
return false;
|
||||
if (NumDec != item.NumDec)
|
||||
return false;
|
||||
if (ActualDelay != item.ActualDelay)
|
||||
return false;
|
||||
if (ActualDuration != item.ActualDuration)
|
||||
|
||||
Reference in New Issue
Block a user