Corretti alcuni Warnings
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Egw.Window.Data" Version="2.8.1.2611" />
|
||||
<PackageVersion Include="EgwCoreLib.Lux.Core" Version="1.0.2601.2119" />
|
||||
<PackageVersion Include="EgwCoreLib.Lux.Data" Version="1.0.2601.2119" />
|
||||
<PackageVersion Include="EgwCoreLib.Lux.Core" Version="1.0.2601.2809" />
|
||||
<PackageVersion Include="EgwCoreLib.Lux.Data" Version="1.0.2601.2809" />
|
||||
<PackageVersion Include="EgwCoreLib.Razor" Version="1.5.2511.312" />
|
||||
<PackageVersion Include="EgwCoreLib.Utils" Version="1.5.2511.312" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.21" />
|
||||
@@ -15,4 +15,4 @@
|
||||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageVersion Include="RestSharp" Version="113.1.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -130,8 +130,8 @@ Descrive il tipo di riempimento: vetro o pannello.
|
||||
|
||||
## Richieste di informazioni a EgwMultiEnginManager
|
||||
|
||||
Nel componente sono presenti quattro tipi di richieste di informazioni al programma EgwMultiEngineManager:
|
||||
Nel componente sono presenti quattro tipi di richieste al programma EgwMultiEngineManager:
|
||||
1. SVG: serve per avere SVG dato il JWD per poter rappresentare il disegno. La domanda è costituita dal JWD e la risposta contiene il SVG;
|
||||
2. Forma del telaio: serve per poter avere la lista degli hardware coerenti con le caratteristiche scelte. La domanda è costituita dal JWD e dalla lista di groupId interessati. La risposta contiene un dizionario di valori interi-stringa che rappresentano groupId-forma;
|
||||
2. Forma del telaio: la forma serve per poter determinare la lista degli hardware coerenti con le caratteristiche scelte. La domanda è costituita dal JWD e dalla lista di groupId interessati. La risposta contiene un dizionario di valori interi-stringa che rappresentano groupId-forma;
|
||||
3. Hardware option: serve per avere le opzioni relative all'hardware selezionato. La domanda è costituita dal JWD e la lista di groupId interessati. La risposta contiene un dizionario interi-stringa che rappresentano groupId-opzioni hardware. Le opzioni hardware sono restituite in formato xml;
|
||||
4. Profili degli elementi: serve per avere i profili degli elementi groupId richiesto (nel caso di gruppi di ante gli elemeneti sono specificati per ogni anta). La domanda è costituita dal JWD e dalla lista di groupId interessati. La risposta contiene un dizionario di valori interi-stringhe.
|
||||
4. Profili degli elementi: serve per avere i profili degli elementi del groupId richiesto (nel caso di gruppi di ante gli elemeneti sono specificati per ogni anta). La domanda è costituita dal JWD e dalla lista di groupId interessati. La risposta contiene una lisra di oggetti AreaProfiles.
|
||||
@@ -350,12 +350,12 @@ namespace Test.UI.Components.Pages
|
||||
private string currSvg = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string colorMassUpdate;
|
||||
private string familyHWMassUpdate;
|
||||
private string glassMassUpdate;
|
||||
private Hardware hardwareMassUpdate;
|
||||
private string materialMassUpdate;
|
||||
private string profileMassUpdate;
|
||||
//private string colorMassUpdate;
|
||||
//private string familyHWMassUpdate;
|
||||
//private string glassMassUpdate;
|
||||
//private Hardware hardwareMassUpdate;
|
||||
//private string materialMassUpdate;
|
||||
//private string profileMassUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Semaforo x definire se sia già in modalità ionterattiva o di prerendering
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Test.UI.Components.Pages
|
||||
DLService.PipeSvg.EA_NewMessage -= PipeSvg_EA_NewMessage;
|
||||
DLService.PipeShape.EA_NewMessage -= PipeShape_EA_NewMessage;
|
||||
DLService.PipeHwOpt.EA_NewMessage -= PipeHwOption_EA_NewMessage;
|
||||
//DLService.PipeAreaProfile.EA_NewMessage -= PipeAreaProfile_EA_NewMessage;
|
||||
DLService.PipeProfElement.EA_NewMessage -= PipeProfElement_EA_NewMessage;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
@@ -365,12 +365,12 @@ namespace Test.UI.Components.Pages
|
||||
private string currSvg = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string colorMassUpdate;
|
||||
private string familyHWMassUpdate;
|
||||
private string glassMassUpdate;
|
||||
private Hardware hardwareMassUpdate;
|
||||
private string materialMassUpdate;
|
||||
private string profileMassUpdate;
|
||||
//private string colorMassUpdate;
|
||||
//private string familyHWMassUpdate;
|
||||
//private string glassMassUpdate;
|
||||
//private Hardware hardwareMassUpdate;
|
||||
//private string materialMassUpdate;
|
||||
//private string profileMassUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Semaforo x definire se sia già in modalità ionterattiva o di prerendering
|
||||
@@ -384,7 +384,7 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private string channelHwOpt = "";
|
||||
private string channelShape = "";
|
||||
private string channelElement = "";
|
||||
private string chProfElem = "";
|
||||
private string channelSvg = "";
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -509,14 +509,14 @@ namespace Test.UI.Components.Pages
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private async void PipeAreaProfile_EA_NewMessage(object? sender, EventArgs e)
|
||||
private async void PipeProfElement_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
// aggiorno visualizzazione
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly SVG da mostrare
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage) && currArgs.newMessage.Length > 2)
|
||||
{
|
||||
if (currArgs.msgUid.StartsWith($"{channelElement}:{windowUid}"))
|
||||
if (currArgs.msgUid.StartsWith($"{chProfElem}:{windowUid}"))
|
||||
{
|
||||
// deserializzo il dizionario delle risposte...
|
||||
var rawDict = JsonConvert.DeserializeObject<List<AreaProfiles>>(currArgs.newMessage);
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public Template SelTemplate { get; set; } = null;
|
||||
public Template SelTemplate { get; set; } = new Template(0, "", "", "") ;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
@if (User)
|
||||
{
|
||||
<span class="input-group-text">Tipology</span>
|
||||
<input type="text" readonly class="form-control" value="@(CurrFrameWindow.ThresholdList.FirstOrDefault(x => x.Type == SelThreshold).Name)">
|
||||
<input type="text" readonly class="form-control" value="@(CurrFrameWindow.ThresholdList.FirstOrDefault(x => x.Type == SelThreshold)?.Name)">
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace WebWindowComplex.Compo
|
||||
protected async Task RemoveArea()
|
||||
{
|
||||
CurrSashGroup.Remove();
|
||||
FrameWindow.SetSelThresholdFromName(FrameWindow.ThresholdList.FirstOrDefault(x => x.Name != "Threshold").Name);
|
||||
FrameWindow.SetSelThresholdFromName(FrameWindow.ThresholdList.FirstOrDefault(x => x.Name != "Threshold")?.Name);
|
||||
var args = new DataUpdateFrame()
|
||||
{
|
||||
currFrame = FrameWindow
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace WebWindowComplex.Compo
|
||||
protected async Task UpdateDimension(DataUpdateSplitDimension updRec)
|
||||
{
|
||||
SplitDimension currSplitDim = updRec.currSplit;
|
||||
SplitDimension currRec = null;
|
||||
SplitDimension currRec = new SplitDimension(0, MeasureTypes.NULL, false, updRec.currSplit.Parent, false);
|
||||
// cerco il record
|
||||
if (currSplitDim.bIsVertListDim)
|
||||
currRec = CurrSplit.SplitVertList.ElementAt(updRec.index);
|
||||
@@ -233,7 +233,7 @@ namespace WebWindowComplex.Compo
|
||||
{
|
||||
foreach (Split s in SplitList)
|
||||
{
|
||||
if (s.Equals(CurrSplit))
|
||||
if (s.Equals(CurrSplit) && e.Value != null)
|
||||
{
|
||||
s.SetSplitStartVert((bool)e.Value);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace WebWindowComplex.Compo
|
||||
if (CurrRec.ParentArea is Frame)
|
||||
nElement = ((Frame)CurrRec.ParentArea).ElementDimensionList.Count;
|
||||
else if(CurrRec.ParentArea is Sash)
|
||||
nElement = ((Sash)CurrRec.ParentArea).SashList.FirstOrDefault().ElementDimensionList.Count;
|
||||
nElement = ((Sash)CurrRec.ParentArea).SashList.FirstOrDefault()!.ElementDimensionList.Count;
|
||||
switch (nElement)
|
||||
{
|
||||
case 4:
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace WebWindowComplex.Compo
|
||||
get => CurrOpt.sValue.sValue;
|
||||
set
|
||||
{
|
||||
if (CurrOpt.sValue.sValue != value)
|
||||
if (CurrOpt.sValue.sValue != value && CurrOpt.ValueList.FirstOrDefault(x => x.sValue == value) != null)
|
||||
{
|
||||
CurrOpt.sValue = CurrOpt.ValueList.FirstOrDefault(x => x.sValue == value);
|
||||
CurrOpt.sValue = CurrOpt.ValueList.FirstOrDefault(x => x.sValue == value)!;
|
||||
_ = EC_Update.InvokeAsync(CurrOpt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace WebWindowComplex.Compo
|
||||
{
|
||||
if(CurrOpt.sName.Equals("HMan"))
|
||||
CurrOpt.sValue = value;
|
||||
else
|
||||
CurrOpt.sValue = CurrOpt.ValueList.FirstOrDefault(x => x == value);
|
||||
else if (CurrOpt.ValueList.FirstOrDefault(x => x == value) != null)
|
||||
CurrOpt.sValue = CurrOpt.ValueList.FirstOrDefault(x => x == value)!;
|
||||
_ = EC_Update.InvokeAsync(CurrOpt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,11 @@ namespace WebWindowComplex.Json
|
||||
sGlass = m_sGlass
|
||||
};
|
||||
foreach (var Area in AreaList)
|
||||
Window.AreaList.Add((Frame)Area.Deserialize(null, Window));
|
||||
{
|
||||
JsonFrame jf = (JsonFrame)Area;
|
||||
Frame frame = (Frame)jf.Deserialize(null, Window);
|
||||
Window.AreaList.Add(frame ?? new(null, Window));
|
||||
}
|
||||
return Window;
|
||||
}
|
||||
}
|
||||
@@ -155,7 +159,7 @@ namespace WebWindowComplex.Json
|
||||
m_AreaType = AreaType;
|
||||
}
|
||||
|
||||
internal virtual Area? Deserialize(Area ParentArea, Window ParentWindow)
|
||||
internal virtual Area? Deserialize(Area? ParentArea, Window ParentWindow)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -281,7 +285,7 @@ namespace WebWindowComplex.Json
|
||||
base.GroupId = GroupId;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
internal override Area Deserialize(Area? ParentArea, Window ParentWindow)
|
||||
{
|
||||
Frame newFrame = new Frame(null, ParentWindow);
|
||||
newFrame.SetGroupId(GroupId);
|
||||
@@ -1109,7 +1113,7 @@ namespace WebWindowComplex.Json
|
||||
var RawType = (string?)item["AreaType"];
|
||||
AreaTypes Type = AreaTypes.NULL;
|
||||
Enum.TryParse<AreaTypes>(RawType, out Type);
|
||||
JsonArea JsonArea = null;
|
||||
JsonArea JsonArea = new JsonArea(AreaTypes.NULL);
|
||||
switch (Type)
|
||||
{
|
||||
case AreaTypes.FRAME:
|
||||
@@ -1143,12 +1147,8 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
if (!Information.IsNothing(JsonArea))
|
||||
{
|
||||
serializer.Populate(item.CreateReader(), JsonArea);
|
||||
return JsonArea;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
serializer.Populate(item.CreateReader(), JsonArea!);
|
||||
return JsonArea!;
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
|
||||
@@ -54,9 +54,10 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
foreach (var Value in HdwOptionParam.Opzioni)
|
||||
m_ValueList.Add(Value.Valore);
|
||||
m_sValue = m_ValueList.FirstOrDefault(x => x == HdwOptionParam.ValoreCorrente);
|
||||
if(m_ValueList.FirstOrDefault(x => x == HdwOptionParam.ValoreCorrente) != null)
|
||||
m_sValue = m_ValueList.FirstOrDefault(x => x == HdwOptionParam.ValoreCorrente)!;
|
||||
if (string.IsNullOrEmpty(m_sValue))
|
||||
m_sValue = m_ValueList.FirstOrDefault();
|
||||
m_sValue = m_ValueList.FirstOrDefault()!;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -470,72 +470,75 @@ namespace WebWindowComplex.Models
|
||||
/// <returns></returns>
|
||||
public double CalculateWidthArea(Area area, double width)
|
||||
{
|
||||
for (int i = 0; i < area.AreaList.Count; i++)
|
||||
if(width > 0)
|
||||
{
|
||||
double risultato = -1;
|
||||
if (area.Equals(this))
|
||||
return width;
|
||||
Area item = area.AreaList[i];
|
||||
if (area is Split)
|
||||
for (int i = 0; i < area.AreaList.Count; i++)
|
||||
{
|
||||
Split split = (Split)area;
|
||||
if (split.SplitVertList.Count > 0)
|
||||
double risultato = -1;
|
||||
if (area.Equals(this))
|
||||
return width;
|
||||
Area item = area.AreaList[i];
|
||||
if (area is Split)
|
||||
{
|
||||
switch (split.SplitVertList.ElementAt(i).SelMeasureType)
|
||||
Split split = (Split)area;
|
||||
if (split.SplitVertList.Count > 0)
|
||||
{
|
||||
switch (split.SplitVertList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, split.SplitVertList.ElementAt(i).dDimension);
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, ConvertFromPropVal(split.SplitVertList, split.SplitVertList.ElementAt(i).dDimension, MeasureTypes.ABSOLUTE, width));
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, split.SplitVertList.ElementAt(i).dDimension * width / 100);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
risultato = CalculateWidthArea(item, width);
|
||||
}
|
||||
if (risultato != -1)
|
||||
return risultato;
|
||||
}
|
||||
else if (area is Sash)
|
||||
{
|
||||
Sash sash = (Sash)area;
|
||||
switch (sash.SashList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, split.SplitVertList.ElementAt(i).dDimension);
|
||||
risultato = CalculateWidthArea(item, sash.SashList.ElementAt(i).dDimension);
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, ConvertFromPropVal(split.SplitVertList, split.SplitVertList.ElementAt(i).dDimension, MeasureTypes.ABSOLUTE, width));
|
||||
risultato = CalculateWidthArea(item, ConvertFromPropVal(sash, sash.SashList.ElementAt(i).dDimension, MeasureTypes.ABSOLUTE, width));
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, split.SplitVertList.ElementAt(i).dDimension * width / 100);
|
||||
risultato = CalculateWidthArea(item, sash.SashList.ElementAt(i).dDimension * width / 100);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (risultato != -1)
|
||||
return risultato;
|
||||
}
|
||||
else
|
||||
{
|
||||
risultato = CalculateWidthArea(item, width);
|
||||
if (risultato != -1)
|
||||
return risultato;
|
||||
}
|
||||
if (risultato != -1)
|
||||
return risultato;
|
||||
}
|
||||
else if (area is Sash)
|
||||
{
|
||||
Sash sash = (Sash)area;
|
||||
switch (sash.SashList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, sash.SashList.ElementAt(i).dDimension);
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, ConvertFromPropVal(sash, sash.SashList.ElementAt(i).dDimension, MeasureTypes.ABSOLUTE, width));
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
risultato = CalculateWidthArea(item, sash.SashList.ElementAt(i).dDimension * width / 100);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (risultato != -1)
|
||||
return risultato;
|
||||
}
|
||||
else
|
||||
{
|
||||
risultato = CalculateWidthArea(item, width);
|
||||
if (risultato != -1)
|
||||
return risultato;
|
||||
}
|
||||
}
|
||||
return width;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private int m_nIndex;
|
||||
|
||||
private string m_sName;
|
||||
private string m_sName = "";
|
||||
|
||||
private double m_dMin;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public Frame(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
public Frame(Area? ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
public override Frame Copy(Area ParentArea)
|
||||
{
|
||||
return null;
|
||||
return new Frame(null, ParentWindow);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
@@ -465,7 +465,7 @@ namespace WebWindowComplex.Models
|
||||
newFrame.RefreshThresholdList();
|
||||
if (m_AllThresholdList != null && m_AllThresholdList.Any())
|
||||
{
|
||||
newFrame.SetSelThresholdFromName(m_AllThresholdList.FirstOrDefault().Name ?? "");
|
||||
newFrame.SetSelThresholdFromName(m_AllThresholdList.FirstOrDefault()?.Name ?? "");
|
||||
}
|
||||
//newFrame.FrameArcElem = null;
|
||||
return newFrame;
|
||||
@@ -679,12 +679,16 @@ namespace WebWindowComplex.Models
|
||||
/// <returns></returns>
|
||||
internal double AvailArea()
|
||||
{
|
||||
// larghezza - elementDim(1) - elementDim(last) + overlapDd + overlapSx
|
||||
return DimensionList.FirstOrDefault(x => x.sName.Equals("Width")).dDimension -
|
||||
ElementDimensionList.ElementAt(1).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
ElementDimensionList.ElementAt(1).dOverlap +
|
||||
ElementDimensionList.Last().dOverlap;
|
||||
if(DimensionList.Count> 0 && DimensionList.FirstOrDefault(x => x.sName.Equals("Width")) != null)
|
||||
{
|
||||
// larghezza - elementDim(1) - elementDim(last) + overlapDd + overlapSx
|
||||
return DimensionList.FirstOrDefault(x => x.sName.Equals("Width"))!.dDimension -
|
||||
ElementDimensionList.ElementAt(1).dDimension -
|
||||
ElementDimensionList.Last().dDimension +
|
||||
ElementDimensionList.ElementAt(1).dOverlap +
|
||||
ElementDimensionList.Last().dOverlap;
|
||||
}
|
||||
return -1;
|
||||
//switch (m_Shape)
|
||||
//{
|
||||
// case Shapes.RECTANGLE:
|
||||
@@ -742,7 +746,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private bool m_bBottomRail;
|
||||
|
||||
private Threshold m_SelThreshold;
|
||||
private Threshold m_SelThreshold = new Threshold(1, "");
|
||||
|
||||
private List<Threshold> m_ThresholdList = new List<Threshold>();
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public FrameArcElement() { }
|
||||
|
||||
public FrameArcElement(Area ParentArea, Window ParentWindow, double nSection, bool bCutEdge, bool bIsAlign)
|
||||
{
|
||||
m_ParentArea = ParentArea;
|
||||
|
||||
@@ -276,7 +276,7 @@ namespace WebWindowComplex.Models
|
||||
if (value > 0)
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
SashDimension itemDelete = null;
|
||||
SashDimension itemDelete = new SashDimension(0, MeasureTypes.NULL, this, 0);
|
||||
double deleteDim;
|
||||
for (var SplitIndex = m_SashList.Count - 1; SplitIndex >= value; SplitIndex += -1)
|
||||
{
|
||||
@@ -476,7 +476,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelHardware;
|
||||
return m_SelHardware!;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -492,7 +492,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelHardware.Id;
|
||||
return m_SelHardware!.Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -570,7 +570,7 @@ namespace WebWindowComplex.Models
|
||||
Area newArea = item.Copy(newSash);
|
||||
newSash.AreaList.Add(newArea);
|
||||
}
|
||||
newSash.SetSelFamilyHardwareFromIndex(m_SelHardware.Id);
|
||||
newSash.SetSelFamilyHardwareFromIndex(m_SelHardware!.Id);
|
||||
newSash.SetSelHardwareFromId(CustomHwId);
|
||||
//if (ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.ARC ||
|
||||
// ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.DOUBLEARC ||
|
||||
@@ -592,7 +592,7 @@ namespace WebWindowComplex.Models
|
||||
m_HardwareList.Clear();
|
||||
Enums.OpeningTypes sOpeningType = ConvertOpeningType();
|
||||
if (string.IsNullOrEmpty(m_SelFamilyHardware))
|
||||
m_SelFamilyHardware = s_FamilyHardwareList.FirstOrDefault();
|
||||
m_SelFamilyHardware = s_FamilyHardwareList.FirstOrDefault() ?? "";
|
||||
int sashPosition = 1;
|
||||
if (nSashQty > 2 && !(SashList.First().bHasHandle || SashList.Last().bHasHandle))
|
||||
sashPosition = 2;
|
||||
@@ -610,6 +610,7 @@ namespace WebWindowComplex.Models
|
||||
if(rawList.Count == 0 || rawList == null)
|
||||
{
|
||||
Hardware hw = new Hardware(CustomHwId, m_SelFamilyHardware, "Custom", sOpeningType, m_CurrShape, nSashQty, 1);
|
||||
rawList = new List<Hardware>();
|
||||
rawList.Add(hw);
|
||||
}
|
||||
m_HardwareList = new List<Hardware>(rawList);
|
||||
@@ -672,7 +673,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
RefreshHardwareList();
|
||||
// se il vecchio hw selezionato non va più bene viene selezionato il primo della lista
|
||||
if (!HardwareList.Contains(m_SelHardware) || m_SelHardware.Shape != m_CurrShape)
|
||||
if (!HardwareList.Contains(m_SelHardware!) || m_SelHardware!.Shape != m_CurrShape)
|
||||
{
|
||||
SetFirstHardware();
|
||||
ClearHardwareOptionList();
|
||||
@@ -796,7 +797,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
string currHwId = hideHw ? CustomHwId : m_SelHardware.Id;
|
||||
string currHwId = hideHw ? CustomHwId : m_SelHardware!.Id;
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, currHwId, GroupId);
|
||||
foreach (var SashDimension in SashList)
|
||||
JsonSash.SashList.Add(SashDimension.Serialize());
|
||||
@@ -854,11 +855,11 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (!string.IsNullOrEmpty(OptionXml))
|
||||
{
|
||||
ParametriOpzioni HwOptions = null;
|
||||
ParametriOpzioni HwOptions = new ParametriOpzioni();
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(ParametriOpzioni));
|
||||
StringReader reader = new StringReader(OptionXml);
|
||||
HwOptions = (ParametriOpzioni)serializer.Deserialize(reader);
|
||||
if (HwOptions.Items != null)
|
||||
if (HwOptions!.Items != null)
|
||||
{
|
||||
m_HwOptionList.Clear();
|
||||
foreach (var HwOption in HwOptions.Items)
|
||||
@@ -1031,7 +1032,7 @@ namespace WebWindowComplex.Models
|
||||
private List<SashDimension> m_SashList = new List<SashDimension>();
|
||||
private SashTypes m_SashType;
|
||||
private string m_SelFamilyHardware = "";
|
||||
private Hardware m_SelHardware;
|
||||
private Hardware? m_SelHardware = null;
|
||||
private OrientationSash m_SelOrientationSashType;
|
||||
//private SashArcElement m_SashArcElement;
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public SashArcElement() { }
|
||||
|
||||
public SashArcElement(Area ParentArea, Window ParentWindow, double nSection, bool bCutEdge)
|
||||
{
|
||||
m_ParentArea = ParentArea;
|
||||
|
||||
@@ -149,168 +149,171 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
set
|
||||
{
|
||||
double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault(), m_Parent.ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
//double widthTot = ((Frame)m_Parent.ParentArea).AvailArea();
|
||||
double valMinAbsolute = 100;
|
||||
double valMaxAbsolute = widthTot - valMinAbsolute * (m_Parent.SashList.Count - 1);
|
||||
bool valueAccept = false;
|
||||
switch (MeasureType)
|
||||
if(m_Parent.ParentWindow.AreaList.FirstOrDefault() != null)
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueAccept = (value < valMaxAbsolute && value > valMinAbsolute) ? true : false;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
valMaxAbsolute = 20;
|
||||
valueAccept = (value >= 1) ? true : false;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
valMaxAbsolute = valMaxAbsolute / widthTot * 100;
|
||||
valMinAbsolute = valMinAbsolute / widthTot * 100;
|
||||
valueAccept = (value < valMaxAbsolute && value > valMinAbsolute) ? true : false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (valueAccept)
|
||||
{
|
||||
List<SashDimension> dimensions = m_Parent.SashList;
|
||||
List<double> absoluteValList = new List<double>();
|
||||
AreaDimension ad = new AreaDimension(m_dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
foreach (var it in m_Parent.SashList)
|
||||
double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault()!, m_Parent.ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
//double widthTot = ((Frame)m_Parent.ParentArea).AvailArea();
|
||||
double valMinAbsolute = 100;
|
||||
double valMaxAbsolute = widthTot - valMinAbsolute * (m_Parent.SashList.Count - 1);
|
||||
bool valueAccept = false;
|
||||
switch (MeasureType)
|
||||
{
|
||||
adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType));
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueAccept = (value < valMaxAbsolute && value > valMinAbsolute) ? true : false;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
valMaxAbsolute = 20;
|
||||
valueAccept = (value >= 1) ? true : false;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
valMaxAbsolute = valMaxAbsolute / widthTot * 100;
|
||||
valMinAbsolute = valMinAbsolute / widthTot * 100;
|
||||
valueAccept = (value < valMaxAbsolute && value > valMinAbsolute) ? true : false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int index = 0;
|
||||
foreach (var item in m_Parent.SashList)
|
||||
if (valueAccept)
|
||||
{
|
||||
absoluteValList.Add(adList.ElementAt(index).CalculateAbsoluteValue(adList, widthTot));
|
||||
index++;
|
||||
}
|
||||
int nIndex = dimensions.IndexOf(this);
|
||||
int proportionalCount = dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).ToList().Count;
|
||||
int percentageCount = dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PERCENTAGE)).ToList().Count;
|
||||
// Le dimensioni sono solo in proporzionale
|
||||
if (proportionalCount == absoluteValList.Count || SelMeasureType.Equals(MeasureTypes.PROPORTIONAL) ||
|
||||
(SelMeasureType.Equals(MeasureTypes.ABSOLUTE) && proportionalCount == absoluteValList.Count -1))
|
||||
{
|
||||
m_dDimension = value;
|
||||
}
|
||||
// Le dimensioni sono solo in percentuale
|
||||
else if (percentageCount == dimensions.Count)
|
||||
{
|
||||
if (value < m_dDimension)
|
||||
List<SashDimension> dimensions = m_Parent.SashList;
|
||||
List<double> absoluteValList = new List<double>();
|
||||
AreaDimension ad = new AreaDimension(m_dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
foreach (var it in m_Parent.SashList)
|
||||
{
|
||||
// L'anta modificata non è l'ultima
|
||||
if (nIndex < dimensions.Count - 1)
|
||||
dimensions[nIndex + 1].SetDimension(dimensions[nIndex + 1].m_dDimension + (m_dDimension - value));
|
||||
else if (dimensions.Count > 1)
|
||||
dimensions[nIndex - 1].SetDimension(dimensions[nIndex - 1].m_dDimension + (m_dDimension - value));
|
||||
else
|
||||
{
|
||||
m_dDimension = 100;
|
||||
return;
|
||||
}
|
||||
adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType));
|
||||
}
|
||||
else
|
||||
int index = 0;
|
||||
foreach (var item in m_Parent.SashList)
|
||||
{
|
||||
double dRes = value;
|
||||
// se non ultima anta
|
||||
if (nIndex < dimensions.Count - 1)
|
||||
{
|
||||
for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
dRes += dimensions[nInd].m_dDimension;
|
||||
dRes = (100 - dRes) / (dimensions.Count - nIndex - 1);
|
||||
for (var Ind = nIndex + 1; Ind <= dimensions.Count - 1; Ind++)
|
||||
dimensions[Ind].SetDimension(dRes);
|
||||
}
|
||||
// se ultima anta
|
||||
else if (dimensions.Count > 1)
|
||||
{
|
||||
if (dimensions.Count > 2)
|
||||
{
|
||||
for (var Ind = 0; Ind <= nIndex - 2; Ind++)
|
||||
dRes += dimensions[Ind].m_dDimension;
|
||||
}
|
||||
dRes = (100 - dRes);
|
||||
dimensions[nIndex - 1].SetDimension(dRes);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dDimension = 100;
|
||||
return;
|
||||
}
|
||||
absoluteValList.Add(adList.ElementAt(index).CalculateAbsoluteValue(adList, widthTot));
|
||||
index++;
|
||||
}
|
||||
m_dDimension = value;
|
||||
}
|
||||
// Le dimensioni sono miste o solo in assoluto
|
||||
else
|
||||
{
|
||||
double valueInAbsolute = 0;
|
||||
switch (MeasureType)
|
||||
int nIndex = dimensions.IndexOf(this);
|
||||
int proportionalCount = dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).ToList().Count;
|
||||
int percentageCount = dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PERCENTAGE)).ToList().Count;
|
||||
// Le dimensioni sono solo in proporzionale
|
||||
if (proportionalCount == absoluteValList.Count || SelMeasureType.Equals(MeasureTypes.PROPORTIONAL) ||
|
||||
(SelMeasureType.Equals(MeasureTypes.ABSOLUTE) && proportionalCount == absoluteValList.Count -1))
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueInAbsolute = value;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
var pesi = value + dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL) && !x.Equals(this))
|
||||
.Sum(x => x.m_dDimension);
|
||||
valueInAbsolute = widthTot / pesi * value;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
valueInAbsolute = (value / 100) * widthTot;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (value < m_dDimension)
|
||||
{
|
||||
// L'anta modificata non è l'ultima
|
||||
if (nIndex < absoluteValList.Count - 1)
|
||||
{
|
||||
absoluteValList[nIndex + 1] = absoluteValList[nIndex + 1] + (absoluteValList[nIndex] - valueInAbsolute);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
// L'anta modificata è l'ultima
|
||||
else if (dimensions.Count > 1)
|
||||
{
|
||||
absoluteValList[nIndex - 1] = absoluteValList[nIndex - 1] + (absoluteValList[nIndex] - valueInAbsolute);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// L'anta modificata non è l'ultima
|
||||
if (nIndex < absoluteValList.Count - 1)
|
||||
{
|
||||
absoluteValList[nIndex + 1] = absoluteValList[nIndex + 1] - (valueInAbsolute - absoluteValList[nIndex]);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
// L'anta modificata è l'ultima
|
||||
else if (dimensions.Count > 1)
|
||||
{
|
||||
absoluteValList[nIndex - 1] = absoluteValList[nIndex - 1] - (valueInAbsolute - absoluteValList[nIndex]);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
}
|
||||
if (MeasureType.Equals(MeasureTypes.PROPORTIONAL))
|
||||
m_dDimension = value;
|
||||
for (int i = 0; i < absoluteValList.Count; i++)
|
||||
{
|
||||
var item = m_Parent.SashList.ElementAt(i);
|
||||
item.SetDimension(ad.ConvertIn(adList, absoluteValList[i], (MeasureTypes)item.SelMeasureTypeIndex, widthTot));
|
||||
}
|
||||
// Le dimensioni sono solo in percentuale
|
||||
else if (percentageCount == dimensions.Count)
|
||||
{
|
||||
if (value < m_dDimension)
|
||||
{
|
||||
// L'anta modificata non è l'ultima
|
||||
if (nIndex < dimensions.Count - 1)
|
||||
dimensions[nIndex + 1].SetDimension(dimensions[nIndex + 1].m_dDimension + (m_dDimension - value));
|
||||
else if (dimensions.Count > 1)
|
||||
dimensions[nIndex - 1].SetDimension(dimensions[nIndex - 1].m_dDimension + (m_dDimension - value));
|
||||
else
|
||||
{
|
||||
m_dDimension = 100;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
double dRes = value;
|
||||
// se non ultima anta
|
||||
if (nIndex < dimensions.Count - 1)
|
||||
{
|
||||
for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
dRes += dimensions[nInd].m_dDimension;
|
||||
dRes = (100 - dRes) / (dimensions.Count - nIndex - 1);
|
||||
for (var Ind = nIndex + 1; Ind <= dimensions.Count - 1; Ind++)
|
||||
dimensions[Ind].SetDimension(dRes);
|
||||
}
|
||||
// se ultima anta
|
||||
else if (dimensions.Count > 1)
|
||||
{
|
||||
if (dimensions.Count > 2)
|
||||
{
|
||||
for (var Ind = 0; Ind <= nIndex - 2; Ind++)
|
||||
dRes += dimensions[Ind].m_dDimension;
|
||||
}
|
||||
dRes = (100 - dRes);
|
||||
dimensions[nIndex - 1].SetDimension(dRes);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dDimension = 100;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_dDimension = value;
|
||||
}
|
||||
// Le dimensioni sono miste o solo in assoluto
|
||||
else
|
||||
{
|
||||
double valueInAbsolute = 0;
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueInAbsolute = value;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
var pesi = value + dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL) && !x.Equals(this))
|
||||
.Sum(x => x.m_dDimension);
|
||||
valueInAbsolute = widthTot / pesi * value;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
valueInAbsolute = (value / 100) * widthTot;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (value < m_dDimension)
|
||||
{
|
||||
// L'anta modificata non è l'ultima
|
||||
if (nIndex < absoluteValList.Count - 1)
|
||||
{
|
||||
absoluteValList[nIndex + 1] = absoluteValList[nIndex + 1] + (absoluteValList[nIndex] - valueInAbsolute);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
// L'anta modificata è l'ultima
|
||||
else if (dimensions.Count > 1)
|
||||
{
|
||||
absoluteValList[nIndex - 1] = absoluteValList[nIndex - 1] + (absoluteValList[nIndex] - valueInAbsolute);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// L'anta modificata non è l'ultima
|
||||
if (nIndex < absoluteValList.Count - 1)
|
||||
{
|
||||
absoluteValList[nIndex + 1] = absoluteValList[nIndex + 1] - (valueInAbsolute - absoluteValList[nIndex]);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
// L'anta modificata è l'ultima
|
||||
else if (dimensions.Count > 1)
|
||||
{
|
||||
absoluteValList[nIndex - 1] = absoluteValList[nIndex - 1] - (valueInAbsolute - absoluteValList[nIndex]);
|
||||
absoluteValList[nIndex] = valueInAbsolute;
|
||||
}
|
||||
}
|
||||
if (MeasureType.Equals(MeasureTypes.PROPORTIONAL))
|
||||
m_dDimension = value;
|
||||
for (int i = 0; i < absoluteValList.Count; i++)
|
||||
{
|
||||
var item = m_Parent.SashList.ElementAt(i);
|
||||
item.SetDimension(ad.ConvertIn(adList, absoluteValList[i], (MeasureTypes)item.SelMeasureTypeIndex, widthTot));
|
||||
}
|
||||
}
|
||||
foreach(var item in m_Parent.AreaList)
|
||||
item.SearchAreaList(item, dDimension, "Width");
|
||||
}
|
||||
foreach(var item in m_Parent.AreaList)
|
||||
item.SearchAreaList(item, dDimension, "Width");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -405,16 +408,18 @@ namespace WebWindowComplex.Models
|
||||
if(SelMeasureType != (MeasureTypes)value)
|
||||
{
|
||||
MeasureTypes newType = (MeasureTypes)value;
|
||||
double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault(), m_Parent.ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
AreaDimension ad = new AreaDimension(m_dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
foreach (var it in m_Parent.SashList)
|
||||
if (m_Parent.ParentWindow.AreaList.FirstOrDefault() != null)
|
||||
{
|
||||
adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType));
|
||||
double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault()!, m_Parent.ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
AreaDimension ad = new AreaDimension(m_dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
foreach (var it in m_Parent.SashList)
|
||||
{
|
||||
adList.Add(new AreaDimension(it.m_dDimension, it.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(adList, SelMeasureType, newType, widthTot, nSashId-1);
|
||||
SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(adList, SelMeasureType, newType, widthTot, nSashId-1);
|
||||
//m_dDimension = Convert.ConvertDimension(this, m_SelMeasureType, newType, m_dDimension, widthTot);
|
||||
SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,6 +463,8 @@ namespace WebWindowComplex.Models
|
||||
/// <returns></returns>
|
||||
internal double CalculateWidthSashGroup(Area area, double width)
|
||||
{
|
||||
if (width < 1)
|
||||
return width;
|
||||
for(int i = 0; i < area.AreaList.Count; i++)
|
||||
{
|
||||
double risultato = -1;
|
||||
@@ -577,20 +584,23 @@ namespace WebWindowComplex.Models
|
||||
if (SelMeasureType != (MeasureTypes)value)
|
||||
{
|
||||
MeasureTypes newType = (MeasureTypes)value;
|
||||
double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault(), m_Parent.ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach(var item in m_Parent.SashList)
|
||||
if(m_Parent.ParentWindow.AreaList.FirstOrDefault() != null)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
double widthTot = CalculateWidthSashGroup(m_Parent.ParentWindow.AreaList.FirstOrDefault()!, m_Parent.ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach(var item in m_Parent.SashList)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, SelMeasureType, newType, widthTot, indexSash);
|
||||
if(newType is MeasureTypes.PROPORTIONAL)
|
||||
{
|
||||
for (int i = 0; i < newDimensions.Count; i++)
|
||||
m_Parent.SashList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
|
||||
}
|
||||
SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, SelMeasureType, newType, widthTot, indexSash);
|
||||
if(newType is MeasureTypes.PROPORTIONAL)
|
||||
{
|
||||
for (int i = 0; i < newDimensions.Count; i++)
|
||||
m_Parent.SashList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
|
||||
}
|
||||
SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,81 +152,84 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
double widthTot = CalculateWidthArea(ParentWindow.AreaList.First(), ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitVertList.Count - 1)
|
||||
if(ParentWindow.AreaList.FirstOrDefault() != null)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = widthTot;
|
||||
double dNewDimension = widthTot;
|
||||
if (m_SplitVertList.Count > 0)
|
||||
double widthTot = CalculateWidthArea(ParentWindow.AreaList.First(), ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Width").First().dDimension);
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitVertList.Count - 1)
|
||||
{
|
||||
dLastDimension = m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
if (m_SplitVertList[m_SplitVertList.Count - 1].MeasureType.Equals(MeasureTypes.PROPORTIONAL))
|
||||
dNewDimension = 1;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dNewDimension);
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
// 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));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
m_SplitVertList.RemoveAt(1);
|
||||
m_SplitVertList.RemoveAt(0);
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
int countProportional = m_SplitVertList.Count(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL));
|
||||
if(m_SplitVertList.Last().MeasureType.Equals(MeasureTypes.PROPORTIONAL) && countProportional - 1 == 1)
|
||||
{
|
||||
m_SplitVertList.RemoveAt(m_SplitVertList.Count() - 1);
|
||||
m_SplitVertList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).FirstOrDefault().SetDimension(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = widthTot;
|
||||
double dNewDimension = widthTot;
|
||||
if (m_SplitVertList.Count > 0)
|
||||
{
|
||||
dLastDimension += m_SplitVertList[SplitIndex].dDimension;
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
dLastDimension = m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
if (m_SplitVertList[m_SplitVertList.Count - 1].MeasureType.Equals(MeasureTypes.PROPORTIONAL))
|
||||
dNewDimension = 1;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dNewDimension);
|
||||
}
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
// 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));
|
||||
}
|
||||
ElemDimVertList.RemoveAt(ElemDimVertList.Count - 1);
|
||||
|
||||
}
|
||||
// Controllo quanti split orizzontali ci sono
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= (m_SplitVertList.Count * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
int nAreaList = AreaList.Count - 1;
|
||||
for (var SplitIndex = (m_SplitVertList.Count * nHoriz); SplitIndex <= nAreaList; SplitIndex++)
|
||||
else if (value == 0)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
m_SplitVertList.RemoveAt(1);
|
||||
m_SplitVertList.RemoveAt(0);
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
int countProportional = m_SplitVertList.Count(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL));
|
||||
if(m_SplitVertList.Last().MeasureType.Equals(MeasureTypes.PROPORTIONAL) && countProportional - 1 == 1)
|
||||
{
|
||||
m_SplitVertList.RemoveAt(m_SplitVertList.Count() - 1);
|
||||
m_SplitVertList.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).FirstOrDefault()?.SetDimension(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
{
|
||||
dLastDimension += m_SplitVertList[SplitIndex].dDimension;
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
}
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
ElemDimVertList.RemoveAt(ElemDimVertList.Count - 1);
|
||||
|
||||
}
|
||||
// Controllo quanti split orizzontali ci sono
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= (m_SplitVertList.Count * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
int nAreaList = AreaList.Count - 1;
|
||||
for (var SplitIndex = (m_SplitVertList.Count * nHoriz); SplitIndex <= nAreaList; SplitIndex++)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
}
|
||||
}
|
||||
// Se elimino l'unico split presente
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
}
|
||||
// Se elimino l'unico split presente
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
}
|
||||
if(SplitHorizList.Count > 0)
|
||||
@@ -418,7 +421,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
{
|
||||
if (!(areaSplitted.AreaList.FirstOrDefault().AreaType is AreaTypes.SASH))
|
||||
if (!(areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -427,7 +430,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
{
|
||||
if (areaSplitted.AreaList.FirstOrDefault().AreaType is AreaTypes.SASH)
|
||||
if (areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -436,7 +439,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
foreach (var areaSplitted in AreaList)
|
||||
{
|
||||
if (areaSplitted.AreaList.FirstOrDefault().AreaType is AreaTypes.SASH)
|
||||
if (areaSplitted.AreaList.FirstOrDefault()?.AreaType is AreaTypes.SASH)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -577,19 +580,19 @@ namespace WebWindowComplex.Models
|
||||
case (int)Shapes.TRIANGLE:
|
||||
case (int)Shapes.ARC_FULL:
|
||||
{
|
||||
return ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Height").First().dDimension;
|
||||
return ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Height").First().dDimension;
|
||||
}
|
||||
case (int)Shapes.RIGHTCHAMFER:
|
||||
{
|
||||
return ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Left Height").First().dDimension;
|
||||
return ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Left Height").First().dDimension;
|
||||
}
|
||||
case (int)Shapes.LEFTCHAMFER:
|
||||
{
|
||||
return ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Right Height").First().dDimension;
|
||||
return ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Right Height").First().dDimension;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return ParentWindow.AreaList.FirstOrDefault().DimensionList.Where(x => x.sName == "Full Height").First().dDimension;
|
||||
return ParentWindow.AreaList.FirstOrDefault()!.DimensionList.Where(x => x.sName == "Full Height").First().dDimension;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -598,7 +601,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool m_bIsPercentage = true;
|
||||
//private bool m_bIsPercentage = true;
|
||||
private bool m_bSplitStartVert = true;
|
||||
private SplitShapes m_SelSplitShape;
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace WebWindowComplex.Models
|
||||
set
|
||||
{
|
||||
double dimensionTot = 0;
|
||||
List<SplitDimension> dimensions = null;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
|
||||
List<SplitDimension> dimensions = new List<SplitDimension>();
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault()?? new Frame(null, Parent.ParentWindow);
|
||||
if (bIsVertListDim)
|
||||
{
|
||||
dimensions = m_Parent.SplitVertList;
|
||||
@@ -252,27 +252,30 @@ namespace WebWindowComplex.Models
|
||||
if (m_SelMeasureType != (MeasureTypes)value)
|
||||
{
|
||||
MeasureTypes newType = (MeasureTypes)value;
|
||||
List<SplitDimension> splitList = null;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
|
||||
double tot = 0;
|
||||
if (bIsVertListDim)
|
||||
List<SplitDimension> splitList = new List<SplitDimension>();
|
||||
if(m_Parent.ParentWindow.AreaList.FirstOrDefault() != null)
|
||||
{
|
||||
splitList = m_Parent.SplitVertList;
|
||||
tot = CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault()!;
|
||||
double tot = 0;
|
||||
if (bIsVertListDim)
|
||||
{
|
||||
splitList = m_Parent.SplitVertList;
|
||||
tot = CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false)).m_Dimension;
|
||||
}
|
||||
else
|
||||
{
|
||||
splitList = m_Parent.SplitHorizList;
|
||||
tot = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
foreach (var it in splitList)
|
||||
{
|
||||
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(adList, m_SelMeasureType, newType, tot, splitList.IndexOf(this));
|
||||
m_SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
else
|
||||
{
|
||||
splitList = m_Parent.SplitHorizList;
|
||||
tot = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
}
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> adList = new List<AreaDimension>();
|
||||
foreach (var it in splitList)
|
||||
{
|
||||
adList.Add(new AreaDimension(it.dDimension, it.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(adList, m_SelMeasureType, newType, tot, splitList.IndexOf(this));
|
||||
m_SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -490,45 +493,48 @@ namespace WebWindowComplex.Models
|
||||
if (m_SelMeasureType != (MeasureTypes)value)
|
||||
{
|
||||
MeasureTypes newType = (MeasureTypes)value;
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault();
|
||||
double dimSplitGroup = 0;
|
||||
if (bIsVertListDim)
|
||||
if(m_Parent.ParentWindow.AreaList.FirstOrDefault() != null)
|
||||
{
|
||||
dimSplitGroup = (CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach (var item in m_Parent.SplitVertList)
|
||||
Frame frame = m_Parent.ParentWindow.AreaList.FirstOrDefault()!;
|
||||
double dimSplitGroup = 0;
|
||||
if (bIsVertListDim)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitVertList.IndexOf(this));
|
||||
if (newType is MeasureTypes.PROPORTIONAL)
|
||||
{
|
||||
for (int i = 0; i < m_Parent.SplitVertList.Count; i++)
|
||||
dimSplitGroup = (CalculateWidthSplitGroup(frame, frame.DimensionList.Where(x => x.sName == "Width").First().dDimension, new AreaFound(-1, false))).m_Dimension;
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach (var item in m_Parent.SplitVertList)
|
||||
{
|
||||
m_Parent.SplitVertList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
} }
|
||||
else
|
||||
{
|
||||
//tot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
dimSplitGroup = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach (var item in m_Parent.SplitHorizList)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitHorizList.IndexOf(this));
|
||||
if(newType is MeasureTypes.PROPORTIONAL)
|
||||
{
|
||||
for(int i = 0; i < m_Parent.SplitHorizList.Count; i++)
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitVertList.IndexOf(this));
|
||||
if (newType is MeasureTypes.PROPORTIONAL)
|
||||
{
|
||||
m_Parent.SplitHorizList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
|
||||
for (int i = 0; i < m_Parent.SplitVertList.Count; i++)
|
||||
{
|
||||
m_Parent.SplitVertList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
|
||||
}
|
||||
} }
|
||||
else
|
||||
{
|
||||
//tot = (CalculateHeightSplitGroup(m_Parent, HeightTot(), new AreaFound(-1, false))).m_Dimension;
|
||||
dimSplitGroup = (CalculateHeightSplitGroup(frame, frame.HeightFrame(), new AreaFound(-1, false))).m_Dimension;
|
||||
AreaDimension ad = new AreaDimension(dDimension, SelMeasureType);
|
||||
List<AreaDimension> newDimensions = new List<AreaDimension>();
|
||||
foreach (var item in m_Parent.SplitHorizList)
|
||||
{
|
||||
newDimensions.Add(new AreaDimension(item.dDimension, item.SelMeasureType));
|
||||
}
|
||||
m_dDimension = ad.ConvertDimension(newDimensions, m_SelMeasureType, newType, dimSplitGroup, m_Parent.SplitHorizList.IndexOf(this));
|
||||
if(newType is MeasureTypes.PROPORTIONAL)
|
||||
{
|
||||
for(int i = 0; i < m_Parent.SplitHorizList.Count; i++)
|
||||
{
|
||||
m_Parent.SplitHorizList.ElementAt(i).SetDimension(newDimensions.ElementAt(i).dDimension);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
m_SelMeasureType = (MeasureTypes)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,10 +143,10 @@ namespace WebWindowComplex.Models
|
||||
#region Private Fields
|
||||
|
||||
private List<Frame> m_AreaList = new List<Frame>();
|
||||
private string m_sColorMaterial;
|
||||
private string m_sGlass;
|
||||
private string m_sMaterial;
|
||||
private string m_sProfilePath;
|
||||
private string? m_sColorMaterial;
|
||||
private string? m_sGlass;
|
||||
private string? m_sMaterial;
|
||||
private string? m_sProfilePath;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ namespace WebWindowComplex
|
||||
};
|
||||
//FrameArcElement ae = new FrameArcElement(frame, window, 10, true, true);
|
||||
JsonWindow jsonWindow = new JsonWindow("Profilo78", "Pino", "Black", "Vetro BE 2S 4T/16/4T");
|
||||
JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, null, false, 0, 1);
|
||||
JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, "Bottom", false, 0, 1);
|
||||
jsonWindow.AreaList.Add(jsonFrame);
|
||||
//jsonFrame.ArcElement = ae.Serialize();
|
||||
foreach (var Dimension in DimensionList)
|
||||
@@ -764,7 +764,7 @@ namespace WebWindowComplex
|
||||
// Inserisco i profili ricevuti nei rispettivi Element
|
||||
foreach (var item in LiveData.ProfElementList)
|
||||
{
|
||||
UpdateProfileElement(item.Profiles, item.GroupId, item.SashId);
|
||||
UpdateProfileElement(item.Profiles, item.GroupId, item.SashId < 1 ? -1: item.SashId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -792,8 +792,8 @@ namespace WebWindowComplex
|
||||
{
|
||||
//Frame.m_AllThresholdList = ListPayload.Threshold;
|
||||
string profile = WindowFromJson.ProfilePath;
|
||||
Window.m_ParameterList = ListPayload.ProfileList.FirstOrDefault(x => x.ProfileName.Equals(profile)).ParameterDict;
|
||||
Frame.m_AllThresholdList = ListPayload.ProfileList.FirstOrDefault(x => x.ProfileName.Equals(profile)).ThresholdList;
|
||||
Window.m_ParameterList = ListPayload.ProfileList?.FirstOrDefault(x => x.ProfileName.Equals(profile))?.ParameterDict ?? new();
|
||||
Frame.m_AllThresholdList = ListPayload.ProfileList?.FirstOrDefault(x => x.ProfileName.Equals(profile))?.ThresholdList ?? new();
|
||||
Sash.m_HardwareCompleteList = ListPayload.Hardware;
|
||||
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
|
||||
}
|
||||
@@ -1078,7 +1078,7 @@ namespace WebWindowComplex
|
||||
/// <param name="currentArea"> Area che si sta analizzando </param>
|
||||
/// <param name="idSearch"> Id Area che si sta cercando </param>
|
||||
/// <returns></returns>
|
||||
private Area SearchAreaFromGroupId(Area currentArea, int idSearch)
|
||||
private Area? SearchAreaFromGroupId(Area currentArea, int idSearch)
|
||||
{
|
||||
if (currentArea.GroupId == idSearch)
|
||||
{
|
||||
@@ -1086,7 +1086,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
foreach (Area child in currentArea.AreaList)
|
||||
{
|
||||
Area found = SearchAreaFromGroupId(child, idSearch);
|
||||
Area? found = SearchAreaFromGroupId(child, idSearch);
|
||||
if (found != null)
|
||||
{
|
||||
return found;
|
||||
@@ -1102,7 +1102,7 @@ namespace WebWindowComplex
|
||||
/// <param name="GroupIdSearch"> Id Area che si sta cercando </param>
|
||||
/// <param name="SashIdSearch"> Id dell'anta (se -1 non usare) </param>
|
||||
/// <returns></returns>
|
||||
private void UpdateProfileElement(List<string> profileNameList, int GroupIdSearch, int SashIdSearch = -1)
|
||||
private void UpdateProfileElement(List<string> profileNameList, int GroupIdSearch, int SashIdSearch)
|
||||
{
|
||||
// Cerco area corrispondente al GroupId
|
||||
Area found = SearchAreaFromGroupId(FrameWindow, SashIdSearch);
|
||||
@@ -1266,7 +1266,7 @@ namespace WebWindowComplex
|
||||
if (newFrame != null)
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = m_CurrWindow.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
var currRec = m_CurrWindow?.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
// lo aggiorno
|
||||
currRec = newFrame;
|
||||
if (forceSvgNoHw)
|
||||
@@ -1286,7 +1286,7 @@ namespace WebWindowComplex
|
||||
if (newFrame != null)
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = m_CurrWindow.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
var currRec = m_CurrWindow?.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
// lo aggiorno
|
||||
currRec = newFrame;
|
||||
// resetto hw lst
|
||||
@@ -1312,7 +1312,7 @@ namespace WebWindowComplex
|
||||
if (newFrame != null)
|
||||
{
|
||||
// cerco il record
|
||||
var currRec = m_CurrWindow.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
var currRec = m_CurrWindow?.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId);
|
||||
// lo aggiorno
|
||||
currRec = newFrame;
|
||||
// richiedo update element del frame
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.8.1.2715</Version>
|
||||
<Version>2.8.1.2811</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -119,6 +119,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.8.1.2715</Version>
|
||||
<Version>2.8.1.2811</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -158,6 +158,19 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1729,14 +1729,14 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
}
|
||||
|
||||
private Visibility m_OptVisibility;
|
||||
public Visibility OptVisibility
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OptVisibility;
|
||||
}
|
||||
}
|
||||
//private Visibility m_OptVisibility;
|
||||
//public Visibility OptVisibility
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_OptVisibility;
|
||||
// }
|
||||
//}
|
||||
|
||||
//public AGBOption(ParametriOpzioniParametri HdwOptionParam)
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user