Gestiti elementi degli split
This commit is contained in:
@@ -173,15 +173,24 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
@foreach (var element in CurrSplit.ElemDimHorizList)
|
||||
{
|
||||
<EditElement CurrRec="element" EC_Update="UpdateElement"></EditElement>
|
||||
}
|
||||
<div class="d-flex justify-content-start align-items-center px-2">
|
||||
<h6>Element vert</h6>
|
||||
</div>
|
||||
@foreach (var element in CurrSplit.ElemDimVertList)
|
||||
{
|
||||
<EditElement CurrRec="element" EC_Update="UpdateElement"></EditElement>
|
||||
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
||||
}
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="d-flex justify-content-start align-items-center px-2">
|
||||
<h6>Element horiz</h6>
|
||||
</div>
|
||||
@foreach (var element in CurrSplit.ElemDimHorizList)
|
||||
{
|
||||
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task UpdateElement(ElementDimension updRec)
|
||||
private async Task UpdateElement(SplitElementDimension updRec)
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = CurrSplit.ElemDimHorizList.FirstOrDefault(x => x.ParentArea == updRec.ParentArea && x.nIndex == updRec.nIndex);
|
||||
@@ -235,7 +235,8 @@ namespace WebWindowComplex.Compo
|
||||
{
|
||||
if (s.Equals(CurrSplit) && e.Value != null)
|
||||
{
|
||||
s.SetSplitStartVert((bool)e.Value);
|
||||
s.bSplitStartVert = (bool)e.Value;
|
||||
//s.SetSplitStartVert((bool)e.Value);
|
||||
}
|
||||
}
|
||||
var args = new DataUpdateSplit()
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
@using static WebWindowComplex.LayoutConst
|
||||
<div class="input-group mb-2">
|
||||
@if (CurrRec.nSubArea > 0)
|
||||
{
|
||||
<span class="input-group-text">A:@(CurrRec.nSubArea)</span>
|
||||
}
|
||||
<span class="input-group-text">N:@(CurrRec.nIndex)</span>
|
||||
@if (User)
|
||||
{
|
||||
<input type="text" readonly class="form-control" value="@(CurrRec.dDimension)">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="text" class="form-control" @bind="@(updateVal)">
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebWindowComplex.Models;
|
||||
|
||||
namespace WebWindowComplex.Compo
|
||||
{
|
||||
public partial class EditSplitElement
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Joint corrente
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public SplitElementDimension CurrRec { get; set; } = null!;
|
||||
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<SplitElementDimension> EC_Update { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Livello di accesso (utente base)
|
||||
/// </summary>
|
||||
[CascadingParameter(Name = "User")]
|
||||
public bool User { get; set; } = false!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiornare element corrente
|
||||
/// </summary>
|
||||
private double updateVal
|
||||
{
|
||||
get => CurrRec.dDimension;
|
||||
set
|
||||
{
|
||||
if (CurrRec.dDimension != value)
|
||||
{
|
||||
CurrRec.dDimension = value;
|
||||
_ = EC_Update.InvokeAsync(CurrRec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -544,9 +544,9 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
|
||||
|
||||
private List<JsonElementDimension> m_ElemDimVertList = new List<JsonElementDimension>();
|
||||
private List<JsonSplitElementDimension> m_ElemDimVertList = new List<JsonSplitElementDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonElementDimension> ElementDimVertList
|
||||
public List<JsonSplitElementDimension> ElementDimVertList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -554,9 +554,9 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonElementDimension> m_ElemDimHorizList = new List<JsonElementDimension>();
|
||||
private List<JsonSplitElementDimension> m_ElemDimHorizList = new List<JsonSplitElementDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonElementDimension> ElementDimHorizList
|
||||
public List<JsonSplitElementDimension> ElementDimHorizList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -581,10 +581,10 @@ namespace WebWindowComplex.Json
|
||||
split.SetSplitShape(m_SplitShape);
|
||||
split.SetSplitStartVert(m_SplitStartVert);
|
||||
if (m_SplitVertList.Count == 0)
|
||||
split.SetSplitQtyVert(0);
|
||||
split.SetSplitQtyVert(0, m_SplitHorizList.Count - 1);
|
||||
else
|
||||
{
|
||||
split.SetSplitQtyVert(m_SplitVertList.Count - 1);
|
||||
split.SetSplitQtyVert(m_SplitVertList.Count - 1, m_SplitHorizList.Count);
|
||||
for (var SplitIndex = 0; SplitIndex <= m_SplitVertList.Count - 1; SplitIndex++)
|
||||
{
|
||||
split.SplitVertList[SplitIndex].SetIsRelative(m_SplitVertList[SplitIndex].IsRelative);
|
||||
@@ -592,13 +592,17 @@ namespace WebWindowComplex.Json
|
||||
split.SplitVertList[SplitIndex].SetMeasureType(m_SplitVertList[SplitIndex].MeasureType);
|
||||
}
|
||||
for (int index = 0; index < ElementDimVertList.Count; index++)
|
||||
{
|
||||
split.ElemDimVertList.ElementAt(index).SetSubArea(m_ElemDimVertList[index].Area);
|
||||
split.ElemDimVertList.ElementAt(index).SetIndex(m_ElemDimVertList[index].Index);
|
||||
split.ElemDimVertList.ElementAt(index).SetDimension(m_ElemDimVertList[index].Value);
|
||||
}
|
||||
}
|
||||
if (m_SplitHorizList.Count == 0)
|
||||
split.SetSplitQtyHoriz(0);
|
||||
split.SetSplitQtyHoriz(0, m_SplitVertList.Count);
|
||||
else
|
||||
{
|
||||
split.SetSplitQtyHoriz(m_SplitHorizList.Count - 1);
|
||||
split.SetSplitQtyHoriz(m_SplitHorizList.Count - 1, m_SplitVertList.Count);
|
||||
for (var SplitIndex = 0; SplitIndex <= m_SplitHorizList.Count - 1; SplitIndex++)
|
||||
{
|
||||
split.SplitHorizList[SplitIndex].SetIsRelative(m_SplitHorizList[SplitIndex].IsRelative);
|
||||
@@ -606,7 +610,11 @@ namespace WebWindowComplex.Json
|
||||
split.SplitHorizList[SplitIndex].SetMeasureType(m_SplitHorizList[SplitIndex].MeasureType);
|
||||
}
|
||||
for (int index = 0; index < ElementDimHorizList.Count; index++)
|
||||
{
|
||||
split.ElemDimHorizList.ElementAt(index).SetSubArea(m_ElemDimHorizList[index].Area);
|
||||
split.ElemDimHorizList.ElementAt(index).SetIndex(m_ElemDimHorizList[index].Index);
|
||||
split.ElemDimHorizList.ElementAt(index).SetDimension(m_ElemDimHorizList[index].Value);
|
||||
}
|
||||
}
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
@@ -918,7 +926,59 @@ namespace WebWindowComplex.Json
|
||||
return newElementDimension;
|
||||
}
|
||||
}
|
||||
public class JsonSplitElementDimension
|
||||
{
|
||||
private int m_nIndex;
|
||||
[JsonProperty]
|
||||
public int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private double m_dValue;
|
||||
[JsonProperty]
|
||||
public double Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_dValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_dValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int m_nSubArea;
|
||||
[JsonProperty]
|
||||
public int Area
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSubArea;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nSubArea = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSplitElementDimension(int Index, double Value, int SubArea)
|
||||
{
|
||||
m_nIndex = Index;
|
||||
m_dValue = Value;
|
||||
m_nSubArea = SubArea;
|
||||
}
|
||||
|
||||
internal SplitElementDimension Deserialize(Area newArea)
|
||||
{
|
||||
SplitElementDimension newSplitElementDimension = new SplitElementDimension(newArea, m_nIndex, m_dValue, m_nSubArea);
|
||||
return newSplitElementDimension;
|
||||
}
|
||||
}
|
||||
public class JsonFrameDimension
|
||||
{
|
||||
private int m_nIndex;
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace WebWindowComplex.Models
|
||||
// Aggiungo Area split di default
|
||||
Split SplitArea = Split.CreateSplit(this, SplitShapes.HORIZONTAL);
|
||||
// imposto i parametri di default
|
||||
SplitArea.SetSplitQtyHoriz(1);
|
||||
SplitArea.SetSplitQtyHoriz(1, 0);
|
||||
SplitArea.SetSplitStartVert(false);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SplitArea);
|
||||
|
||||
@@ -88,6 +88,11 @@ namespace WebWindowComplex.Models
|
||||
m_dDimension = dValue;
|
||||
}
|
||||
|
||||
public void SetIndex(int nIndex)
|
||||
{
|
||||
m_nIndex = nIndex;
|
||||
}
|
||||
|
||||
public void SetMaxDimension(double dValue)
|
||||
{
|
||||
m_dMax = dValue;
|
||||
|
||||
@@ -30,6 +30,32 @@ namespace WebWindowComplex.Models
|
||||
set
|
||||
{
|
||||
m_bSplitStartVert = value;
|
||||
m_ElemDimVertList.Clear();
|
||||
m_ElemDimHorizList.Clear();
|
||||
if (value)
|
||||
{
|
||||
for (int i = 0; i < nSplitQtyVert; i++)
|
||||
{
|
||||
m_ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, 0));
|
||||
}
|
||||
for (int subArea = 0; subArea < m_SplitVertList.Count; subArea++)
|
||||
{
|
||||
for (int index = 0; index < nSplitQtyHoriz; index++)
|
||||
m_ElemDimHorizList.Add(new SplitElementDimension(this, index + 1, 78, subArea + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < nSplitQtyHoriz; i++)
|
||||
{
|
||||
m_ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, 0));
|
||||
}
|
||||
for (int subArea = 0; subArea < m_SplitHorizList.Count; subArea++)
|
||||
{
|
||||
for (int index = 0; index < nSplitQtyVert; index++)
|
||||
m_ElemDimVertList.Add(new SplitElementDimension(this, index + 1, 78, subArea + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +105,27 @@ namespace WebWindowComplex.Models
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitHorizList.Count; SplitIndex <= value; SplitIndex++)
|
||||
m_SplitHorizList.Add(new SplitDimension(dNewDimension, m_SplitHorizList[m_SplitHorizList.Count - 1].MeasureType, true, this, false));
|
||||
ElemDimHorizList.Add(new ElementDimension(this, ElemDimHorizList.Count, 78));
|
||||
//ElemDimHorizList.Add(new SplitElementDimension(this, ElemDimHorizList.Count, 78));
|
||||
if (!m_bSplitStartVert)
|
||||
{
|
||||
//Aggiungo un elemento alla sottoarea principale
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, ElemDimHorizList.Max(x => x.nIndex) + 1, 78, 0));
|
||||
// Aggiungo a tutte le sottoaree degli element
|
||||
int subArea = ElemDimVertList.Max(x => x.nSubArea) + 1;
|
||||
for (int i = 1; i <= ElemDimVertList.Max(x => x.nIndex); i++)
|
||||
{
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, i, 78, subArea));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Aggiungo a tutte le sottoaree degli element
|
||||
for (int i = 1; i <= ElemDimHorizList.Max(x => x.nSubArea); i++)
|
||||
{
|
||||
int index = ElemDimHorizList.Where(x => x.nSubArea == i).Max(x => x.nIndex);
|
||||
ElemDimHorizList.Insert(index * i + (i - 1), new SplitElementDimension(this, index + 1, 78, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
@@ -92,7 +138,21 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
dLastDimension += m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].SetDimension(dLastDimension);
|
||||
ElemDimHorizList.RemoveAt(ElemDimHorizList.Count-1);
|
||||
if (m_bSplitStartVert)
|
||||
{
|
||||
// Rimuovo da tutte le sottoaree degli element l'ultimo elemento
|
||||
for (int subArea = 1; subArea <= ElemDimHorizList.Max(x => x.nSubArea); subArea++)
|
||||
{
|
||||
SplitElementDimension removeElem = ElemDimHorizList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault();
|
||||
ElemDimHorizList.Remove(removeElem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int deleteSubArea = ElemDimHorizList.Count + 1;
|
||||
ElemDimHorizList.RemoveAt(ElemDimHorizList.Count - 1);
|
||||
ElemDimVertList.RemoveAll(x => x.nSubArea == deleteSubArea);
|
||||
}
|
||||
}
|
||||
// Controllo quanti split verticali ci sono
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
@@ -174,6 +234,26 @@ namespace WebWindowComplex.Models
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitVertList.Count; SplitIndex <= value; SplitIndex++)
|
||||
m_SplitVertList.Add(new SplitDimension(dNewDimension, m_SplitVertList[m_SplitVertList.Count - 1].MeasureType, true, this, true));
|
||||
if (m_bSplitStartVert)
|
||||
{
|
||||
//Aggiungo un elemento alla sottoarea principale
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, ElemDimVertList.Max(x => x.nIndex) + 1, 78, 0));
|
||||
// Aggiungo a tutte le sottoaree degli element
|
||||
int subArea = ElemDimHorizList.Max(x => x.nSubArea) + 1;
|
||||
for (int i = 1; i <= ElemDimHorizList.Max(x => x.nIndex); i++)
|
||||
{
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, i, 78, subArea));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Aggiungo a tutte le sottoaree un elemento
|
||||
for (int i = 1; i <= ElemDimVertList.Max(x => x.nSubArea); i++)
|
||||
{
|
||||
int index = ElemDimVertList.Where(x => x.nSubArea == i).Max(x => x.nIndex);
|
||||
ElemDimVertList.Insert(index * i + (i - 1), new SplitElementDimension(this, index + 1, 78, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
@@ -200,8 +280,21 @@ namespace WebWindowComplex.Models
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
ElemDimVertList.RemoveAt(ElemDimVertList.Count - 1);
|
||||
|
||||
if (m_bSplitStartVert)
|
||||
{
|
||||
int deleteSubArea = ElemDimVertList.Count + 1;
|
||||
ElemDimVertList.RemoveAt(ElemDimVertList.Count - 1);
|
||||
ElemDimHorizList.RemoveAll(x=>x.nSubArea == deleteSubArea);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Rimuovo da tutte le sottoaree degli element l'ultimo elemento
|
||||
for (int subArea = 1; subArea <= ElemDimVertList.Max(x => x.nSubArea); subArea++)
|
||||
{
|
||||
SplitElementDimension removeElem = ElemDimVertList.Where(x => x.nSubArea == subArea).OrderByDescending(x => x.nIndex).FirstOrDefault();
|
||||
ElemDimVertList.Remove(removeElem);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Controllo quanti split orizzontali ci sono
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
@@ -263,25 +356,25 @@ namespace WebWindowComplex.Models
|
||||
SplitShapes OldSelShapeSplit = m_SelSplitShape;
|
||||
m_SelSplitShape = (SplitShapes)value;
|
||||
// Azzero quantità orizzontale e verticale
|
||||
SetSplitQtyVert(0);
|
||||
SetSplitQtyHoriz(0);
|
||||
SetSplitQtyVert(0, 0);
|
||||
SetSplitQtyHoriz(0,0);
|
||||
if (m_SelSplitShape == SplitShapes.VERTICAL)
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyVert(1);
|
||||
SetSplitQtyVert(1, 0);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
else if (m_SelSplitShape == SplitShapes.HORIZONTAL)
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitQtyHoriz(1,0);
|
||||
SetSplitStartVert(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyVert(1);
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitQtyVert(1, 1);
|
||||
SetSplitQtyHoriz(1, 1);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
if(OldSelShapeSplit == SplitShapes.GRID || m_SelSplitShape == SplitShapes.GRID)
|
||||
@@ -313,7 +406,7 @@ namespace WebWindowComplex.Models
|
||||
m_SplitHorizList = value;
|
||||
}
|
||||
}
|
||||
public List<ElementDimension> ElemDimHorizList
|
||||
public List<SplitElementDimension> ElemDimHorizList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -325,7 +418,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public List<ElementDimension> ElemDimVertList
|
||||
public List<SplitElementDimension> ElemDimVertList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -392,12 +485,12 @@ namespace WebWindowComplex.Models
|
||||
newSplit.SetAreaType(AreaType);
|
||||
foreach (var item in ElemDimHorizList)
|
||||
{
|
||||
ElementDimension newElementDimension = item.Copy();
|
||||
SplitElementDimension newElementDimension = item.Copy();
|
||||
newSplit.ElemDimHorizList.Add(newElementDimension);
|
||||
}
|
||||
foreach (var item in ElemDimVertList)
|
||||
{
|
||||
ElementDimension newElementDimension = item.Copy();
|
||||
SplitElementDimension newElementDimension = item.Copy();
|
||||
newSplit.ElemDimVertList.Add(newElementDimension);
|
||||
}
|
||||
foreach (var item in AreaList)
|
||||
@@ -492,7 +585,7 @@ namespace WebWindowComplex.Models
|
||||
return JsonSplit;
|
||||
}
|
||||
|
||||
internal void SetSplitQtyHoriz(int QtyHoriz)
|
||||
internal void SetSplitQtyHoriz(int QtyHoriz, int QtyVert)
|
||||
{
|
||||
if (QtyHoriz > m_SplitHorizList.Count)
|
||||
{
|
||||
@@ -520,14 +613,25 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
ElemDimHorizList.Clear();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < QtyHoriz; i++)
|
||||
ElemDimHorizList.Add(new ElementDimension(this, i + 1, 78));
|
||||
if (bSplitStartVert)
|
||||
{
|
||||
for(int subArea = 0; subArea < QtyVert; subArea++)
|
||||
{
|
||||
for (int i = 0; i < QtyHoriz; i++)
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, subArea+1));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < QtyHoriz; i++)
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, 78, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetSplitQtyVert(int QtyVert)
|
||||
internal void SetSplitQtyVert(int QtyVert, int QtyHoriz)
|
||||
{
|
||||
if (QtyVert > m_SplitVertList.Count)
|
||||
{
|
||||
@@ -557,8 +661,19 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < QtyVert; i++)
|
||||
ElemDimVertList.Add(new ElementDimension(this, i + 1, 78));
|
||||
if (bSplitStartVert)
|
||||
{
|
||||
for (int i = 0; i < QtyVert; i++)
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, i + 1, 78, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int subArea = 0; subArea< QtyHoriz; subArea++)
|
||||
{
|
||||
for (int i = 0; i < QtyVert; i++)
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, i+1, 78, subArea + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,8 +721,8 @@ namespace WebWindowComplex.Models
|
||||
private SplitShapes m_SelSplitShape;
|
||||
|
||||
private List<SplitDimension> m_SplitHorizList = new List<SplitDimension>();
|
||||
private List<ElementDimension> m_ElemDimHorizList = new List<ElementDimension>();
|
||||
private List<ElementDimension> m_ElemDimVertList = new List<ElementDimension>();
|
||||
private List<SplitElementDimension> m_ElemDimHorizList = new List<SplitElementDimension>();
|
||||
private List<SplitElementDimension> m_ElemDimVertList = new List<SplitElementDimension>();
|
||||
private List<SplitDimension> m_SplitPositionList = new List<SplitDimension>();
|
||||
|
||||
private List<IdNameStruct> m_SplitShapeList = new List<IdNameStruct>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
public class SplitElementDimension:ElementDimension
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public SplitElementDimension(Area ParentArea, int nIndex, double dDimension, int subArea = -1):base(ParentArea, nIndex, dDimension)
|
||||
{
|
||||
m_nSubArea = subArea;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public int nSubArea
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSubArea;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nSubArea = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void SetSubArea(int nSubArea)
|
||||
{
|
||||
m_nSubArea = nSubArea;
|
||||
}
|
||||
|
||||
public SplitElementDimension Copy()
|
||||
{
|
||||
SplitElementDimension newSplitElementDimension = new SplitElementDimension(ParentArea, nIndex, dDimension, nSubArea);
|
||||
return newSplitElementDimension;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
internal JsonSplitElementDimension Serialize()
|
||||
{
|
||||
JsonSplitElementDimension JsonElementDimension = new JsonSplitElementDimension(base.nIndex, base.dDimension, m_nSubArea);
|
||||
return JsonElementDimension;
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private int m_nSubArea = -1;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.8.1.2816</Version>
|
||||
<Version>2.8.1.2912</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -154,5 +154,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user