Aggiornato gestione AGBOptionText
This commit is contained in:
@@ -80,7 +80,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public List<AGBOption> HwdOptionList
|
||||
public List<AGBOption> HwOptionList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -478,7 +478,7 @@ namespace WebWindowComplex.Models
|
||||
/// </summary>
|
||||
public void ReqRefreshHwOption()
|
||||
{
|
||||
HwdOptionList.Clear();
|
||||
HwOptionList.Clear();
|
||||
// chiamata evento calcolo opzioni hardware
|
||||
OnReqHwOptionPreview(m_ParentWindow.sSerialized(), SelHardware.Id);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
RefreshHardwareList();
|
||||
// se il vecchio hw selezionato non va più bene viene selezionato il primo della lista
|
||||
if(!HardwareList.Contains(m_SelHardware) && m_SelHardware.Shape != m_CurrShape)
|
||||
if(!HardwareList.Contains(m_SelHardware) || m_SelHardware.Shape != m_CurrShape)
|
||||
SetFirstHardware();
|
||||
}
|
||||
|
||||
@@ -691,25 +691,25 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (!string.IsNullOrEmpty(OptionXml))
|
||||
{
|
||||
ParametriOpzioni HwdOptions = null;
|
||||
ParametriOpzioni HwOptions = null;
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(ParametriOpzioni));
|
||||
StringReader reader = new StringReader(OptionXml);
|
||||
HwdOptions = (ParametriOpzioni)serializer.Deserialize(reader);
|
||||
if (HwdOptions.Items != null)
|
||||
HwOptions = (ParametriOpzioni)serializer.Deserialize(reader);
|
||||
if (HwOptions.Items != null)
|
||||
{
|
||||
m_HwdOptionList.Clear();
|
||||
foreach (var HdwOption in HwdOptions.Items)
|
||||
foreach (var HwOption in HwOptions.Items)
|
||||
{
|
||||
switch (HdwOption.Tipo)
|
||||
switch (HwOption.Tipo)
|
||||
{
|
||||
case "Text":
|
||||
{
|
||||
m_HwdOptionList.Add(new AGBOptionText(HdwOption));
|
||||
m_HwdOptionList.Add(new AGBOptionText(HwOption));
|
||||
break;
|
||||
}
|
||||
case "List":
|
||||
{
|
||||
m_HwdOptionList.Add(new AGBOptionCombo(HdwOption));
|
||||
m_HwdOptionList.Add(new AGBOptionCombo(HwOption));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user