Modificata proprietà SplitStartVert
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
public class AGBOptionParameter
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.ComponentModel.Design;
|
||||
using System.Linq;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using Egw.Window.Data;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
public partial class ParametriOpzioni
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
using Egw.Window.Data;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
@@ -31,34 +23,55 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bSplitStartVert = value;
|
||||
m_ElemDimVertList.Clear();
|
||||
m_ElemDimHorizList.Clear();
|
||||
double thickness = 78;
|
||||
if (ParentArea is Sash || ParentArea.ParentArea is Sash)
|
||||
thickness = 60;
|
||||
if (value)
|
||||
if(m_bSplitStartVert != value)
|
||||
{
|
||||
for (int i = 0; i < nSplitQtyVert; i++)
|
||||
m_bSplitStartVert = value;
|
||||
List<SplitElementDimension> elemVertListOld = new List<SplitElementDimension>(m_ElemDimVertList);
|
||||
List<SplitElementDimension> elemHorizListOld = new List<SplitElementDimension>(m_ElemDimHorizList);
|
||||
m_ElemDimVertList.Clear();
|
||||
m_ElemDimHorizList.Clear();
|
||||
double thickness = 78;
|
||||
if (ParentArea is Sash || ParentArea.ParentArea is Sash)
|
||||
thickness = 60;
|
||||
if (value)
|
||||
{
|
||||
m_ElemDimVertList.Add(new SplitElementDimension(this, i + 1, thickness, 0));
|
||||
for (int i = 0; i < nSplitQtyVert; i++)
|
||||
{
|
||||
SplitElementDimension newVertElem= elemVertListOld.Where(x=>x.nSubArea==1 && x.nIndex==i+1).First().Copy();
|
||||
newVertElem.SetElement(i + 1, thickness, 0);
|
||||
m_ElemDimVertList.Add(newVertElem);
|
||||
//m_ElemDimVertList.Add(new SplitElementDimension(this, i + 1, thickness, 0));
|
||||
}
|
||||
for (int subArea = 0; subArea < m_SplitVertList.Count; subArea++)
|
||||
{
|
||||
for (int index = 0; index < nSplitQtyHoriz; index++)
|
||||
{
|
||||
SplitElementDimension newHorizElem = elemHorizListOld.Where(x => x.nIndex == index+1).First().Copy();
|
||||
newHorizElem.SetElement(index + 1, thickness, subArea + 1);
|
||||
m_ElemDimHorizList.Add(newHorizElem);
|
||||
//m_ElemDimHorizList.Add(new SplitElementDimension(this, index + 1, thickness, subArea + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int subArea = 0; subArea < m_SplitVertList.Count; subArea++)
|
||||
else
|
||||
{
|
||||
for (int index = 0; index < nSplitQtyHoriz; index++)
|
||||
m_ElemDimHorizList.Add(new SplitElementDimension(this, index + 1, thickness, subArea + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < nSplitQtyHoriz; i++)
|
||||
{
|
||||
m_ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, thickness, 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, thickness, subArea + 1));
|
||||
for (int i = 0; i < nSplitQtyHoriz; i++)
|
||||
{
|
||||
SplitElementDimension newHorizElem = elemHorizListOld.Where(x => x.nSubArea == 1 && x.nIndex == i+1).First().Copy();
|
||||
newHorizElem.SetElement(i + 1, thickness, 0);
|
||||
m_ElemDimHorizList.Add(newHorizElem);
|
||||
//m_ElemDimHorizList.Add(new SplitElementDimension(this, i + 1, thickness, 0));
|
||||
}
|
||||
for (int subArea = 0; subArea < m_SplitHorizList.Count; subArea++)
|
||||
{
|
||||
for (int index = 0; index < nSplitQtyVert; index++)
|
||||
{
|
||||
SplitElementDimension newVertElem = elemVertListOld.Where(x => x.nIndex == index+1).First().Copy();
|
||||
newVertElem.SetElement(index + 1, thickness, subArea + 1);
|
||||
m_ElemDimVertList.Add(newVertElem);
|
||||
//m_ElemDimVertList.Add(new SplitElementDimension(this, index + 1, thickness, subArea + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,16 +130,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));
|
||||
double thickness = 78;
|
||||
if (ParentArea is Sash || ParentArea.ParentArea is Sash)
|
||||
thickness = 60;
|
||||
if (!m_bSplitStartVert)
|
||||
{
|
||||
//Aggiungo un elemento alla sottoarea principale
|
||||
ElemDimHorizList.Add(new SplitElementDimension(this, ElemDimHorizList.Max(x => x.nIndex) + 1, 78, 0));
|
||||
if(nSplitQtyVert > 0)
|
||||
SplitElementDimension newElemDim = ElemDimHorizList.First().Copy();
|
||||
newElemDim.SetElement(ElemDimHorizList.Max(x => x.nIndex) + 1, thickness, 0);
|
||||
ElemDimHorizList.Add(newElemDim);
|
||||
//ElemDimHorizList.Add(new SplitElementDimension(this, ElemDimHorizList.Max(x => x.nIndex) + 1, 78, 0));
|
||||
if (nSplitQtyVert > 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));
|
||||
{
|
||||
newElemDim = ElemDimVertList.First().Copy();
|
||||
newElemDim.SetElement(i, thickness, subArea);
|
||||
ElemDimVertList.Add(newElemDim);
|
||||
//ElemDimVertList.Add(new SplitElementDimension(this, i, 78, subArea));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -135,7 +159,10 @@ namespace WebWindowComplex.Models
|
||||
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));
|
||||
SplitElementDimension newElemDim = ElemDimVertList.First().Copy();
|
||||
newElemDim.SetElement(index + 1, thickness, i);
|
||||
ElemDimHorizList.Insert(index * i + (i - 1), newElemDim);
|
||||
//ElemDimHorizList.Insert(index * i + (i - 1), new SplitElementDimension(this, index + 1, thickness, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,16 +293,27 @@ 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));
|
||||
double thickness = 78;
|
||||
if (ParentArea is Sash || ParentArea.ParentArea is Sash)
|
||||
thickness = 60;
|
||||
if (m_bSplitStartVert)
|
||||
{
|
||||
//Aggiungo un elemento alla sottoarea principale
|
||||
ElemDimVertList.Add(new SplitElementDimension(this, ElemDimVertList.Max(x => x.nIndex) + 1, 78, 0));
|
||||
SplitElementDimension newElemDim = ElemDimVertList.First().Copy();
|
||||
newElemDim.SetElement(ElemDimVertList.Max(x => x.nIndex) + 1, thickness, 0);
|
||||
ElemDimVertList.Add(newElemDim);
|
||||
//ElemDimVertList.Add(new SplitElementDimension(this, ElemDimVertList.Max(x => x.nIndex) + 1, 78, 0));
|
||||
if(nSplitQtyHoriz > 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));
|
||||
{
|
||||
newElemDim = ElemDimHorizList.First().Copy();
|
||||
newElemDim.SetElement(i, thickness, subArea);
|
||||
ElemDimHorizList.Add(newElemDim);
|
||||
//ElemDimHorizList.Add(new SplitElementDimension(this, i, 78, subArea));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -284,7 +322,10 @@ namespace WebWindowComplex.Models
|
||||
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));
|
||||
SplitElementDimension newElemDim = ElemDimVertList.First().Copy();
|
||||
newElemDim.SetElement(index + 1, thickness, i);
|
||||
ElemDimVertList.Insert(index * i + (i - 1), newElemDim);
|
||||
//ElemDimVertList.Insert(index * i + (i - 1), new SplitElementDimension(this, index + 1, 78, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
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;
|
||||
using WebWindowComplex.Json;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
@@ -43,9 +36,30 @@ namespace WebWindowComplex.Models
|
||||
m_nSubArea = nSubArea;
|
||||
}
|
||||
|
||||
public void SetElement(int index, double dimension, int subArea)
|
||||
{
|
||||
SetIndex(index);
|
||||
SetDimension(dimension);
|
||||
m_nSubArea = subArea;
|
||||
}
|
||||
|
||||
//public SplitElementDimension CopyAll()
|
||||
//{
|
||||
// SplitElementDimension newSplitElementDimension = new SplitElementDimension(ParentArea, nIndex, dDimension, nSubArea);
|
||||
// newSplitElementDimension.SetMaxDimension(dMaxDim);
|
||||
// newSplitElementDimension.SetMinDimension(dMinDim);
|
||||
// newSplitElementDimension.SetOverlapElement(dOverlap);
|
||||
// newSplitElementDimension.SetNameElement(sName);
|
||||
// return newSplitElementDimension;
|
||||
//}
|
||||
|
||||
public override SplitElementDimension Copy()
|
||||
{
|
||||
SplitElementDimension newSplitElementDimension = new SplitElementDimension(ParentArea, nIndex, dDimension, nSubArea);
|
||||
newSplitElementDimension.SetMaxDimension(dMaxDim);
|
||||
newSplitElementDimension.SetMinDimension(dMinDim);
|
||||
newSplitElementDimension.SetOverlapElement(dOverlap);
|
||||
newSplitElementDimension.SetNameElement(sName);
|
||||
return newSplitElementDimension;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
using Egw.Window.Data;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Security.Cryptography;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
using static WebWindowComplex.Models.ParametriOpzioni;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user