Modificata proprietà SplitStartVert

This commit is contained in:
Annamaria Sassi
2026-03-05 15:41:28 +01:00
parent ff8e65ecef
commit df44ae4bf2
23 changed files with 151 additions and 201 deletions
+1 -6
View File
@@ -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
View File
@@ -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 -6
View File
@@ -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 -3
View File
@@ -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 -6
View File
@@ -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 -7
View File
@@ -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
-6
View File
@@ -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 -7
View File
@@ -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 -6
View File
@@ -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
View File
@@ -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
-7
View File
@@ -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 -4
View File
@@ -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
+81 -40
View File
@@ -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 -7
View File
@@ -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 -13
View File
@@ -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
{
+14 -49
View File
@@ -410,7 +410,7 @@ namespace WebWindowComplex
DataSave dataSave = new DataSave()
{
currJwd = CurrJwd,
open = false,
Dosave = false,
};
return EC_OnClose.InvokeAsync(dataSave);
}
@@ -572,7 +572,7 @@ namespace WebWindowComplex
DataSave dataSave = new DataSave()
{
currJwd = CurrJwd,
open = true,
Dosave = true,
};
return EC_OnClose.InvokeAsync(dataSave);
}
@@ -661,9 +661,7 @@ namespace WebWindowComplex
{
checkWarnings();
if (SashList.Count > 0)
{
currAntaIndex = 0;
}
if (updRequested)
{
// se mancasse dizionario forme chiamo quello
@@ -794,12 +792,12 @@ namespace WebWindowComplex
if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE)
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
m_CurrWindow.AreaList.First().JointList[i].SelJointType = m_PreviousWindow.AreaList.First().JointList[i].SelJointType;
}
else
{
for (int i = 0; i < 4; i++)
m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType);
m_CurrWindow.AreaList.First().JointList[i].SelJointType = m_PreviousWindow.AreaList.First().JointList[i].SelJointType;
}
}
if (m_CurrWindow != null)
@@ -900,7 +898,7 @@ namespace WebWindowComplex
}
/// <summary>
/// Metodo per settare i parmateri di ingresso selezionati
/// Metodo per settare i paramteri di ingresso selezionati
/// </summary>
protected void UpdateInputList(JsonWindow WindowFromJson)
{
@@ -1192,30 +1190,6 @@ namespace WebWindowComplex
AdvStep(CompileStep.Tree);
}
///// <summary>
///// Metodo per cercare un area precisa
///// </summary>
///// <param name="currentArea"> Area che si sta analizzando </param>
///// <param name="idSearch"> Id Area che si sta cercando </param>
///// <param name="itemSearch"> Area che si sta cercando </param>
///// <returns></returns>
//private Area SearchArea(Area currentArea, int idSearch, Area itemSearch)
//{
// if (currentArea.GroupId == idSearch && currentArea.AreaType.Equals(itemSearch.AreaType))
// {
// return currentArea;
// }
// foreach (Area child in currentArea.AreaList)
// {
// Area found = SearchArea(child, idSearch, itemSearch);
// if (found != null)
// {
// return found;
// }
// }
// return null;
//}
/// <summary>
/// Metodo per cercare un area precisa partendo da GroupId
/// </summary>
@@ -1351,6 +1325,13 @@ namespace WebWindowComplex
}
}
/// <summary>
/// Metodo per calcolare overlap per gli elementi delle ante
/// </summary>
/// <param name="sash"> sash group </param>
/// <param name="anta"> anta </param>
/// <param name="indexAnta"> indice anta </param>
/// <param name="elemList"> lista elementi </param>
private void SetOverlapSash(Sash sash, SashDimension anta, int indexAnta, List<ElementDimension> elemList)
{
string overlapNameBottom = "";
@@ -1802,22 +1783,6 @@ namespace WebWindowComplex
m_SplittedList = new List<Splitted>();
CreateWindowsList((m_CurrWindow!).AreaList.First(), false);
ReqListGroupId(FrameWindow, reqList);
//// richiedo update element della sash (se presenti)
//if (SashList.Count > 0)
//{
// foreach (var item in SashList)
// {
// reqList.Add(item.GroupId);
// }
//}
//// richiedo update element degli split (se presenti)
//if (SplitList.Count > 0)
//{
// foreach (var item in SplitList)
// {
// reqList.Add(item.GroupId);
// }
//}
await DoReqElement(reqList);
}
}
@@ -1991,7 +1956,7 @@ namespace WebWindowComplex
}
public class DataSave
{
public string currJwd { get; set; }
public bool open { get; set; } = false;
public string currJwd { get; set; } = "";
public bool Dosave { get; set; } = true;
}
}
+10 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.3.415</Version>
<Version>3.1.3.515</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -267,6 +267,15 @@