Aggiunta Threshold in Frame
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Egw.Window.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -10,6 +11,13 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
public class Frame : Area
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
// Lista hardware completa passata dal chiamante del componente
|
||||
public static List<Threshold> m_ThresholdList = new List<Threshold>();
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public Frame(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
@@ -44,6 +52,30 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public Threshold SelThreshold
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelThreshold;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelThreshold = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int SelThresholdFromType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelThreshold.Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelThreshold = m_ThresholdList.Where(x=>x.Type.Equals(value)).First();
|
||||
}
|
||||
}
|
||||
|
||||
public int BottomRailQty
|
||||
{
|
||||
get
|
||||
@@ -329,6 +361,7 @@ namespace WebWindowComplex.Models
|
||||
newFrame.SetSelShape(Shapes.RECTANGLE);
|
||||
newFrame.SetBottomRail(false);
|
||||
newFrame.SetBottomRailQty(0);
|
||||
newFrame.SetSelThresholdFromName(m_ThresholdList.FirstOrDefault().Name);
|
||||
//newFrame.FrameArcElem = null;
|
||||
return newFrame;
|
||||
}
|
||||
@@ -338,7 +371,7 @@ namespace WebWindowComplex.Models
|
||||
Area.nCounterGroup = 0;
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty, GroupId);
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_SelThreshold.Name, m_bBottomRail, m_nBottomRailQty, GroupId);
|
||||
//if (FrameArcElem != null)
|
||||
// JsonFrame.ArcElement = FrameArcElem.Serialize();
|
||||
//else
|
||||
@@ -477,6 +510,11 @@ namespace WebWindowComplex.Models
|
||||
m_Shape = Value;
|
||||
}
|
||||
|
||||
internal void SetSelThresholdFromName(string value)
|
||||
{
|
||||
m_SelThreshold = m_ThresholdList.Where(x=>x.Name.Equals(value)).First();
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
@@ -485,6 +523,8 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private bool m_bBottomRail;
|
||||
|
||||
private Threshold m_SelThreshold;
|
||||
|
||||
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();
|
||||
|
||||
private List<Joint> m_JointList = new List<Joint>();
|
||||
|
||||
Reference in New Issue
Block a user