update x gestioen richeiste forme + svg corrette
This commit is contained in:
@@ -11,19 +11,6 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
public class Sash : Area
|
||||
{
|
||||
|
||||
public event EventHandler<OnReqShapeEventArgs> OnReqShape = delegate { };
|
||||
|
||||
internal void OnReqShapePreview(string sJwd, int groupId)
|
||||
{
|
||||
OnReqShapeEventArgs e = new OnReqShapeEventArgs(sJwd, groupId);
|
||||
EventHandler<OnReqShapeEventArgs> handler = OnReqShape;
|
||||
if (handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
#region Public Fields
|
||||
|
||||
// Lista hardware completa passata dal chiamante del componente
|
||||
@@ -42,12 +29,14 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Events
|
||||
|
||||
public event EventHandler<OnReqShapeEventArgs> OnReqShape = delegate { };
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string sSashShape
|
||||
{
|
||||
get => m_CurrShape;
|
||||
}
|
||||
public bool bIsMeasureGlass
|
||||
{
|
||||
get
|
||||
@@ -452,6 +441,11 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public string sSashShape
|
||||
{
|
||||
get => m_CurrShape;
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -491,32 +485,6 @@ namespace WebWindowComplex.Models
|
||||
return newSash;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta calcolo shape corrente
|
||||
/// </summary>
|
||||
public void ReqRefreshShape()
|
||||
{
|
||||
if (m_HardwareCompleteList != null && m_HardwareCompleteList.Count > 0)
|
||||
{
|
||||
m_HardwareList.Clear();
|
||||
// reset shape corrente
|
||||
m_CurrShape = "";
|
||||
|
||||
// chiamata evento calcolo shape: gruppo da calcolare
|
||||
OnReqShapePreview(m_ParentWindow.sSerialized(), GroupId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Agfgiornamento HW List conseguente a ricezione nuiova Shape
|
||||
/// </summary>
|
||||
/// <param name="newShape"></param>
|
||||
public void UpdateShape(string newShape)
|
||||
{
|
||||
m_CurrShape = newShape;
|
||||
RefreshHardwareList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update valori ammissibili x HW list
|
||||
/// </summary>
|
||||
@@ -543,7 +511,6 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
ParentArea.AreaList.Remove(this);
|
||||
@@ -553,6 +520,40 @@ namespace WebWindowComplex.Models
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta calcolo shape corrente
|
||||
/// </summary>
|
||||
public void ReqRefreshShape()
|
||||
{
|
||||
if (m_HardwareCompleteList != null && m_HardwareCompleteList.Count > 0)
|
||||
{
|
||||
m_HardwareList.Clear();
|
||||
// reset shape corrente
|
||||
m_CurrShape = "";
|
||||
|
||||
// chiamata evento calcolo shape: gruppo da calcolare
|
||||
OnReqShapePreview(m_ParentWindow.sSerialized(), GroupId);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSelFamilyHardware(string sFamilyHw)
|
||||
{
|
||||
m_SelFamilyHardware = sFamilyHw;
|
||||
ReqRefreshShape();
|
||||
RefreshHardwareOptionList();
|
||||
SetFirstHardware();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Agfgiornamento HW List conseguente a ricezione nuiova Shape
|
||||
/// </summary>
|
||||
/// <param name="newShape"></param>
|
||||
public void UpdateShape(string newShape)
|
||||
{
|
||||
m_CurrShape = newShape;
|
||||
RefreshHardwareList();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
@@ -657,6 +658,16 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
internal void OnReqShapePreview(string sJwd, int groupId)
|
||||
{
|
||||
OnReqShapeEventArgs e = new OnReqShapeEventArgs(sJwd, groupId);
|
||||
EventHandler<OnReqShapeEventArgs> handler = OnReqShape;
|
||||
if (handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
internal void RefreshHardwareOptionList()
|
||||
{
|
||||
m_HwdOptionList.Clear();
|
||||
@@ -751,13 +762,6 @@ namespace WebWindowComplex.Models
|
||||
m_SashType = SashType;
|
||||
}
|
||||
|
||||
public void SetSelFamilyHardware(string sFamilyHw)
|
||||
{
|
||||
m_SelFamilyHardware = sFamilyHw;
|
||||
ReqRefreshShape();
|
||||
RefreshHardwareOptionList();
|
||||
SetFirstHardware();
|
||||
}
|
||||
internal string SetSelFamilyHardwareFromIndex(string codHardware)
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_SelFamilyHardware))
|
||||
@@ -765,8 +769,8 @@ namespace WebWindowComplex.Models
|
||||
var item = m_HardwareCompleteList
|
||||
.Where(x => x.Id == codHardware)
|
||||
.Select(x => x.FamilyName)
|
||||
.ToList();
|
||||
SelFamilyHardware = item.First();
|
||||
.FirstOrDefault();
|
||||
SelFamilyHardware = item ?? "";
|
||||
}
|
||||
return SelFamilyHardware;
|
||||
}
|
||||
@@ -779,18 +783,22 @@ namespace WebWindowComplex.Models
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
if (m_HardwareList.Count == 0)
|
||||
SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware(CustomHwId, "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
else
|
||||
SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware(CustomHwId, "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
if (SelHardware.Id == "")
|
||||
SelHardware = m_HardwareList.First();
|
||||
//SelFamilyHardware = m_SelHardware.FamilyName;
|
||||
SelHardware = m_HardwareList.First();
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Codice HW custom x gestione casi non risolvibili di selezione
|
||||
/// </summary>
|
||||
private const string CustomHwId = "000000";
|
||||
|
||||
private bool m_bIsMeasureGlass;
|
||||
|
||||
private bool m_bIsPercentage = true;
|
||||
@@ -799,6 +807,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private bool m_bSashBottomRail;
|
||||
|
||||
private string m_CurrShape = "";
|
||||
private List<Hardware> m_HardwareList = new List<Hardware>();
|
||||
|
||||
private List<ParametriOpzioni> m_HwdOptionList = new List<ParametriOpzioni>();
|
||||
@@ -816,7 +825,6 @@ namespace WebWindowComplex.Models
|
||||
private List<SashDimension> m_SashList = new List<SashDimension>();
|
||||
private SashTypes m_SashType;
|
||||
private string m_SelFamilyHardware;
|
||||
private string m_CurrShape = "";
|
||||
private Hardware m_SelHardware;
|
||||
private OrientationSash m_SelOrientationSashType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user