Aggiunto ABGOption e modificato lista di test hardware

This commit is contained in:
Annamaria Sassi
2025-09-16 16:08:24 +02:00
parent 7f8d5621ed
commit 8550044f84
13 changed files with 309 additions and 144 deletions
+53 -28
View File
@@ -7,6 +7,7 @@ using System.Drawing;
using System.Runtime.Intrinsics.Arm;
using System.Xml.Serialization;
using WebWindowTest.Json;
using static WebWindowTest.ParametriOpzioni;
using static WebWindowTest.Json.WindowConst;
namespace WebWindowTest
@@ -16,7 +17,7 @@ namespace WebWindowTest
{
public event EventHandler<OnPreviewEventArgs> OnPreview = delegate { };
private String m_sProfilePath;
private string m_sProfilePath;
public string sProfilePath
{
get
@@ -1092,7 +1093,7 @@ namespace WebWindowTest
internal void SetSelHardwareFromId(string sId)
{
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId);
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId)?? new Hardware("","","","","",0,0);
if (m_SelHardware == null)
m_SelHardware = m_HardwareList[0];
}
@@ -1125,8 +1126,8 @@ namespace WebWindowTest
}
}
private ObservableCollection<AGBOption> m_HwdOptionList = new ObservableCollection<AGBOption>();
public ObservableCollection<AGBOption> HwdOptionList
private ObservableCollection<ParametriOpzioni> m_HwdOptionList = new ObservableCollection<ParametriOpzioni>();
public ObservableCollection<ParametriOpzioni> HwdOptionList
{
get
{
@@ -1831,7 +1832,7 @@ namespace WebWindowTest
}
}
public class AGBOption
public partial class ParametriOpzioni
{
public enum HDWOPTIONTYPES : int
{
@@ -1840,7 +1841,7 @@ namespace WebWindowTest
COMBO = 3
}
private HDWOPTIONTYPES m_Type;
protected HDWOPTIONTYPES m_Type;
public HDWOPTIONTYPES Type
{
get
@@ -1867,6 +1868,25 @@ namespace WebWindowTest
}
}
private Visibility m_OptVisibility;
public Visibility OptVisibility
{
get
{
return m_OptVisibility;
}
}
public ParametriOpzioni(ParametriOpzioniParametri HdwOptionParam)
{
m_sName = HdwOptionParam.NomeParametro;
m_sDescription = HdwOptionParam.DescrizioneParametro;
m_OptVisibility = Visibility.VISIBLE; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
}
}
public class AGBOptionCombo : ParametriOpzioni
{
private List<AGBOptionParameter> m_ValueList = new List<AGBOptionParameter>();
public List<AGBOptionParameter> ValueList
{
@@ -1889,30 +1909,13 @@ namespace WebWindowTest
}
}
private Visibility m_OptVisibility;
public Visibility OptVisibility
public AGBOptionCombo(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
{
get
{
return m_OptVisibility;
}
m_Type = HDWOPTIONTYPES.COMBO;
foreach (var Value in HdwOptionParam.Opzioni)
m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente)?? new AGBOptionParameter("", "");
}
//public AGBOption(ParametriOpzioniParametri HdwOptionParam)
//{
// if (HdwOptionParam.Opzioni.Count > 0)
// {
// m_Type = HDWOPTIONTYPES.COMBO;
// foreach (var Value in HdwOptionParam.Opzioni)
// m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
// }
// else
// m_Type = HDWOPTIONTYPES.TEXT;
// m_sName = HdwOptionParam.NomeParametro;
// m_sDescription = HdwOptionParam.DescrizioneParametro;
// m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente);
// m_OptVisibility = Visibility.Visible; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
//}
}
public class AGBOptionParameter
@@ -1942,6 +1945,28 @@ namespace WebWindowTest
}
}
public class AGBOptionText : ParametriOpzioni
{
private string m_sValue;
public string sValue
{
get
{
return m_sValue;
}
set
{
m_sValue = value;
}
}
public AGBOptionText(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
{
m_Type = HDWOPTIONTYPES.TEXT;
m_sValue = HdwOptionParam.ValoreCorrente;
}
}
public class FrameDimension
{
// valore massimo e minimo della dimensione del frame