Merge branch 'release/UpdateNuget_05'
This commit is contained in:
@@ -11,8 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowConfigurator", "We
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAedificaConfigurator", "WebAedificaConfigurator\WebAedificaConfigurator.csproj", "{BD1F43E8-BE5F-469E-9552-C98CA8639A06}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowJWD", "WebWindowJWD\WebWindowJWD.csproj", "{D32E55D6-8C37-477F-8065-4020EB27900E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowComplex", "WebWindowComplex\WebWindowComplex.csproj", "{4E197932-13B1-45FB-9EDD-694604644745}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowTest", "WebWindowTest\WebWindowTest.csproj", "{C22770A7-C344-4CE9-8D6F-6ACE62091C31}"
|
||||
@@ -41,10 +39,6 @@ Global
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D32E55D6-8C37-477F-8065-4020EB27900E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D32E55D6-8C37-477F-8065-4020EB27900E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D32E55D6-8C37-477F-8065-4020EB27900E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D32E55D6-8C37-477F-8065-4020EB27900E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4E197932-13B1-45FB-9EDD-694604644745}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E197932-13B1-45FB-9EDD-694604644745}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E197932-13B1-45FB-9EDD-694604644745}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
||||
@@ -4,7 +4,19 @@
|
||||
<PageTitle>EditJWD</PageTitle>
|
||||
|
||||
|
||||
<WebWindowJWDInput EC_OnUpdate="SaveJWD"
|
||||
LiveSVG="@currSvg"
|
||||
CurrJwd="@InitialJwd">
|
||||
</WebWindowJWDInput>
|
||||
<TableComp IN_TemplateDTOList="@AvailTemplateList"
|
||||
IN_SelTemplate="@SelTemplate"
|
||||
IN_FamilyHardwareList="@AvailFamilyHardwareList"
|
||||
IN_SelFamilyHardware="@SelFamilyHardware"
|
||||
IN_HardwareList="@AvailHardwareList"
|
||||
IN_ColorMaterialList="@AvailColorMaterialList"
|
||||
IN_SelColorMaterial="@SelColorMaterial"
|
||||
IN_MaterialList="@AvailMaterialList"
|
||||
IN_SelMaterial="@SelMaterial"
|
||||
IN_GlassList="@AvailGlassList"
|
||||
IN_SelGlass="@SelGlass"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg"
|
||||
CurrJwd="@InitialJwd">
|
||||
</TableComp>
|
||||
@@ -3,9 +3,11 @@ using EgwCoreLib.Lux.Core.RestPayload;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Diagnostics;
|
||||
using System.Security.AccessControl;
|
||||
using WebWindowConfigurator;
|
||||
using WebWindowConfigurator.DTO;
|
||||
using WebWindowComplex;
|
||||
using WebWindowComplex.DTO;
|
||||
|
||||
namespace Test.UI.Components.Pages
|
||||
{
|
||||
@@ -14,7 +16,7 @@ namespace Test.UI.Components.Pages
|
||||
#region Public Properties
|
||||
|
||||
public string InitialJwd = "";
|
||||
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -29,13 +31,45 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string currJwd = "";
|
||||
protected string currJwd = "...";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Natura"),
|
||||
new string("Optima")
|
||||
};
|
||||
protected List<string> AvailColorMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("White"),
|
||||
new string("Black"),
|
||||
new string("Blu")
|
||||
};
|
||||
protected List<string> AvailMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Pine"),
|
||||
new string("Fir")
|
||||
};
|
||||
protected List<string> AvailGlassList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("4/12/4"),
|
||||
new string("4/16/4"),
|
||||
new string("4/12/4/12/4"),
|
||||
new string("4/16/4/16/4"),
|
||||
new string("4T/12/4T"),
|
||||
new string("4T/16/4T")
|
||||
};
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
|
||||
@@ -47,11 +81,7 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
protected MarkupString JsonSer
|
||||
{
|
||||
get
|
||||
{
|
||||
string outVal = m_CurrArgs["Jwd"];
|
||||
return (MarkupString)outVal.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
get => (MarkupString)currJwd.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
@@ -60,15 +90,17 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
ConfInit();
|
||||
InitialJwd = "{\r\n \"ProfilePath\": \"Profilo78\",\r\n \"AreaList\": [\r\n {\r\n \"Shape\": \"RECTANGLE\",\r\n \"DimensionList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"sName\": \"Width\",\r\n \"dValue\": 1200.0\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"sName\": \"Height\",\r\n \"dValue\": 1500.0\r\n }\r\n ],\r\n \"JointList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 3,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 4,\r\n \"JointType\": \"FULL_V\"\r\n }\r\n ],\r\n \"BottomRail\": false,\r\n \"BottomRailQty\": 0,\r\n \"AreaList\": [\r\n {\r\n \"bIsSashVertical\": true,\r\n \"SashList\": [\r\n {\r\n \"OpeningType\": \"TURNONLY_LEFT\",\r\n \"bHasHandle\": false,\r\n \"dDimension\": 50.0\r\n },\r\n {\r\n \"OpeningType\": \"TILTTURN_RIGHT\",\r\n \"bHasHandle\": true,\r\n \"dDimension\": 50.0\r\n }\r\n ],\r\n \"SashType\": \"NULL\",\r\n \"JointList\": [\r\n {\r\n \"nIndex\": 1,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 2,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 3,\r\n \"JointType\": \"FULL_V\"\r\n },\r\n {\r\n \"nIndex\": 4,\r\n \"JointType\": \"FULL_V\"\r\n }\r\n ],\r\n \"Hardware\": \"000000\",\r\n \"AreaList\": [\r\n {\r\n \"AreaList\": [\r\n {\r\n \"FillType\": \"GLASS\",\r\n \"AreaList\": [],\r\n \"AreaType\": \"FILL\"\r\n }\r\n ],\r\n \"AreaType\": \"SPLITTED\"\r\n },\r\n {\r\n \"AreaList\": [\r\n {\r\n \"FillType\": \"GLASS\",\r\n \"AreaList\": [],\r\n \"AreaType\": \"FILL\"\r\n }\r\n ],\r\n \"AreaType\": \"SPLITTED\"\r\n }\r\n ],\r\n \"AreaType\": \"SASH\"\r\n }\r\n ],\r\n \"AreaType\": \"FRAME\"\r\n }\r\n ]\r\n}";
|
||||
SelFamilyHardware = "Natura";
|
||||
SelColorMaterial = "Black";
|
||||
SelColorMaterial = "Pine";
|
||||
SelGlass = "4T/16/4T";
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
private bool isLoading = false;
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
@@ -76,7 +108,9 @@ namespace Test.UI.Components.Pages
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string CalcUid = "CurrWindow";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private string cFileTemplate = "Data/Setup.json";
|
||||
private string cFileHardware = "Hardware/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
@@ -84,13 +118,9 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string windowUid = "CurrWindow";
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -126,20 +156,41 @@ namespace Test.UI.Components.Pages
|
||||
private async Task ReloadData()
|
||||
{
|
||||
//return base.OnInitializedAsync();
|
||||
AvailTemplateList = new List<TemplateSelectDTO>();
|
||||
AvailHardwareList = new List<Hardware>();
|
||||
// brutale, da rivedere...
|
||||
if (File.Exists(cFile))
|
||||
if (string.IsNullOrEmpty(InitialJwd))
|
||||
{
|
||||
//item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
|
||||
if (File.Exists(cFileTemplate))
|
||||
{
|
||||
string rawVal = File.ReadAllText(cFileTemplate);
|
||||
var rawList = JsonConvert.DeserializeObject<List<TemplateSelectDTO>>(rawVal) ?? new List<TemplateSelectDTO>();
|
||||
|
||||
// calcolo URL immagini... DTO interno da rivedere?
|
||||
foreach (var item in rawList)
|
||||
{
|
||||
item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
|
||||
AvailTemplateList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
isLoading = false;
|
||||
if (File.Exists(cFileHardware))
|
||||
{
|
||||
string rawValHW = File.ReadAllText(cFileHardware);
|
||||
var rawListHW = JsonConvert.DeserializeObject<List<Hardware>>(rawValHW) ?? new List<Hardware>();
|
||||
foreach (var item in rawListHW)
|
||||
{
|
||||
AvailHardwareList.Add(item);
|
||||
}
|
||||
}
|
||||
await Task.Delay(100);
|
||||
}
|
||||
|
||||
private async Task SaveJWD(Dictionary<string,string> CurrArgs)
|
||||
private async Task SaveJWD(Dictionary<string, string> CurrArgs)
|
||||
{
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (m_CurrArgs != null)
|
||||
if (currJwd != null)
|
||||
{
|
||||
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
|
||||
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
|
||||
@@ -148,6 +199,18 @@ namespace Test.UI.Components.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTemplate(TemplateSelectDTO selTemp)
|
||||
{
|
||||
string rawVal = "";
|
||||
currSel = selTemp;
|
||||
// brutale,d a rivedere...
|
||||
if (File.Exists(selTemp.JwdFileName))
|
||||
{
|
||||
rawVal = File.ReadAllText(selTemp.JwdFileName);
|
||||
}
|
||||
SelTemplate = new Template(selTemp.Index, selTemp.Description, selTemp.SVGFileName, rawVal);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,16 @@
|
||||
IN_FamilyHardwareList="@AvailFamilyHardwareList"
|
||||
IN_SelFamilyHardware="@SelFamilyHardware"
|
||||
IN_HardwareList="@AvailHardwareList"
|
||||
IN_ColorMaterialList="@AvailColorMaterialList"
|
||||
IN_SelColorMaterial="@SelColorMaterial"
|
||||
IN_MaterialList="@AvailMaterialList"
|
||||
IN_SelMaterial="@SelMaterial"
|
||||
IN_GlassList="@AvailGlassList"
|
||||
IN_SelGlass="@SelGlass"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg">
|
||||
LiveSVG="@currSvg"
|
||||
CurrJwd="@InitialJwd">
|
||||
</TableComp>
|
||||
@*
|
||||
<p>
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Diagnostics;
|
||||
using WebWindow.Base;
|
||||
using System.Security.AccessControl;
|
||||
using WebWindowComplex;
|
||||
using WebWindowComplex.DTO;
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
public string InitialJwd = "";
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -29,7 +30,7 @@ namespace Test.UI.Components.Pages
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
|
||||
protected string currJwd = "...";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
@@ -39,9 +40,35 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
|
||||
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>();
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Natura"),
|
||||
new string("Optima")
|
||||
};
|
||||
protected List<string> AvailColorMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("White"),
|
||||
new string("Black"),
|
||||
new string("Blu")
|
||||
};
|
||||
protected List<string> AvailMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Pine"),
|
||||
new string("Fir")
|
||||
};
|
||||
protected List<string> AvailGlassList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("4/12/4"),
|
||||
new string("4/16/4"),
|
||||
new string("4/12/4/12/4"),
|
||||
new string("4/16/4/16/4"),
|
||||
new string("4T/12/4T"),
|
||||
new string("4T/16/4T")
|
||||
};
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
@@ -64,9 +91,10 @@ namespace Test.UI.Components.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
AvailFamilyHardwareList.Add("Natura");
|
||||
AvailFamilyHardwareList.Add("Optima");
|
||||
SelFamilyHardware = "Natura";
|
||||
SelColorMaterial = "Black";
|
||||
SelMaterial = "Pine";
|
||||
SelGlass = "4T/16/4T";
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
await ReloadData();
|
||||
}
|
||||
@@ -128,18 +156,20 @@ namespace Test.UI.Components.Pages
|
||||
//return base.OnInitializedAsync();
|
||||
AvailTemplateList = new List<TemplateSelectDTO>();
|
||||
AvailHardwareList = new List<Hardware>();
|
||||
await Task.Delay(100);
|
||||
// brutale, da rivedere...
|
||||
if (File.Exists(cFileTemplate))
|
||||
if (string.IsNullOrEmpty(InitialJwd))
|
||||
{
|
||||
string rawVal = File.ReadAllText(cFileTemplate);
|
||||
var rawList = JsonConvert.DeserializeObject<List<TemplateSelectDTO>>(rawVal) ?? new List<TemplateSelectDTO>();
|
||||
|
||||
// calcolo URL immagini... DTO interno da rivedere?
|
||||
foreach (var item in rawList)
|
||||
if (File.Exists(cFileTemplate))
|
||||
{
|
||||
item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
|
||||
AvailTemplateList.Add(item);
|
||||
string rawVal = File.ReadAllText(cFileTemplate);
|
||||
var rawList = JsonConvert.DeserializeObject<List<TemplateSelectDTO>>(rawVal) ?? new List<TemplateSelectDTO>();
|
||||
|
||||
// calcolo URL immagini... DTO interno da rivedere?
|
||||
foreach (var item in rawList)
|
||||
{
|
||||
item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
|
||||
AvailTemplateList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (File.Exists(cFileHardware))
|
||||
@@ -151,13 +181,14 @@ namespace Test.UI.Components.Pages
|
||||
AvailHardwareList.Add(item);
|
||||
}
|
||||
}
|
||||
await Task.Delay(100);
|
||||
}
|
||||
|
||||
private async Task SaveJWD(Dictionary<string, string> CurrArgs)
|
||||
{
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (currSel != null)
|
||||
if (currJwd != null)
|
||||
{
|
||||
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
|
||||
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
|
||||
|
||||
@@ -8,8 +8,18 @@
|
||||
IN_FamilyHardwareList="@AvailFamilyHardwareList"
|
||||
IN_SelFamilyHardware="@SelFamilyHardware"
|
||||
IN_HardwareList="@AvailHardwareList"
|
||||
IN_ColorMaterialList="@AvailColorMaterialList"
|
||||
IN_SelColorMaterial="@SelColorMaterial"
|
||||
IN_MaterialList="@AvailMaterialList"
|
||||
IN_SelMaterial="@SelMaterial"
|
||||
IN_GlassList="@AvailGlassList"
|
||||
IN_SelGlass="@SelGlass"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg"
|
||||
CurrJwd="@InitialJwd">
|
||||
</Test>
|
||||
|
||||
<p>
|
||||
@m_CurrArgs.GetValueOrDefault("Jwd")
|
||||
</p>
|
||||
@@ -40,9 +40,35 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
|
||||
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>();
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Natura"),
|
||||
new string("Optima")
|
||||
};
|
||||
protected List<string> AvailColorMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("White"),
|
||||
new string("Black"),
|
||||
new string("Blu")
|
||||
};
|
||||
protected List<string> AvailMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Pine"),
|
||||
new string("Fir")
|
||||
};
|
||||
protected List<string> AvailGlassList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("4/12/4"),
|
||||
new string("4/16/4"),
|
||||
new string("4/12/4/12/4"),
|
||||
new string("4/16/4/16/4"),
|
||||
new string("4T/12/4T"),
|
||||
new string("4T/16/4T")
|
||||
};
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
@@ -65,9 +91,10 @@ namespace Test.UI.Components.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
AvailFamilyHardwareList.Add("Natura");
|
||||
AvailFamilyHardwareList.Add("Optima");
|
||||
SelFamilyHardware = "Natura";
|
||||
SelColorMaterial = "Black";
|
||||
SelColorMaterial = "Pine";
|
||||
SelGlass = "4T/16/4T";
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
|
||||
@@ -8,8 +8,18 @@
|
||||
IN_FamilyHardwareList="@AvailFamilyHardwareList"
|
||||
IN_SelFamilyHardware="@SelFamilyHardware"
|
||||
IN_HardwareList="@AvailHardwareList"
|
||||
IN_ColorMaterialList="@AvailColorMaterialList"
|
||||
IN_SelColorMaterial="@SelColorMaterial"
|
||||
IN_MaterialList="@AvailMaterialList"
|
||||
IN_SelMaterial="@SelMaterial"
|
||||
IN_GlassList="@AvailGlassList"
|
||||
IN_SelGlass="@SelGlass"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg"
|
||||
CurrJwd="@InitialJwd">
|
||||
</Test>
|
||||
|
||||
<p>
|
||||
@m_CurrArgs.GetValueOrDefault("Jwd")
|
||||
</p>
|
||||
|
||||
@@ -40,9 +40,35 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
|
||||
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>();
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Natura"),
|
||||
new string("Optima")
|
||||
};
|
||||
protected List<string> AvailColorMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("White"),
|
||||
new string("Black"),
|
||||
new string("Blu")
|
||||
};
|
||||
protected List<string> AvailMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Pine"),
|
||||
new string("Fir")
|
||||
};
|
||||
protected List<string> AvailGlassList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("4/12/4"),
|
||||
new string("4/16/4"),
|
||||
new string("4/12/4/12/4"),
|
||||
new string("4/16/4/16/4"),
|
||||
new string("4T/12/4T"),
|
||||
new string("4T/16/4T")
|
||||
};
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
@@ -65,11 +91,10 @@ namespace Test.UI.Components.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
AvailFamilyHardwareList.Add("Natura");
|
||||
AvailFamilyHardwareList.Add("Optima");
|
||||
SelFamilyHardware = "Natura";
|
||||
//InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
//currJwd = InitialJwd;
|
||||
SelColorMaterial = "Black";
|
||||
SelMaterial = "Pine";
|
||||
SelGlass = "4T/16/4T";
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
@using Test.UI.Components
|
||||
@using WebWindowConfigurator
|
||||
@using WebAedificaConfigurator
|
||||
@using WebWindowJWD
|
||||
@using WebWindowComplex
|
||||
@using WebWindowTest
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -37,14 +41,17 @@
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"OpeningType": "TURNONLY_LEFT",
|
||||
"bHasHandle": false,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"SashId": 2,
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 50.0
|
||||
@@ -69,11 +76,13 @@
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Hardware": "102111",
|
||||
"Hardware": "000559",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
@@ -82,8 +91,10 @@
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
@@ -35,11 +38,13 @@
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"IdGroup": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"OpeningType": "TILTTURN_LEFT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
@@ -64,10 +69,12 @@
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"Hardware": "101111",
|
||||
"Hardware": "000558",
|
||||
"IdGroup": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 3,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -37,8 +41,11 @@
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitPositionList": [
|
||||
"SplitStartVert": false,
|
||||
"SplitVertList": [],
|
||||
"SplitHorizList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
@@ -50,8 +57,10 @@
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
@@ -60,16 +69,20 @@
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"OpeningType": "TURNONLY_LEFT",
|
||||
"bHasHandle": false,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"SashId": 2,
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 50.0
|
||||
@@ -94,11 +107,13 @@
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"Hardware": "102112",
|
||||
"Hardware": "000559",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 7,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 8,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
@@ -107,8 +122,10 @@
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 9,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 10,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "DOUBLECHAMFER",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -42,8 +46,10 @@
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitPositionList": [
|
||||
"SplitStartVert": true,
|
||||
"SplitVertList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
@@ -53,13 +59,17 @@
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"SplitHorizList": [],
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"OpeningType": "TILTTURN_LEFT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
@@ -89,6 +99,7 @@
|
||||
"Hardware": "000000",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 5,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
@@ -100,11 +111,14 @@
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 7,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
@@ -134,6 +148,7 @@
|
||||
"Hardware": "000000",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 8,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 1500.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 1800.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "GRID",
|
||||
"SplitStartVert": false,
|
||||
"SplitVertList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"SplitHorizList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 30.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 30.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 7,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 8,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 9,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 10,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 11,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 12,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 13,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 14,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -37,8 +41,10 @@
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitPositionList": [
|
||||
"SplitStartVert": true,
|
||||
"SplitVertList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
@@ -48,10 +54,13 @@
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"SplitHorizList": [],
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
@@ -60,8 +69,10 @@
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 1500.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 1800.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 60.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 60.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -25,9 +25,9 @@
|
||||
},
|
||||
{
|
||||
"Index": 5,
|
||||
"Description": "Finestra con split verticale e orizzontale",
|
||||
"SVGFileName": "FinestraSplitVertOriz.svg",
|
||||
"JwdFileName": "Data/FinestraSplitVertOriz.jwd"
|
||||
"Description": "Finestra con split grid",
|
||||
"SVGFileName": "FinestraSplitGrid.svg",
|
||||
"JwdFileName": "Data/FinestraSplitGrid.jwd"
|
||||
},
|
||||
{
|
||||
"Index": 6,
|
||||
|
||||
+12
-83
@@ -1,119 +1,48 @@
|
||||
[
|
||||
{
|
||||
"sId": "101111",
|
||||
"sId": "000558",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_1SASH_2T_12_2T",
|
||||
"sName": "Profilo78_Rect_Sash",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "101112",
|
||||
"sId": "000562",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_1SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "101121",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_BANDIERA_RECTANGLE_1SASH_2T_12_2T",
|
||||
"sName": "Profilo78_Rect_Sash",
|
||||
"sOpeningType": "ANTA_BANDIERA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "101122",
|
||||
"sId": "000559",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_BANDIERA_RECTANGLE_1SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_BANDIERA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "101211",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_CHAMFER_1SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "CHAMFER",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "102111",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_2SASH_3T_12_3T",
|
||||
"sName": "Profilo78_Rect_DoubleSash",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "102112",
|
||||
"sId": "000563",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_2SASH_2T_18_2T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "102121",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_BANDIERA_RECTANGLE_2SASH_3T_12_3T",
|
||||
"sName": "Profilo78_TurnOnly_Rect_DoubleSash",
|
||||
"sOpeningType": "ANTA_BANDIERA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "102221",
|
||||
"sId": "000560",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_BANDIERA_CHAMFER_2SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_BANDIERA",
|
||||
"sShape": "CHAMFER",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "201111",
|
||||
"sFamily": "Optima",
|
||||
"sName": "Optima_ANTA_RIBALTA_RECTANGLE_1SASH_3T_12_3T",
|
||||
"sName": "Profilo78_Rect_TripleSash",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "201221",
|
||||
"sFamily": "Optima",
|
||||
"sName": "Optima_ANTA_BANDIERA_RECTANGLE_1SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_BANDIERA",
|
||||
"sShape": "CHAMFER",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "202111",
|
||||
"sFamily": "Optima",
|
||||
"sName": "Optima_ANTA_RIBALTA_RECTANGLE_2SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "202211",
|
||||
"sFamily": "Optima",
|
||||
"sName": "Optima_ANTA_RIBALTA_CHAMFER_2SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "CHAMFER",
|
||||
"nSashQty": "2",
|
||||
"nSashQty": "3",
|
||||
"nSashPosition": "1"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis01.egalware.com/Lux/test/</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>8f1d6298-c1e6-44e6-82bd-4128ae17c0c7</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://IIS01.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/Lux/test</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<_TargetId>IISWebDeploy</_TargetId>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -34,7 +34,6 @@
|
||||
<ProjectReference Include="..\WebWindow.Base\WebWindow.Base.csproj" />
|
||||
<ProjectReference Include="..\WebWindowComplex\WebWindowComplex.csproj" />
|
||||
<ProjectReference Include="..\WebWindowConfigurator\WebWindowConfigurator.csproj" />
|
||||
<ProjectReference Include="..\WebWindowJWD\WebWindowJWD.csproj" />
|
||||
<ProjectReference Include="..\WebWindowTest\WebWindowTest.csproj" />
|
||||
<PackageReference Include="EgwCoreLib.Lux.Core" Version="0.9.2508.712" />
|
||||
<PackageReference Include="EgwCoreLib.Lux.Data" Version="0.9.2508.712" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>2.7.9.1615</Version>
|
||||
<Version>2.7.9.2909</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -28,3 +28,58 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace WebWindowComplex
|
||||
private AreaTypes m_type;
|
||||
public AreaTypes Type
|
||||
{
|
||||
get
|
||||
get
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
set
|
||||
{
|
||||
set
|
||||
{
|
||||
m_type = value;
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public ItemTable(AreaTypes elementType, string s_description,int n_row, int n_col, int n_numSash, int n_numChild)
|
||||
public ItemTable(AreaTypes elementType, string s_description, int n_row, int n_col, int n_numSash, int n_numChild)
|
||||
{
|
||||
Type = elementType;
|
||||
m_desc = s_description;
|
||||
|
||||
@@ -24,6 +24,48 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sMaterial;
|
||||
[JsonProperty]
|
||||
public string Material
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sMaterial = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sColorMaterial;
|
||||
[JsonProperty]
|
||||
public string ColorMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sColorMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sColorMaterial = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sGlass;
|
||||
[JsonProperty]
|
||||
public string Glass
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sGlass;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sGlass = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonArea> m_AreaList = new List<JsonArea>();
|
||||
[JsonProperty]
|
||||
public List<JsonArea> AreaList
|
||||
@@ -38,16 +80,25 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
public JsonWindow(string ProfilePath)
|
||||
public JsonWindow(string ProfilePath, string Material, string ColorMaterial, string Glass)
|
||||
{
|
||||
m_sProfilePath = ProfilePath;
|
||||
m_sMaterial = Material;
|
||||
m_sColorMaterial = ColorMaterial;
|
||||
m_sGlass = Glass;
|
||||
}
|
||||
|
||||
internal Window Deserialize()
|
||||
{
|
||||
Window Window = new Window() { sProfilePath = m_sProfilePath };
|
||||
Window Window = new Window()
|
||||
{
|
||||
sProfilePath = m_sProfilePath,
|
||||
sMaterial = m_sMaterial,
|
||||
sColorMaterial = m_sColorMaterial,
|
||||
sGlass = m_sGlass
|
||||
};
|
||||
foreach (var Area in AreaList)
|
||||
Window.AreaList.Add((Frame)Area.Deserialize(null,Window));
|
||||
Window.AreaList.Add((Frame)Area.Deserialize(null, Window));
|
||||
return Window;
|
||||
}
|
||||
}
|
||||
@@ -402,7 +453,7 @@ namespace WebWindowComplex.Json
|
||||
{
|
||||
Split.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Split;
|
||||
}
|
||||
}
|
||||
@@ -426,7 +477,7 @@ namespace WebWindowComplex.Json
|
||||
Split.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Split;
|
||||
}
|
||||
}
|
||||
@@ -470,7 +521,7 @@ namespace WebWindowComplex.Json
|
||||
{
|
||||
Fill.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Fill;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
public partial class ParametriOpzioni
|
||||
{
|
||||
private ParametriOpzioniParametri[] itemsField;
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute("Parametri", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public ParametriOpzioniParametri[] Items
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.itemsField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.itemsField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ParametriOpzioniParametri
|
||||
{
|
||||
private string nomeParametroField;
|
||||
|
||||
private string descrizioneParametroField;
|
||||
|
||||
private string valoreCorrenteField;
|
||||
|
||||
private string tipoField;
|
||||
|
||||
private string visibleField;
|
||||
|
||||
private string ricalcolaSeModificatoField;
|
||||
|
||||
private ParametriOpzioniParametriOpzioni[] opzioniField;
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string NomeParametro
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nomeParametroField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nomeParametroField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string DescrizioneParametro
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.descrizioneParametroField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.descrizioneParametroField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ValoreCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.valoreCorrenteField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.valoreCorrenteField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Tipo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tipoField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.tipoField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Visible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.visibleField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.visibleField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string RicalcolaSeModificato
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ricalcolaSeModificatoField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ricalcolaSeModificatoField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute("Opzioni", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public ParametriOpzioniParametriOpzioni[] Opzioni
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.opzioniField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.opzioniField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ParametriOpzioniParametriOpzioni
|
||||
{
|
||||
private string nomeParametroField;
|
||||
|
||||
private string descrizioneOpzioneField;
|
||||
|
||||
private string valoreField;
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string NomeParametro
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nomeParametroField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nomeParametroField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string DescrizioneOpzione
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.descrizioneOpzioneField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.descrizioneOpzioneField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.valoreField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.valoreField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
public class SplitParent
|
||||
{
|
||||
private Json.WindowConst.AreaTypes m_Type;
|
||||
public Json.WindowConst.AreaTypes Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_Description;
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Description;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Description = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Proprietà per sapere se sono in un'anta
|
||||
/// </summary>
|
||||
private bool m_IntoSash;
|
||||
public bool IntoSash
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IntoSash;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_IntoSash = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Area m_Split;
|
||||
public Area Split
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Split;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Split = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Area m_Splitted;
|
||||
public Area Splitted
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Splitted;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Splitted = value;
|
||||
}
|
||||
}
|
||||
|
||||
public SplitParent(Json.WindowConst.AreaTypes vType,string sDescrip, bool b_IntoSash, Area v_Split, Area v_Splitted)
|
||||
{
|
||||
Type = vType;
|
||||
Description = sDescrip;
|
||||
IntoSash = b_IntoSash;
|
||||
Split = v_Split;
|
||||
Splitted = v_Splitted;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,21 @@
|
||||
<div class="card text-center table-svg">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<div class="row">
|
||||
<div class="col-8 d-grid gap-2 d-md-flex justify-content-md-start">
|
||||
<div class="@headerCss()">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a data-target="#Template" class="nav-link text-secondary" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
}
|
||||
</li>
|
||||
@if (string.IsNullOrEmpty(CurrJwd))
|
||||
{
|
||||
<li class="nav-item">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a data-target="#Template" class="nav-link text-secondary" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
@if (FrameWindow != null)
|
||||
{
|
||||
<li class="nav-item">
|
||||
@@ -48,7 +51,7 @@
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-4 d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<div class="@buttonCss()">
|
||||
@if (currStep != CompileStep.Template)
|
||||
{
|
||||
<div class="col-4">
|
||||
@@ -66,34 +69,37 @@
|
||||
</div>
|
||||
<div class="card-body bg-transparent">
|
||||
<div class="text-center display-4">
|
||||
@if (currStep == CompileStep.Template)
|
||||
@if (string.IsNullOrEmpty(CurrJwd))
|
||||
{
|
||||
<table class="table table-hover align-middle">
|
||||
<thead class="fs-5">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col" class="col-4">Image</th>
|
||||
<th scope="col" class="text-start">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider fs-5">
|
||||
@foreach (var item in IN_TemplateDTOList)
|
||||
{
|
||||
string colorClass = "";
|
||||
@if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
|
||||
colorClass = "table-success";
|
||||
else
|
||||
colorClass = "";
|
||||
<tr style="height: 120px;" class="@colorClass" @onclick="() => DoSelect(item)">
|
||||
<td>@item.Index</td>
|
||||
<td><img class="img-fluid" width="100" src="@item.ImageUrl" /></td>
|
||||
<td class="text-start">@item.Description</td>
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<table class="table table-hover align-middle">
|
||||
<thead class="fs-5">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col" class="col-4">Image</th>
|
||||
<th scope="col" class="text-start">Description</th>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="table-group-divider fs-5">
|
||||
@foreach (var item in IN_TemplateDTOList)
|
||||
{
|
||||
string colorClass = "";
|
||||
@if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
|
||||
colorClass = "table-success";
|
||||
else
|
||||
colorClass = "";
|
||||
<tr style="height: 120px;" class="@colorClass" @onclick="() => DoSelect(item)">
|
||||
<td>@item.Index</td>
|
||||
<td><img class="img-fluid" width="100" src="@item.ImageUrl" /></td>
|
||||
<td class="text-start">@item.Description</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
}
|
||||
else if (currStep == CompileStep.Gerarchia)
|
||||
@if (currStep == CompileStep.Gerarchia)
|
||||
{
|
||||
<div class="display-6">
|
||||
<table class="table table-sm table-hover align-middle">
|
||||
@@ -130,7 +136,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@fillTable(i, j)</td>
|
||||
<td>@FillTable(i, j)</td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
@@ -138,7 +144,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
else if (currStep == CompileStep.Frame)
|
||||
{
|
||||
@@ -189,19 +195,19 @@
|
||||
<h5 class="card-title m-0">Frame joints</h5>
|
||||
<div class="row text-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 0)">Angled</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED, FrameWindow)">Angled</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 0)">Horizontal</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H, FrameWindow)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 0)">Vertical</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V, FrameWindow)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (Joint joint in FrameWindow.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint@(FrameWindow.JointList.IndexOf(joint) + 1)">@((positionJoints)(FrameWindow.JointList.IndexOf(joint)))</label>
|
||||
<label class="input-group-text" for="IndexJoint@(FrameWindow.JointList.IndexOf(joint) + 1)">@((PositionJoints)(FrameWindow.JointList.IndexOf(joint)))</label>
|
||||
<select class="form-select" id="IndexJoint@(FrameWindow.JointList.IndexOf(joint) + 1)" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
@@ -362,142 +368,16 @@
|
||||
int Index = j;
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySplitted(currSplitted, Index)">Copy sash @(j+1)</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySash(currSplitted, Index)">Copy sash @(j + 1)</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@* @for (int i = 0; i < SplitParentList.Count; i++)
|
||||
{
|
||||
@for (int j = 0; j < 2 && (i * 2 + j <= SplitParentList.Count - 1); j++)
|
||||
{
|
||||
SplitParent currSplitParent = m_SplitParentList[i * 2 + j];
|
||||
@if (currSplitParent.Split != null)
|
||||
{
|
||||
Split currSplit = (Split)currSplitParent.Split;
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if (currSplitParent.Description.Contains("Sash"))
|
||||
{
|
||||
<h5>@(currSplitParent.Description + " area " + numSash)</h5>
|
||||
numSash++;
|
||||
}
|
||||
else if (currSplitParent.Description.Contains("Split"))
|
||||
{
|
||||
<h5>@(currSplitParent.Description + " area " + numSplit)</h5>
|
||||
numSplit++;
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5>@( currSplitParent.Description + " area")</h5>
|
||||
}
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>Split</h5>
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplitParent.Split)">Swap Aree</button>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitParentList.IndexOf(currSplitParent) + 1)">Number</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQty">
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ShapeSplit@(m_SplitParentList.IndexOf(currSplitParent) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(m_SplitParentList.IndexOf(currSplitParent) + 1)" @bind="@currSplit.SelSplitShapeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<option value="2">Grid</option>
|
||||
<option value="3">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
@foreach (var dim in currSplit.SplitPositionList)
|
||||
{
|
||||
string desc = "";
|
||||
@if (currSplit.SelSplitShape == Json.WindowConst.SplitShapes.VERTICAL)
|
||||
{
|
||||
@if (currSplit.SplitPositionList.IndexOf(dim) == 0)
|
||||
{
|
||||
desc = "Larg. area sx split";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Larg. area dx split";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (currSplit.SplitPositionList.IndexOf(dim) == 0)
|
||||
{
|
||||
desc = "Altez. area sotto split";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Altez. area sopra split";
|
||||
}
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitPositionList.IndexOf(dim) + 1)">@desc</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (currSplitParent.Description.Contains("Sash"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (currSplitParent.Description.Contains("Frame"))
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>@currSplitParent.Description</h5>
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitParent.Splitted.AddSplit()">Aggiungi split</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (currSplitParent.Description.Contains("Split area with sash"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@if (currSplitParent.IntoSash == false)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>@("Area " + currSplitParent.Description + " " + numSplit)</h5>
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitParent.Splitted.AddSash()">Aggiungi sash</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
numSplit++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -590,7 +470,7 @@
|
||||
</div>
|
||||
<div class="d-flex justify-content-start fs-5 mb-2">
|
||||
<div class="px-1">
|
||||
<input class="form-check-input ml-auto" type="checkbox" name="Handle" id="HandleSashLabel@(i * 2 + j + 1)" checked="@sash.bHasHandle" @onclick="() => changeHandle(sash)">
|
||||
<input class="form-check-input ml-auto" type="checkbox" name="Handle" id="HandleSashLabel@(i * 2 + j + 1)" checked="@sash.bHasHandle" @onclick="() => changeHandle(sash, item)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel@(i * 2 + j + 1)">Handle</label>
|
||||
@@ -603,7 +483,7 @@
|
||||
int IndexModify = i * 2 + j;
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContent(item, IndexCopy, IndexModify)">Copy @(k)</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContentSash(item, IndexCopy, IndexModify)">Copy @(k)</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -621,19 +501,19 @@
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
<div class="row p-0 m-0 text-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 1)">Angled</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED, item)">Angled</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 1)">Horizontal</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H, item)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 1)">Vertical</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V, item)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint@(item.JointList.IndexOf(joint) + 1)">@((positionJoints)(item.JointList.IndexOf(joint)))</label>
|
||||
<label class="input-group-text" for="IndexJoint@(item.JointList.IndexOf(joint) + 1)">@((PositionJoints)(item.JointList.IndexOf(joint)))</label>
|
||||
<select class="form-select" id="IndexJoint@(item.JointList.IndexOf(joint) + 1)" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
@@ -723,10 +603,10 @@
|
||||
</div>
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllFill(1)">All glass</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllFill(2)">All wood</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -796,11 +676,12 @@
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Generic</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="MaterialWindow">Material</label>
|
||||
<select class="form-select" id="MaterialWindow">
|
||||
<option value="0">Wood</option>
|
||||
<option value="1">PVC</option>
|
||||
<option value="2">Aluminum</option>
|
||||
<label class="input-group-text" for="MaterialWindow">Color</label>
|
||||
<select class="form-select" id="MaterialWindow" @bind="@((m_CurrWindow!).sMaterial)">
|
||||
@for (int i = 0; i < IN_MaterialList.Count; i++)
|
||||
{
|
||||
<option value="@IN_MaterialList[i]">@IN_MaterialList[i]</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
@@ -820,10 +701,11 @@
|
||||
<h5 class="card-title">Fill type</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="GlassWindow">Glass</label>
|
||||
<select class="form-select" id="GlassWindow">
|
||||
<option value="0">Doppio vetro</option>
|
||||
<option value="1">Triplo vetro</option>
|
||||
<option value="2">Antieffrazione</option>
|
||||
<select class="form-select" id="GlassWindow" @bind="@m_CurrWindow.sGlass">
|
||||
@for (int i = 0; i < IN_GlassList.Count; i++)
|
||||
{
|
||||
<option value="@IN_GlassList[i]">@IN_GlassList[i]</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
@@ -843,41 +725,25 @@
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Color</h5>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ColorWindow">Window</label>
|
||||
<select class="form-select" id="ColorWindow" @bind="@m_CurrWindow.sColorMaterial">
|
||||
@for (int i = 0; i < IN_ColorMaterialList.Count; i++)
|
||||
{
|
||||
<option value="@IN_ColorMaterialList[i]">@IN_ColorMaterialList[i]</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="TreatmentWindow">Treatment</label>
|
||||
<select class="form-select" id="TreatmentWindow">
|
||||
<option value="0">Standard</option>
|
||||
<option value="1">...</option>
|
||||
<option value="2">Custom</option>
|
||||
<label class="input-group-text" for="Trunking">Trunking</label>
|
||||
<select class="form-select" id="Trunking">
|
||||
<option value="0">Black</option>
|
||||
<option value="1">Silver</option>
|
||||
<option value="2">White</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="d-inline-flex gap-1">
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Bianco)" @onclick="() => ChangeColorWindow(ColorWindow.Bianco)" data-bs-toggle=" button" aria-pressed="true">Bianco</button>
|
||||
@* <button class="btn btn-outline-secondary btn-sm">Bianco</button> *@
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Grigio)" @onclick="() => ChangeColorWindow(ColorWindow.Grigio)" data-bs-toggle="button" aria-pressed="true">Grigio</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Tortora)" @onclick="() => ChangeColorWindow(ColorWindow.Tortora)" data-bs-toggle="button" aria-pressed="true">Tortora</button>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="d-inline-flex gap-1">
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Blu)" @onclick="() => ChangeColorWindow(ColorWindow.Blu)" data-bs-toggle="button" aria-pressed="true">Blu</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Verde)" @onclick="() => ChangeColorWindow(ColorWindow.Verde)" data-bs-toggle="button" aria-pressed="true">Verde</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Nero)" @onclick="() => ChangeColorWindow(ColorWindow.Nero)" data-bs-toggle="button" aria-pressed="true">Nero</button>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+232
-151
@@ -28,28 +28,26 @@ namespace WebWindowComplex
|
||||
public EventCallback<Dictionary<string, string>> EC_OnUpdate { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public Template IN_SelTemplate
|
||||
public string CurrJwd
|
||||
{
|
||||
get => m_SelTemplate;
|
||||
get => m_CurrJwd;
|
||||
set
|
||||
{
|
||||
// Se non ho ancora selezionato template oppure se cambio template di selezione
|
||||
if (value != null && (m_SelTemplate == null || (m_SelTemplate != null && value.nIndex != m_SelTemplate.nIndex)) && !string.IsNullOrEmpty(value.JWD))
|
||||
// Se viene passato un JWD
|
||||
if (m_CurrJwd != value && value != "")
|
||||
{
|
||||
m_SelTemplate = value;
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
m_CurrJwd = value;
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
m_CurrWindow = null;
|
||||
}
|
||||
Sash.m_HardwareCompleteList = IN_HardwareList;
|
||||
Sash.s_FamilyHardwareList = IN_FamilyHardwareList;
|
||||
Sash.s_SelFamilyHW = IN_SelFamilyHardware;
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
// recupero dimensioni Frame e Joint Frame della finestra precedente
|
||||
// Recupero dimensioni Frame e Joint del frame della finestra precedente
|
||||
if (m_PreviousWindow != null)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -60,16 +58,45 @@ namespace WebWindowComplex
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplitParentList = new List<SplitParent>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
// Aggiornate liste di sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public Template IN_SelTemplate
|
||||
{
|
||||
get => m_SelTemplate;
|
||||
set
|
||||
{
|
||||
// Se viene passato il template selezionato oppure se non è ancora stato selezionato un template oppure se si cambia template di selezione
|
||||
if (value != null && (m_SelTemplate == null || (m_SelTemplate != null && value.nIndex != m_SelTemplate.nIndex)) && !string.IsNullOrEmpty(value.JWD))
|
||||
{
|
||||
m_SelTemplate = value;
|
||||
// Aggiornamento parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
m_CurrWindow = null;
|
||||
}
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
// Recupero dimensioni Frame e Joint del frame della finestra precedente
|
||||
if (m_PreviousWindow != null)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
m_CurrWindow.AreaList[0].DimensionList[i] = m_PreviousWindow.AreaList[0].DimensionList[i];
|
||||
for (int i = 0; i < 4; i++)
|
||||
m_CurrWindow.AreaList[0].JointList[i] = m_PreviousWindow.AreaList[0].JointList[i];
|
||||
}
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
// Aggiornamento liste sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,10 +108,28 @@ namespace WebWindowComplex
|
||||
public List<string> IN_FamilyHardwareList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelFamilyHardware { get; set; } = null;
|
||||
public string IN_SelFamilyHardware { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<Hardware>? IN_HardwareList { get; set; } = null;
|
||||
public List<Hardware> IN_HardwareList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_ColorMaterialList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelColorMaterial { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_MaterialList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelMaterial { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_GlassList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelGlass { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public string LiveSVG
|
||||
@@ -121,17 +166,7 @@ namespace WebWindowComplex
|
||||
General
|
||||
}
|
||||
|
||||
protected enum ColorWindow
|
||||
{
|
||||
Bianco = 0,
|
||||
Grigio = 1,
|
||||
Tortora,
|
||||
Blu,
|
||||
Verde,
|
||||
Nero
|
||||
}
|
||||
|
||||
protected enum positionJoints
|
||||
protected enum PositionJoints
|
||||
{
|
||||
BL = 0, // Bottom Left
|
||||
BR = 1, // Bottom Right
|
||||
@@ -145,10 +180,10 @@ namespace WebWindowComplex
|
||||
|
||||
protected Frame FrameWindow
|
||||
{
|
||||
get => m_Frame;
|
||||
get => m_Frame!;
|
||||
set => m_Frame = value;
|
||||
}
|
||||
|
||||
protected string? m_CurrJwd { get; set; }
|
||||
protected string m_SelSVG { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
@@ -180,17 +215,11 @@ namespace WebWindowComplex
|
||||
{
|
||||
get => m_SplittedList;
|
||||
}
|
||||
protected List<SplitParent> SplitParentList
|
||||
{
|
||||
get => m_SplitParentList;
|
||||
}
|
||||
protected List<ItemTable> ItemTableList
|
||||
{
|
||||
get => m_ItemTableList;
|
||||
}
|
||||
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
protected string SelFamilyHardware
|
||||
{
|
||||
get
|
||||
@@ -213,33 +242,85 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
}
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
|
||||
protected string SelMaterial { get; set; } = ""!;
|
||||
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(CurrJwd))
|
||||
{
|
||||
currStep = CompileStep.Template;
|
||||
}
|
||||
else
|
||||
{
|
||||
currStep = CompileStep.Gerarchia;
|
||||
}
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo che resetta le liste (sash, split, splitted, fill e itemTable) e le crea nuovamente
|
||||
/// </summary>
|
||||
protected void UpdateLists()
|
||||
{
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
CreateWindowsList((m_CurrWindow!).AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per settare i parmateri di ingresso selezionati
|
||||
/// </summary>
|
||||
protected void UpdateSelParameter()
|
||||
{
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
SelColorMaterial = IN_SelColorMaterial ?? "";
|
||||
SelMaterial = IN_SelMaterial ?? "";
|
||||
SelGlass = IN_SelGlass ?? "";
|
||||
Sash.m_HardwareCompleteList = IN_HardwareList;
|
||||
Sash.s_FamilyHardwareList = IN_FamilyHardwareList;
|
||||
Sash.s_SelFamilyHW = IN_SelFamilyHardware;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per la scelta della maniglia univoca
|
||||
/// </summary>
|
||||
/// <param name="sashDim"></param>
|
||||
/// <param name="sashDim"> anta su cui si seleziona la maniglia </param>
|
||||
/// <returns></returns>
|
||||
protected async Task changeHandle(SashDimension sashDim)
|
||||
protected void changeHandle(SashDimension sashDim, Sash currSash)
|
||||
{
|
||||
//if(m_SashList[0].AreaList.Count < 3)
|
||||
//{
|
||||
foreach (SashDimension item in SashList[0].SashList)
|
||||
// Cerco la Sash che si sta considerando nella lista Sash
|
||||
foreach (Sash s in SashList)
|
||||
{
|
||||
if (item.Equals(sashDim))
|
||||
if (s.Equals(currSash))
|
||||
{
|
||||
item.bHasHandle = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.bHasHandle = false;
|
||||
// Per ogni anta della Sash setto bHasHandle
|
||||
foreach (SashDimension item in s.SashList)
|
||||
{
|
||||
if (item.Equals(sashDim))
|
||||
{
|
||||
item.bHasHandle = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.bHasHandle = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
// Ancora da fare...
|
||||
@@ -258,8 +339,8 @@ namespace WebWindowComplex
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.EngineQueryType.Preview}");
|
||||
Args.Add("Jwd", CurrJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
await EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
}
|
||||
@@ -269,8 +350,13 @@ namespace WebWindowComplex
|
||||
/// </summary>
|
||||
protected async Task DoReset()
|
||||
{
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson;
|
||||
if (string.IsNullOrEmpty(CurrJwd))
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
else
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd!, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
@@ -278,17 +364,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
m_SplitParentList = new List<SplitParent>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
// popolo le liste Fill, Sash e Split
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
// Aggiorante liste sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
currSash = -1;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
@@ -303,18 +380,17 @@ namespace WebWindowComplex
|
||||
/// <summary>
|
||||
/// Selezione del template
|
||||
/// </summary>
|
||||
/// <param name="newSel"> template selezionato</param>
|
||||
/// <param name="newSel"> template selezionato </param>
|
||||
protected async void DoSelect(TemplateSelectDTO newSel)
|
||||
{
|
||||
SelTemplateDTO = newSel;
|
||||
//DoSelectAndPreview(CompileStep.Frame);
|
||||
await EC_OnSelectedTemplate.InvokeAsync(newSel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare step e aggiornare preview svg
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo</param>
|
||||
/// <param name="newStep"> step successivo </param>
|
||||
protected async void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
{
|
||||
currStep = newStep;
|
||||
@@ -325,6 +401,11 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per riempire le liste Sash, Split, Splitted e Fill
|
||||
/// </summary>
|
||||
/// <param name="node"> Area da classificare </param>
|
||||
/// <param name="IntoSash"> Parametro per sapere se si è dentro un'anta </param>
|
||||
protected void CreateWindowsList(Area node, bool IntoSash)
|
||||
{
|
||||
if (node != null)
|
||||
@@ -369,6 +450,14 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per riempire la lista ItemTable in modo da poter rappresentarla come tabella
|
||||
/// </summary>
|
||||
/// <param name="node"> Area da classificare </param>
|
||||
/// <param name="row"> numero di riga </param>
|
||||
/// <param name="col"> numero di colonna </param>
|
||||
/// <param name="maxRow"> numero di riga massimo </param>
|
||||
/// <param name="maxCol"> numero di colonna massimo </param>
|
||||
protected void CreateElementTable(Area node, int row, int col, int maxRow, int maxCol)
|
||||
{
|
||||
if (node != null)
|
||||
@@ -377,7 +466,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
if(node.AreaList.Count >= 1)
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, 0));
|
||||
@@ -393,12 +482,12 @@ namespace WebWindowComplex
|
||||
if ((node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1) ||
|
||||
(node.ParentArea != null && node.ParentArea.AreaList.Count > 1))
|
||||
{
|
||||
for(int i = 0; i < SashList.Count; i++)
|
||||
for (int i = 0; i < SashList.Count; i++)
|
||||
{
|
||||
if (SashList[i].Equals(node))
|
||||
{
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if(node.AreaList.Count >= 1)
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, 0));
|
||||
@@ -422,7 +511,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
case AreaTypes.FILL:
|
||||
{
|
||||
if((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
|
||||
if ((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
|
||||
(node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1 && node.ParentArea.ParentArea.AreaList[0].AreaList[0].Equals(node)))
|
||||
maxCol++;
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL", maxRow, col, -1, 0));
|
||||
@@ -436,7 +525,7 @@ namespace WebWindowComplex
|
||||
if (node.ParentArea.AreaList.Count > 1 || (node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1))
|
||||
{
|
||||
if (node.ParentArea.AreaList[0].Equals(node) || node.ParentArea.ParentArea.AreaList[0].Equals(node))
|
||||
maxCol ++;
|
||||
maxCol++;
|
||||
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, node.AreaList.Count));
|
||||
else
|
||||
@@ -468,7 +557,7 @@ namespace WebWindowComplex
|
||||
CreateElementTable(item, row, col, maxRow, maxCol);
|
||||
}
|
||||
}
|
||||
if(maxCol> m_maxCol)
|
||||
if (maxCol > m_maxCol)
|
||||
{
|
||||
m_maxCol = maxCol;
|
||||
}
|
||||
@@ -477,13 +566,19 @@ namespace WebWindowComplex
|
||||
m_maxRow = maxRow;
|
||||
}
|
||||
}
|
||||
|
||||
private string fillTable(int row, int col)
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per riempire tabella con contenuto vuoto o con i simboli per rappresentare la struttura
|
||||
/// </summary>
|
||||
/// <param name="row"> riga della cella </param>
|
||||
/// <param name="col"> colonna della cella </param>
|
||||
/// <returns></returns>
|
||||
private string FillTable(int row, int col)
|
||||
{
|
||||
List<ItemTable> itemSameCol = new List<ItemTable>();
|
||||
for(int k = 0; k < row; k++)
|
||||
for (int k = 0; k < row; k++)
|
||||
{
|
||||
if(ItemTableList[k].Col == col+1)
|
||||
if (ItemTableList[k].Col == col + 1)
|
||||
{
|
||||
itemSameCol.Add(ItemTableList[k]);
|
||||
}
|
||||
@@ -509,10 +604,10 @@ namespace WebWindowComplex
|
||||
if (itemSameCol.Count > 0)
|
||||
{
|
||||
// Sono alla riga successiva di un elemento e nella stessa colonna
|
||||
if(itemSameCol.Last().Row == row)
|
||||
if (itemSameCol.Last().Row == row)
|
||||
{
|
||||
// se ha un solo figlio
|
||||
if(itemSameCol.Last().NumChild == 1)
|
||||
if (itemSameCol.Last().NumChild == 1)
|
||||
{
|
||||
return "└";
|
||||
}
|
||||
@@ -525,11 +620,11 @@ namespace WebWindowComplex
|
||||
return "├";
|
||||
}
|
||||
}
|
||||
// Non solo alla riga successiva
|
||||
// Non sono alla riga successiva
|
||||
else
|
||||
{
|
||||
// se ha un solo figlio
|
||||
if(itemSameCol.Last().NumChild == 1)
|
||||
if (itemSameCol.Last().NumChild == 1)
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
@@ -560,30 +655,22 @@ namespace WebWindowComplex
|
||||
/// <summary>
|
||||
/// Metodo per settare tutti i Joints di Frame o Sash come ANGLED o FULL_H o FULL_V
|
||||
/// </summary>
|
||||
/// <param name="n_type"> tipo di giunzione (ANGLED o FULL_H o FULL_V)</param>
|
||||
/// <param name="n_place"> oggetto a cui essere applicato (Frame o Sash)</param>
|
||||
/// <param name="n_type"> tipo di giunzione (ANGLED o FULL_H o FULL_V) </param>
|
||||
/// <param name="area"> area su cui eseguire la funzione (Frame o Sash) </param>
|
||||
/// <returns></returns>
|
||||
private async Task AllJointsFrame(int n_type, int n_place)
|
||||
private async Task ChangeAllJoints(WindowConst.Joints type, Area area)
|
||||
{
|
||||
Joints type = Joints.ANGLED;
|
||||
if (n_type == 2)
|
||||
{
|
||||
type = Joints.FULL_H;
|
||||
}
|
||||
else if (n_type == 3)
|
||||
{
|
||||
type = Joints.FULL_V;
|
||||
}
|
||||
if (n_place == 0)
|
||||
if (area is Frame)
|
||||
{
|
||||
foreach (Joint joint in FrameWindow.JointList)
|
||||
{
|
||||
joint.SetSelJointType(type);
|
||||
}
|
||||
}
|
||||
else if (n_place == 1)
|
||||
else
|
||||
{
|
||||
foreach (Joint joint in m_SashList[0].JointList)
|
||||
Sash a = (Sash)area;
|
||||
foreach (Joint joint in a.JointList)
|
||||
{
|
||||
joint.SetSelJointType(type);
|
||||
}
|
||||
@@ -592,17 +679,12 @@ namespace WebWindowComplex
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per settare tutti i Joints di Frame o Sash come ANGLED o FULL_H o FULL_V
|
||||
/// Metodo per settare tutti i Fill in contemporanea
|
||||
/// </summary>
|
||||
/// <param name="n_type"> tipo di riempimento (GLASS o WOOD)</param>
|
||||
/// <param name="type"> tipo di riempimento (GLASS o WOOD) </param>
|
||||
/// <returns></returns>
|
||||
private async Task AllFill(int n_type)
|
||||
private async Task ChangeAllFill(WindowConst.FillTypes type)
|
||||
{
|
||||
FillTypes type = FillTypes.GLASS;
|
||||
if (n_type == 2)
|
||||
{
|
||||
type = FillTypes.WOOD;
|
||||
}
|
||||
foreach (Fill currFill in m_FillList)
|
||||
{
|
||||
currFill.SetFillType(type);
|
||||
@@ -613,23 +695,29 @@ namespace WebWindowComplex
|
||||
/// <summary>
|
||||
/// Metodo per copiare contenuto di un'anta in un'altra anta
|
||||
/// </summary>
|
||||
/// <param name="sashItem">Sash dove si torva anta </param>
|
||||
/// <param name="IndexCopy">Indice dell'anta che si copia</param>
|
||||
/// <param name="IndexModify">Indice dell'anta che si modifica</param>
|
||||
private async Task CopyContent(Sash sashItem, int IndexCopy, int IndexModify)
|
||||
/// <param name="sashItem"> Sash corrispondente all'anta </param>
|
||||
/// <param name="IndexCopy"> Indice dell'anta che si copia </param>
|
||||
/// <param name="IndexModify"> Indice dell'anta che si modifica </param>
|
||||
private async Task CopyContentSash(Sash sashItem, int IndexCopy, int IndexModify)
|
||||
{
|
||||
// Anta selezionata
|
||||
Area sashSplitted = sashItem.AreaList[IndexModify];
|
||||
// Rimuovo riempimento da anta selezionata
|
||||
sashSplitted.AreaList.RemoveAt(0);
|
||||
// Creo la copia dell'anta scelta
|
||||
Area a = sashItem.AreaList[IndexCopy-1].AreaList[0].Copy(sashSplitted);
|
||||
Area a = sashItem.AreaList[IndexCopy - 1].AreaList[0].Copy(sashSplitted);
|
||||
// Aggiungo copia all'anta selezionata
|
||||
sashItem.AreaList[IndexModify].AreaList.Add(a);
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
private async Task CopySplitted(Splitted currSplitted, int numSash)
|
||||
/// <summary>
|
||||
/// Metodo per copiare una Sash intera
|
||||
/// </summary>
|
||||
/// <param name="currSplitted"> Area Splitted corrente </param>
|
||||
/// <param name="numSash"> Indice della Sash che si vuole copiare </param>
|
||||
/// <returns></returns>
|
||||
private async Task CopySash(Splitted currSplitted, int numSash)
|
||||
{
|
||||
//Rimuovo contenuto di Splitted
|
||||
currSplitted.AreaList.RemoveAll(i => i != null);
|
||||
@@ -641,6 +729,11 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per scambiare due aree di uno split
|
||||
/// </summary>
|
||||
/// <param name="currArea"> Area corrente </param>
|
||||
/// <returns></returns>
|
||||
private async Task SwapTwoAree(Area currArea)
|
||||
{
|
||||
currArea.SwapAree();
|
||||
@@ -651,26 +744,14 @@ namespace WebWindowComplex
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private CompileStep currStep = CompileStep.Template;
|
||||
|
||||
private CompileStep currStep;
|
||||
private int currSash = -1;
|
||||
|
||||
private ColorWindow currColorWin = ColorWindow.Bianco;
|
||||
|
||||
private Frame m_Frame;
|
||||
|
||||
private Frame? m_Frame;
|
||||
private List<Sash> m_SashList = new List<Sash>();
|
||||
|
||||
private List<Split> m_SplitList = new List<Split>();
|
||||
|
||||
private List<Fill> m_FillList = new List<Fill>();
|
||||
|
||||
private List<Splitted> m_SplittedList = new List<Splitted>();
|
||||
|
||||
private List<ItemTable> m_ItemTableList = new List<ItemTable>();
|
||||
|
||||
private List<SplitParent> m_SplitParentList = new List<SplitParent>();
|
||||
|
||||
private int m_maxCol = 0;
|
||||
private int m_maxRow = 0;
|
||||
|
||||
@@ -679,11 +760,8 @@ namespace WebWindowComplex
|
||||
#region Private Properties
|
||||
|
||||
private Window? m_CurrWindow { get; set; } = null;
|
||||
|
||||
private Window? m_PreviousWindow { get; set; } = null;
|
||||
|
||||
private Template m_SelTemplate { get; set; } = null!;
|
||||
|
||||
private string m_SelFamilyHardware { get; set; } = "";
|
||||
|
||||
#endregion Private Properties
|
||||
@@ -693,55 +771,40 @@ namespace WebWindowComplex
|
||||
/// <summary>
|
||||
/// Metodo per andare allo step successivo
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo</param>
|
||||
/// <param name="newStep"> step successivo </param>
|
||||
private void AdvStep(CompileStep newStep)
|
||||
{
|
||||
currStep = newStep;
|
||||
currSash = -1;
|
||||
}
|
||||
|
||||
|
||||
private void ChangeColorWindow(ColorWindow newColorWin)
|
||||
{
|
||||
currColorWin = newColorWin;
|
||||
}
|
||||
|
||||
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
|
||||
{
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.EngineQueryType.Preview}");
|
||||
Args.Add("Jwd", e.sJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola il css del tab selezionato
|
||||
/// </summary>
|
||||
/// <param name="testStep"></param>
|
||||
/// <param name="testStep"> Step </param>
|
||||
/// <returns></returns>
|
||||
private string tabNavCss(CompileStep testStep, int Index = -1)
|
||||
{
|
||||
if (testStep == CompileStep.Sash)
|
||||
{
|
||||
if ((currSash == 0 && Index == 0) || (currSash == 1 && Index == 1))
|
||||
{
|
||||
return "nav-link active fw-bold";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "nav-link text-secondary";
|
||||
}
|
||||
}
|
||||
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
}
|
||||
|
||||
private string buttonCss(ColorWindow testColor)
|
||||
{
|
||||
return testColor.Equals(currColorWin) ? "btn btn-outline-secondary active" : "btn btn-outline-secondary";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna da mostrare
|
||||
/// Calcola larghezza colonna contenente nav da mostrare
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string mainCss()
|
||||
@@ -749,6 +812,24 @@ namespace WebWindowComplex
|
||||
return (currStep == CompileStep.Template) ? "col-12" : "col-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna header nav
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string headerCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-10 d-grid gap-1 px-2 d-md-flex justify-content-md-start" : "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna button nav
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string buttonCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-2 d-grid gap-1 d-md-flex justify-content-md-end" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end";
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep a {
|
||||
color: #000000;
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.9.1615</Version>
|
||||
<Version>2.7.9.2909</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -42,3 +42,34 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+146
-81
@@ -6,8 +6,8 @@ using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Xml.Serialization;
|
||||
using WebWindow.Base;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.ParametriOpzioni;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex
|
||||
@@ -17,7 +17,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
public event EventHandler<OnPreviewEventArgs> OnPreview = delegate { };
|
||||
|
||||
private String m_sProfilePath;
|
||||
private string m_sProfilePath;
|
||||
public string sProfilePath
|
||||
{
|
||||
get
|
||||
@@ -30,6 +30,48 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sMaterial;
|
||||
public string sMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sMaterial = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sColorMaterial;
|
||||
public string sColorMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sColorMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sColorMaterial = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sGlass;
|
||||
public string sGlass
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sGlass;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sGlass = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<Frame> m_AreaList = new ObservableCollection<Frame>();
|
||||
public ObservableCollection<Frame> AreaList
|
||||
{
|
||||
@@ -45,7 +87,7 @@ namespace WebWindowComplex
|
||||
|
||||
internal JsonWindow Serialize()
|
||||
{
|
||||
JsonWindow JsonWindow = new JsonWindow(sProfilePath);
|
||||
JsonWindow JsonWindow = new JsonWindow(sProfilePath, sMaterial, sColorMaterial, sGlass);
|
||||
foreach (var Area in AreaList)
|
||||
JsonWindow.AreaList.Add(Area.Serialize());
|
||||
return JsonWindow;
|
||||
@@ -202,7 +244,7 @@ namespace WebWindowComplex
|
||||
Sash SashArea = Sash.CreateSash(ParentArea);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SashArea);
|
||||
if(SashArea.nSashQty == 1)
|
||||
if (SashArea.nSashQty == 1)
|
||||
{
|
||||
// Inserisco il riempimento precedente
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
@@ -227,7 +269,7 @@ namespace WebWindowComplex
|
||||
public void SwapAree()
|
||||
{
|
||||
Area tempArea;
|
||||
if(this is Sash || this is Split)
|
||||
if (this is Sash || this is Split)
|
||||
{
|
||||
tempArea = AreaList[0];
|
||||
AreaList[0] = AreaList[1];
|
||||
@@ -630,7 +672,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
else if (value < m_SashList.Count)
|
||||
{
|
||||
if(value > 0)
|
||||
if (value > 0)
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SashList.Count - 1; SplitIndex >= value; SplitIndex += -1)
|
||||
@@ -646,7 +688,7 @@ namespace WebWindowComplex
|
||||
SashList.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
if(m_SashList.Count == 0)
|
||||
if (m_SashList.Count == 0)
|
||||
{
|
||||
Area child = AreaList[0];
|
||||
// Se nella singola anta ho uno split
|
||||
@@ -687,7 +729,7 @@ namespace WebWindowComplex
|
||||
else
|
||||
{
|
||||
// Se aggiungo ante
|
||||
if(SashList.Count > AreaList.Count)
|
||||
if (SashList.Count > AreaList.Count)
|
||||
{
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
// Salvo in ContentArea il sottoalbero delle singole aree che mantengo
|
||||
@@ -842,7 +884,7 @@ namespace WebWindowComplex
|
||||
set
|
||||
{
|
||||
m_SelOrientationSashType = (OrientationSash)IdNameStruct.IdFromInd(value, m_OrientationSashTypeList);
|
||||
if(value == 0)
|
||||
if (value == 0)
|
||||
{
|
||||
m_bIsSashVertical = true;
|
||||
}
|
||||
@@ -966,7 +1008,7 @@ namespace WebWindowComplex
|
||||
set
|
||||
{
|
||||
// Controllo che il valore inserito sia positivo
|
||||
if(value >= 0)
|
||||
if (value >= 0)
|
||||
{
|
||||
m_nSashBottomRailQty = value;
|
||||
if (m_nSashBottomRailQty > 0)
|
||||
@@ -1093,9 +1135,9 @@ namespace WebWindowComplex
|
||||
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId);
|
||||
if (m_SelHardware != null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId) ?? new Hardware("", "", "", "", "", 0, 0);
|
||||
if (m_SelHardware == null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
}
|
||||
|
||||
public int SelHardwareTypeIndex
|
||||
@@ -1126,8 +1168,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<AGBOption> m_HwdOptionList = new ObservableCollection<AGBOption>();
|
||||
public ObservableCollection<AGBOption> HwdOptionList
|
||||
private ObservableCollection<ParametriOpzioni> m_HwdOptionList = new ObservableCollection<ParametriOpzioni>();
|
||||
public ObservableCollection<ParametriOpzioni> HwdOptionList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1215,9 +1257,9 @@ namespace WebWindowComplex
|
||||
|
||||
private string ConvertOpeningType()
|
||||
{
|
||||
if(m_SashList.Count > 1)
|
||||
if (m_SashList.Count > 1)
|
||||
{
|
||||
for(int i = 0; i < m_SashList.Count; i++)
|
||||
for (int i = 0; i < m_SashList.Count; i++)
|
||||
{
|
||||
if (m_SashList[i].bHasHandle)
|
||||
{
|
||||
@@ -1226,11 +1268,11 @@ namespace WebWindowComplex
|
||||
else
|
||||
return "ANTA_RIBALTA";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return "ANTA_BANDIERA";
|
||||
return "";
|
||||
}
|
||||
else
|
||||
else if (m_SashList.Count > 0)
|
||||
{
|
||||
switch (GetOpeningType(m_SashList[0].OpeningType))
|
||||
{
|
||||
@@ -1266,6 +1308,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public void RefreshHardwareList()
|
||||
@@ -1283,34 +1326,34 @@ namespace WebWindowComplex
|
||||
m_HwdOptionList.Clear();
|
||||
}
|
||||
|
||||
//internal OpeningSides GetOpeningSide(Openings OpeningType)
|
||||
//{
|
||||
// switch (OpeningType)
|
||||
// {
|
||||
// case Openings.TURNONLY_LEFT:
|
||||
// case Openings.TILTTURN_LEFT:
|
||||
// case Openings.TILTONLY_TOP:
|
||||
// case Openings.COMPLANARSLIDE_LEFT:
|
||||
// case Openings.LIFTSLIDE_LEFT:
|
||||
// {
|
||||
// return OpeningSides.LEFT;
|
||||
// }
|
||||
internal OpeningSides GetOpeningSide(Openings OpeningType)
|
||||
{
|
||||
switch (OpeningType)
|
||||
{
|
||||
case Openings.TURNONLY_LEFT:
|
||||
case Openings.TILTTURN_LEFT:
|
||||
case Openings.TILTONLY_TOP:
|
||||
case Openings.COMPLANARSLIDE_LEFT:
|
||||
case Openings.LIFTSLIDE_LEFT:
|
||||
{
|
||||
return OpeningSides.LEFT;
|
||||
}
|
||||
|
||||
// case Openings.TURNONLY_RIGHT:
|
||||
// case Openings.TILTTURN_RIGHT:
|
||||
// case Openings.TILTONLY_BOTTOM:
|
||||
// case Openings.COMPLANARSLIDE_RIGHT:
|
||||
// case Openings.LIFTSLIDE_RIGHT:
|
||||
// {
|
||||
// return OpeningSides.RIGHT;
|
||||
// }
|
||||
case Openings.TURNONLY_RIGHT:
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
case Openings.TILTONLY_BOTTOM:
|
||||
case Openings.COMPLANARSLIDE_RIGHT:
|
||||
case Openings.LIFTSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningSides.RIGHT;
|
||||
}
|
||||
|
||||
// default:
|
||||
// {
|
||||
// return OpeningSides.NULL;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
default:
|
||||
{
|
||||
return OpeningSides.NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Sash Copy(Area newParentArea)
|
||||
{
|
||||
@@ -1324,12 +1367,12 @@ namespace WebWindowComplex
|
||||
newSash.RefreshHardwareList();
|
||||
newSash.RefreshHardwareOptionList();
|
||||
newSash.SetSelHardware(SelHardware);
|
||||
for (int i = 0; i <SashList.Count; i++)
|
||||
for (int i = 0; i < SashList.Count; i++)
|
||||
{
|
||||
//Cancello SashDimension di default e aggiungo la copia
|
||||
newSash.SashList.RemoveAt(i);
|
||||
SashDimension newSashDim = SashList[i].Copy();
|
||||
newSash.SashList.Insert(i,newSashDim);
|
||||
newSash.SashList.Insert(i, newSashDim);
|
||||
}
|
||||
foreach (var item in JointList)
|
||||
{
|
||||
@@ -1385,7 +1428,7 @@ namespace WebWindowComplex
|
||||
for (var SplitIndex = m_SplitPositionList.Count; SplitIndex <= value; SplitIndex++)
|
||||
SplitPositionList.Add(new SplitDimension(dNewDimension, true, this));
|
||||
}
|
||||
else if(value == 0)
|
||||
else if (value == 0)
|
||||
{
|
||||
SplitPositionList.RemoveAt(1);
|
||||
SplitPositionList.RemoveAt(0);
|
||||
@@ -1424,7 +1467,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s.AreaList[0]);
|
||||
ParentArea.AreaList.Add(s);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
@@ -1537,7 +1580,7 @@ namespace WebWindowComplex
|
||||
newSplit.SetSplitQty(nSplitQty);
|
||||
newSplit.SetSplitShape(SelSplitShape, true);
|
||||
newSplit.SetAreaType(AreaType);
|
||||
foreach(var item in AreaList)
|
||||
foreach (var item in AreaList)
|
||||
{
|
||||
Area a = item.Copy(newSplit);
|
||||
newSplit.AreaList.Add(a);
|
||||
@@ -1736,7 +1779,7 @@ namespace WebWindowComplex
|
||||
|
||||
public Joint Copy()
|
||||
{
|
||||
Joint newJoint = new Joint(ParentArea,nIndex, SelJointType);
|
||||
Joint newJoint = new Joint(ParentArea, nIndex, SelJointType);
|
||||
return newJoint;
|
||||
}
|
||||
|
||||
@@ -1754,7 +1797,6 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
public class Hardware
|
||||
{
|
||||
private string m_sId;
|
||||
@@ -1830,10 +1872,9 @@ namespace WebWindowComplex
|
||||
m_nSashQty = nSashQty;
|
||||
m_nSashPosition = nSashPosition;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class AGBOption
|
||||
public partial class ParametriOpzioni
|
||||
{
|
||||
public enum HDWOPTIONTYPES : int
|
||||
{
|
||||
@@ -1842,7 +1883,7 @@ namespace WebWindowComplex
|
||||
COMBO = 3
|
||||
}
|
||||
|
||||
private HDWOPTIONTYPES m_Type;
|
||||
protected HDWOPTIONTYPES m_Type;
|
||||
public HDWOPTIONTYPES Type
|
||||
{
|
||||
get
|
||||
@@ -1869,6 +1910,25 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private Visibility m_OptVisibility;
|
||||
public Visibility OptVisibility
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OptVisibility;
|
||||
}
|
||||
}
|
||||
|
||||
public ParametriOpzioni(ParametriOpzioniParametri HdwOptionParam)
|
||||
{
|
||||
m_sName = HdwOptionParam.NomeParametro;
|
||||
m_sDescription = HdwOptionParam.DescrizioneParametro;
|
||||
m_OptVisibility = Visibility.VISIBLE; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
|
||||
}
|
||||
}
|
||||
|
||||
public class AGBOptionCombo : ParametriOpzioni
|
||||
{
|
||||
private List<AGBOptionParameter> m_ValueList = new List<AGBOptionParameter>();
|
||||
public List<AGBOptionParameter> ValueList
|
||||
{
|
||||
@@ -1891,30 +1951,13 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private Visibility m_OptVisibility;
|
||||
public Visibility OptVisibility
|
||||
public AGBOptionCombo(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OptVisibility;
|
||||
}
|
||||
m_Type = HDWOPTIONTYPES.COMBO;
|
||||
foreach (var Value in HdwOptionParam.Opzioni)
|
||||
m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
|
||||
m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente) ?? new AGBOptionParameter("", "");
|
||||
}
|
||||
|
||||
//public AGBOption(ParametriOpzioniParametri HdwOptionParam)
|
||||
//{
|
||||
// if (HdwOptionParam.Opzioni.Count > 0)
|
||||
// {
|
||||
// m_Type = HDWOPTIONTYPES.COMBO;
|
||||
// foreach (var Value in HdwOptionParam.Opzioni)
|
||||
// m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
|
||||
// }
|
||||
// else
|
||||
// m_Type = HDWOPTIONTYPES.TEXT;
|
||||
// m_sName = HdwOptionParam.NomeParametro;
|
||||
// m_sDescription = HdwOptionParam.DescrizioneParametro;
|
||||
// m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente);
|
||||
// m_OptVisibility = Visibility.Visible; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
|
||||
//}
|
||||
}
|
||||
|
||||
public class AGBOptionParameter
|
||||
@@ -1944,6 +1987,28 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public class AGBOptionText : ParametriOpzioni
|
||||
{
|
||||
private string m_sValue;
|
||||
public string sValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
public AGBOptionText(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
|
||||
{
|
||||
m_Type = HDWOPTIONTYPES.TEXT;
|
||||
m_sValue = HdwOptionParam.ValoreCorrente;
|
||||
}
|
||||
}
|
||||
|
||||
public class FrameDimension
|
||||
{
|
||||
// valore massimo e minimo della dimensione del frame
|
||||
@@ -2386,8 +2451,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
m_dDimension = value;
|
||||
m_Parent.ParentWindow.OnUpdatePreview(m_Parent.ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
internal void SetDimension(double dValue)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.9.1615</Version>
|
||||
<Version>2.7.9.2909</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -53,3 +53,65 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,48 @@ namespace WebWindowTest.Json
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sMaterial;
|
||||
[JsonProperty]
|
||||
public string Material
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sMaterial = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sColorMaterial;
|
||||
[JsonProperty]
|
||||
public string ColorMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sColorMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sColorMaterial = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sGlass;
|
||||
[JsonProperty]
|
||||
public string Glass
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sGlass;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sGlass = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonArea> m_AreaList = new List<JsonArea>();
|
||||
[JsonProperty]
|
||||
public List<JsonArea> AreaList
|
||||
@@ -38,14 +80,20 @@ namespace WebWindowTest.Json
|
||||
}
|
||||
}
|
||||
|
||||
public JsonWindow(string ProfilePath)
|
||||
public JsonWindow(string ProfilePath, string Material, string ColorMaterial, string Glass)
|
||||
{
|
||||
m_sProfilePath = ProfilePath;
|
||||
m_sMaterial = Material;
|
||||
m_sColorMaterial = ColorMaterial;
|
||||
m_sGlass = Glass;
|
||||
}
|
||||
|
||||
internal Window Deserialize()
|
||||
{
|
||||
Window Window = new Window() { sProfilePath = m_sProfilePath };
|
||||
Window Window = new Window() { sProfilePath = m_sProfilePath,
|
||||
sMaterial = m_sMaterial,
|
||||
sColorMaterial = m_sColorMaterial,
|
||||
sGlass = m_sGlass};
|
||||
foreach (var Area in AreaList)
|
||||
Window.AreaList.Add((Frame)Area.Deserialize(null,Window));
|
||||
return Window;
|
||||
@@ -54,8 +102,21 @@ namespace WebWindowTest.Json
|
||||
|
||||
public class JsonArea
|
||||
{
|
||||
private List<JsonArea> m_AreaList = new List<JsonArea>();
|
||||
private int m_nIdGroup;
|
||||
[JsonProperty]
|
||||
public int IdGroup
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nIdGroup;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nIdGroup = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonArea> m_AreaList = new List<JsonArea>();
|
||||
[JsonProperty]
|
||||
public List<JsonArea> AreaList
|
||||
{
|
||||
@@ -168,16 +229,18 @@ namespace WebWindowTest.Json
|
||||
{
|
||||
}
|
||||
|
||||
public JsonFrame(Shapes Shape, bool BottomRail, int BottomRailQty) : base(AreaTypes.FRAME)
|
||||
public JsonFrame(Shapes Shape, bool BottomRail, int BottomRailQty, int nIdGroup) : base(AreaTypes.FRAME)
|
||||
{
|
||||
m_Shape = Shape;
|
||||
m_bBottomRail = BottomRail;
|
||||
m_nBottomRailQty = BottomRailQty;
|
||||
IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Frame newFrame = new Frame(null, ParentWindow);
|
||||
newFrame.SetIdGroup(IdGroup);
|
||||
newFrame.SetAreaType(AreaTypes.FRAME);
|
||||
newFrame.SetSelShape(m_Shape);
|
||||
newFrame.SetBottomRail(m_bBottomRail);
|
||||
@@ -200,7 +263,7 @@ namespace WebWindowTest.Json
|
||||
}
|
||||
|
||||
public class JsonSash : JsonArea
|
||||
{
|
||||
{
|
||||
private bool m_bIsSashVertical;
|
||||
[JsonProperty]
|
||||
public bool bIsSashVertical
|
||||
@@ -304,18 +367,20 @@ namespace WebWindowTest.Json
|
||||
{
|
||||
}
|
||||
|
||||
public JsonSash(bool bIsSashVertical, SashTypes SashType, bool SashBottomRail, int SashBottomRailQty, string Hardware) : base(AreaTypes.SASH)
|
||||
public JsonSash(bool bIsSashVertical, SashTypes SashType, bool SashBottomRail, int SashBottomRailQty, string Hardware, int nIdGroup) : base(AreaTypes.SASH)
|
||||
{
|
||||
m_bIsSashVertical = bIsSashVertical;
|
||||
m_SashType = SashType;
|
||||
m_bBottomRail = SashBottomRail;
|
||||
m_nBottomRailQty = SashBottomRailQty;
|
||||
m_Hardware = Hardware;
|
||||
IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Sash newSash = new Sash(ParentArea, ParentWindow);
|
||||
newSash.SetIdGroup(IdGroup);
|
||||
newSash.SetAreaType(AreaTypes.SASH);
|
||||
newSash.SetSashQty(m_SashList.Count);
|
||||
newSash.SetIsSashVertical(m_bIsSashVertical);
|
||||
@@ -360,17 +425,45 @@ namespace WebWindowTest.Json
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonSplitDimension> m_SplitPositionList = new List<JsonSplitDimension>();
|
||||
private bool m_SplitStartVert;
|
||||
[JsonProperty]
|
||||
public List<JsonSplitDimension> SplitPositionList
|
||||
public bool SplitStartVert
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitPositionList;
|
||||
return m_SplitStartVert;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitPositionList = value;
|
||||
m_SplitStartVert = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonSplitDimension> m_SplitVertList = new List<JsonSplitDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonSplitDimension> SplitVertList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitVertList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitVertList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonSplitDimension> m_SplitHorizList = new List<JsonSplitDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonSplitDimension> SplitHorizList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitHorizList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitHorizList = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,22 +471,42 @@ namespace WebWindowTest.Json
|
||||
{
|
||||
}
|
||||
|
||||
public JsonSplit(SplitShapes SplitShape) : base(AreaTypes.SPLIT)
|
||||
public JsonSplit(SplitShapes SplitShape, int nIdGroup) : base(AreaTypes.SPLIT)
|
||||
{
|
||||
m_SplitShape = SplitShape;
|
||||
IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Split Split = new Split(ParentArea, ParentWindow);
|
||||
Split.SetIdGroup(IdGroup);
|
||||
Split.SetAreaType(AreaTypes.SPLIT);
|
||||
Split.SetSplitShape(m_SplitShape, true);
|
||||
Split.SetSplitQty(m_SplitPositionList.Count - 1, true);
|
||||
//Split.AppliedDone();
|
||||
for (var SplitIndex = 0; SplitIndex <= m_SplitPositionList.Count - 1; SplitIndex++)
|
||||
Split.SetSplitStartVert(m_SplitStartVert);
|
||||
if(m_SplitVertList.Count == 0)
|
||||
Split.SetSplitQtyVert(0, true);
|
||||
else
|
||||
{
|
||||
Split.SplitPositionList[SplitIndex].SetIsRelative(m_SplitPositionList[SplitIndex].bIsRelative);
|
||||
Split.SplitPositionList[SplitIndex].SetDimension(m_SplitPositionList[SplitIndex].dDimension);
|
||||
//Split.SplitVertList.Clear();
|
||||
Split.SetSplitQtyVert(m_SplitVertList.Count - 1, true);
|
||||
for (var SplitIndex = 0; SplitIndex <= m_SplitVertList.Count - 1; SplitIndex++)
|
||||
{
|
||||
Split.SplitVertList[SplitIndex].SetIsRelative(m_SplitVertList[SplitIndex].bIsRelative);
|
||||
Split.SplitVertList[SplitIndex].SetDimension(m_SplitVertList[SplitIndex].dDimension);
|
||||
}
|
||||
}
|
||||
if(m_SplitHorizList.Count == 0)
|
||||
Split.SetSplitQtyHoriz(0, true);
|
||||
else
|
||||
{
|
||||
//Split.SplitHorizList.Clear();
|
||||
Split.SetSplitQtyHoriz(m_SplitHorizList.Count - 1, true);
|
||||
for (var SplitIndex = 0; SplitIndex <= m_SplitHorizList.Count - 1; SplitIndex++)
|
||||
{
|
||||
Split.SplitHorizList[SplitIndex].SetIsRelative(m_SplitHorizList[SplitIndex].bIsRelative);
|
||||
Split.SplitHorizList[SplitIndex].SetDimension(m_SplitHorizList[SplitIndex].dDimension);
|
||||
}
|
||||
}
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
@@ -412,22 +525,27 @@ namespace WebWindowTest.Json
|
||||
public JsonSplitted() : base(AreaTypes.SPLITTED)
|
||||
{
|
||||
}
|
||||
public JsonSplitted(int nIdGroup) : base(AreaTypes.SPLITTED)
|
||||
{
|
||||
IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Splitted Split = new Splitted(ParentArea, ParentWindow);
|
||||
Split.SetAreaType(AreaTypes.SPLITTED);
|
||||
Splitted newSplitted = new Splitted(ParentArea, ParentWindow);
|
||||
newSplitted.SetIdGroup(IdGroup);
|
||||
newSplitted.SetAreaType(AreaTypes.SPLITTED);
|
||||
//Split.AppliedDone();
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(Split, ParentWindow);
|
||||
var AreaDeserealized = Area.Deserialize(newSplitted, ParentWindow);
|
||||
if (AreaDeserealized != null)
|
||||
{
|
||||
Split.AreaList.Add(AreaDeserealized);
|
||||
newSplitted.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
|
||||
return Split;
|
||||
return newSplitted;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,14 +570,16 @@ namespace WebWindowTest.Json
|
||||
{
|
||||
}
|
||||
|
||||
public JsonFill(FillTypes FillType) : base(AreaTypes.FILL)
|
||||
public JsonFill(FillTypes FillType, int nIdGroup) : base(AreaTypes.FILL)
|
||||
{
|
||||
m_FillType = FillType;
|
||||
IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Fill Fill = new Fill(ParentArea, ParentWindow);
|
||||
Fill.SetIdGroup(IdGroup);
|
||||
Fill.SetAreaType(AreaTypes.FILL);
|
||||
Fill.SetFillType(m_FillType);
|
||||
//Fill.AppliedDone();
|
||||
@@ -561,6 +681,16 @@ namespace WebWindowTest.Json
|
||||
|
||||
public class JsonSashDimension
|
||||
{
|
||||
private int m_nSashId;
|
||||
[JsonProperty]
|
||||
public int nSashId
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSashId;
|
||||
}
|
||||
}
|
||||
|
||||
private Openings m_OpeningType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
@@ -600,11 +730,12 @@ namespace WebWindowTest.Json
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSashDimension(Openings OpeningType, bool bHasHandle, double dDimension)
|
||||
public JsonSashDimension(Openings OpeningType, bool bHasHandle, double dDimension, int nSashId)
|
||||
{
|
||||
m_OpeningType = OpeningType;
|
||||
m_bHasHandle = bHasHandle;
|
||||
m_dDimension = dDimension;
|
||||
m_nSashId = nSashId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowTest
|
||||
{
|
||||
public partial class ParametriOpzioni
|
||||
{
|
||||
private ParametriOpzioniParametri[] itemsField;
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute("Parametri", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public ParametriOpzioniParametri[] Items
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.itemsField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.itemsField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ParametriOpzioniParametri
|
||||
{
|
||||
private string nomeParametroField;
|
||||
|
||||
private string descrizioneParametroField;
|
||||
|
||||
private string valoreCorrenteField;
|
||||
|
||||
private string tipoField;
|
||||
|
||||
private string visibleField;
|
||||
|
||||
private string ricalcolaSeModificatoField;
|
||||
|
||||
private ParametriOpzioniParametriOpzioni[] opzioniField;
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string NomeParametro
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nomeParametroField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nomeParametroField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string DescrizioneParametro
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.descrizioneParametroField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.descrizioneParametroField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string ValoreCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.valoreCorrenteField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.valoreCorrenteField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Tipo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tipoField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.tipoField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Visible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.visibleField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.visibleField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string RicalcolaSeModificato
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ricalcolaSeModificatoField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ricalcolaSeModificatoField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute("Opzioni", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public ParametriOpzioniParametriOpzioni[] Opzioni
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.opzioniField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.opzioniField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ParametriOpzioniParametriOpzioni
|
||||
{
|
||||
private string nomeParametroField;
|
||||
|
||||
private string descrizioneOpzioneField;
|
||||
|
||||
private string valoreField;
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string NomeParametro
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nomeParametroField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nomeParametroField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string DescrizioneOpzione
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.descrizioneOpzioneField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.descrizioneOpzioneField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
|
||||
public string Valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.valoreField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.valoreField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+454
-436
File diff suppressed because it is too large
Load Diff
+271
-196
@@ -1,9 +1,12 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using System.Runtime.InteropServices;
|
||||
using WebWindow.Base;
|
||||
using WebWindowTest.DTO;
|
||||
using WebWindowTest.Json;
|
||||
using static WebWindowTest.Json.WindowConst;
|
||||
@@ -32,22 +35,21 @@ namespace WebWindowTest
|
||||
get => m_CurrJwd;
|
||||
set
|
||||
{
|
||||
// Se viene passato un JWD
|
||||
if (m_CurrJwd != value && value != "")
|
||||
{
|
||||
m_CurrJwd = value;
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
m_CurrWindow = null;
|
||||
}
|
||||
Sash.m_HardwareCompleteList = IN_HardwareList;
|
||||
Sash.s_FamilyHardwareList = IN_FamilyHardwareList;
|
||||
Sash.s_SelFamilyHW = IN_SelFamilyHardware;
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
// recupero dimensioni Frame e Joint Frame della finestra precedente
|
||||
// Recupero dimensioni Frame e Joint del frame della finestra precedente
|
||||
if (m_PreviousWindow != null)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -58,16 +60,8 @@ namespace WebWindowTest
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
//m_SplitParentList = new List<SplitParent>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
// Aggiornate liste di sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,23 +72,21 @@ namespace WebWindowTest
|
||||
get => m_SelTemplate;
|
||||
set
|
||||
{
|
||||
// Se non ho ancora selezionato template oppure se cambio template di selezione
|
||||
// Se viene passato il template selezionato oppure se non è ancora stato selezionato un template oppure se si cambia template di selezione
|
||||
if (value != null && (m_SelTemplate == null || (m_SelTemplate != null && value.nIndex != m_SelTemplate.nIndex)) && !string.IsNullOrEmpty(value.JWD))
|
||||
{
|
||||
m_SelTemplate = value;
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
// Aggiornamento parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
m_CurrWindow = null;
|
||||
}
|
||||
Sash.m_HardwareCompleteList = IN_HardwareList;
|
||||
Sash.s_FamilyHardwareList = IN_FamilyHardwareList;
|
||||
Sash.s_SelFamilyHW = IN_SelFamilyHardware;
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
// recupero dimensioni Frame e Joint Frame della finestra precedente
|
||||
// Recupero dimensioni Frame e Joint del frame della finestra precedente
|
||||
if (m_PreviousWindow != null)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -105,16 +97,8 @@ namespace WebWindowTest
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
//m_SplitParentList = new List<SplitParent>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
// Aggiornamento liste sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,10 +110,28 @@ namespace WebWindowTest
|
||||
public List<string> IN_FamilyHardwareList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string IN_SelFamilyHardware { get; set; } = null;
|
||||
public string IN_SelFamilyHardware { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<Hardware> IN_HardwareList { get; set; } = null;
|
||||
public List<Hardware> IN_HardwareList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_ColorMaterialList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelColorMaterial { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_MaterialList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelMaterial { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_GlassList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelGlass { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public string LiveSVG
|
||||
@@ -166,17 +168,7 @@ namespace WebWindowTest
|
||||
General
|
||||
}
|
||||
|
||||
protected enum ColorWindow
|
||||
{
|
||||
Bianco = 0,
|
||||
Grigio = 1,
|
||||
Tortora,
|
||||
Blu,
|
||||
Verde,
|
||||
Nero
|
||||
}
|
||||
|
||||
protected enum positionJoints
|
||||
protected enum PositionJoints
|
||||
{
|
||||
BL = 0, // Bottom Left
|
||||
BR = 1, // Bottom Right
|
||||
@@ -190,10 +182,10 @@ namespace WebWindowTest
|
||||
|
||||
protected Frame FrameWindow
|
||||
{
|
||||
get => m_Frame;
|
||||
get => m_Frame!;
|
||||
set => m_Frame = value;
|
||||
}
|
||||
protected string m_CurrJwd { get; set; }
|
||||
protected string? m_CurrJwd { get; set; }
|
||||
protected string m_SelSVG { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
@@ -225,17 +217,11 @@ namespace WebWindowTest
|
||||
{
|
||||
get => m_SplittedList;
|
||||
}
|
||||
//protected List<SplitParent> SplitParentList
|
||||
//{
|
||||
// get => m_SplitParentList;
|
||||
//}
|
||||
protected List<ItemTable> ItemTableList
|
||||
{
|
||||
get => m_ItemTableList;
|
||||
}
|
||||
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
protected string SelFamilyHardware
|
||||
{
|
||||
get
|
||||
@@ -258,6 +244,11 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
}
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
|
||||
protected string SelMaterial { get; set; } = ""!;
|
||||
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
@@ -277,27 +268,33 @@ namespace WebWindowTest
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per la scelta della maniglia univoca
|
||||
/// Metodo che resetta le liste (sash, split, splitted, fill e itemTable) e le crea nuovamente
|
||||
/// </summary>
|
||||
/// <param name="sashDim"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task changeHandle(SashDimension sashDim)
|
||||
protected void UpdateLists()
|
||||
{
|
||||
//if(m_SashList[0].AreaList.Count < 3)
|
||||
//{
|
||||
foreach (SashDimension item in SashList[0].SashList)
|
||||
{
|
||||
if (item.Equals(sashDim))
|
||||
{
|
||||
item.bHasHandle = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.bHasHandle = false;
|
||||
}
|
||||
}
|
||||
//}
|
||||
await Task.Delay(1);
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
CreateWindowsList((m_CurrWindow!).AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per settare i parmateri di ingresso selezionati
|
||||
/// </summary>
|
||||
protected void UpdateSelParameter()
|
||||
{
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
SelColorMaterial = IN_SelColorMaterial ?? "";
|
||||
SelMaterial = IN_SelMaterial ?? "";
|
||||
SelGlass = IN_SelGlass ?? "";
|
||||
Sash.m_HardwareCompleteList = IN_HardwareList;
|
||||
Sash.s_FamilyHardwareList = IN_FamilyHardwareList;
|
||||
Sash.s_SelFamilyHW = IN_SelFamilyHardware;
|
||||
}
|
||||
|
||||
// Ancora da fare...
|
||||
@@ -316,8 +313,8 @@ namespace WebWindowTest
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.EngineQueryType.Preview}");
|
||||
Args.Add("Jwd", CurrJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
await EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
}
|
||||
@@ -327,12 +324,14 @@ namespace WebWindowTest
|
||||
/// </summary>
|
||||
protected async Task DoReset()
|
||||
{
|
||||
SelFamilyHardware = IN_SelFamilyHardware;
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
Area.nCounterGroup = 0;
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson;
|
||||
if (string.IsNullOrEmpty(CurrJwd))
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
else
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd!, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
@@ -340,18 +339,10 @@ namespace WebWindowTest
|
||||
}
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
//m_SplitParentList = new List<SplitParent>();
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
m_maxCol = 0;
|
||||
m_maxRow = 0;
|
||||
// popolo le liste Fill, Sash e Split
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
// Aggiorante liste sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
currSash = -1;
|
||||
currStep = CompileStep.Gerarchia;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
@@ -362,31 +353,114 @@ namespace WebWindowTest
|
||||
await EC_OnClose.InvokeAsync(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per la scelta della maniglia univoca
|
||||
/// </summary>
|
||||
/// <param name="sashDim"> anta su cui si seleziona la maniglia </param>
|
||||
/// <returns></returns>
|
||||
protected void changeHandle(SashDimension sashDim, Sash currSash)
|
||||
{
|
||||
// Cerco la Sash che si sta considerando nella lista Sash
|
||||
foreach (Sash s in SashList)
|
||||
{
|
||||
if (s.Equals(currSash))
|
||||
{
|
||||
// Per ogni anta della Sash setto bHasHandle
|
||||
foreach (SashDimension item in s.SashList)
|
||||
{
|
||||
if (item.Equals(sashDim))
|
||||
{
|
||||
item.bHasHandle = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.bHasHandle)
|
||||
{
|
||||
switch (item.SelOpeningType)
|
||||
{
|
||||
case Openings.TILTTURN_LEFT:
|
||||
item.SetOpeningType(Openings.TURNONLY_LEFT);
|
||||
break;
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
item.SetOpeningType(Openings.TURNONLY_RIGHT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
item.bHasHandle = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per la scelta dello split intero nella modalità griglia
|
||||
/// </summary>
|
||||
/// <param name="currSplit"> split su cui si sceglie </param>
|
||||
/// <returns></returns>
|
||||
protected void changeStartVert(ChangeEventArgs e, Split currSplit)
|
||||
{
|
||||
// Cerco la Sash che si sta considerando nella lista Sash
|
||||
foreach (Split s in SplitList)
|
||||
{
|
||||
if (s.Equals(currSplit))
|
||||
{
|
||||
s.SetSplitStartVert((bool)e.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per determinare la descrizione del parent dello split corrente
|
||||
/// </summary>
|
||||
/// <param name="currSplit"> split corrente </param>
|
||||
/// <returns></returns>
|
||||
protected string descParentSplit(Split currSplit)
|
||||
{
|
||||
if((currSplit.ParentArea is Splitted || currSplit.ParentArea is Sash) && SashList.Count > 0)
|
||||
{
|
||||
for(int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
if(SashList[j].Equals(currSplit.ParentArea))
|
||||
{
|
||||
return "Sash " + (j + 1);
|
||||
}
|
||||
else if (SashList[j].Equals(currSplit.ParentArea.ParentArea))
|
||||
{
|
||||
for(int k = 0; k < SashList[j].AreaList.Count; k++)
|
||||
{
|
||||
if(SashList[j].AreaList[k].AreaList[0].Equals(currSplit))
|
||||
{
|
||||
return "Sash " + (j + 1) + " - anta " + (k + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Frame";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione del template
|
||||
/// </summary>
|
||||
/// <param name="newSel"> template selezionato</param>
|
||||
/// <param name="newSel"> template selezionato </param>
|
||||
protected async void DoSelect(TemplateSelectDTO newSel)
|
||||
{
|
||||
SelTemplateDTO = newSel;
|
||||
//DoSelectAndPreview(CompileStep.Frame);
|
||||
await EC_OnSelectedTemplate.InvokeAsync(newSel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare step e aggiornare preview svg
|
||||
/// Metodo per riempire le liste Sash, Split, Splitted e Fill
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo</param>
|
||||
protected async void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
{
|
||||
currStep = newStep;
|
||||
if (newStep == CompileStep.Sash)
|
||||
currSash = Index;
|
||||
else
|
||||
currSash = -1;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <param name="node"> Area da classificare </param>
|
||||
/// <param name="IntoSash"> Parametro per sapere se si è dentro un'anta </param>
|
||||
protected void CreateWindowsList(Area node, bool IntoSash)
|
||||
{
|
||||
if (node != null)
|
||||
@@ -431,6 +505,14 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per riempire la lista ItemTable in modo da poter rappresentarla come tabella
|
||||
/// </summary>
|
||||
/// <param name="node"> Area da classificare </param>
|
||||
/// <param name="row"> numero di riga </param>
|
||||
/// <param name="col"> numero di colonna </param>
|
||||
/// <param name="maxRow"> numero di riga massimo </param>
|
||||
/// <param name="maxCol"> numero di colonna massimo </param>
|
||||
protected void CreateElementTable(Area node, int row, int col, int maxRow, int maxCol)
|
||||
{
|
||||
if (node != null)
|
||||
@@ -439,7 +521,7 @@ namespace WebWindowTest
|
||||
{
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
if(node.AreaList.Count >= 1)
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, 0));
|
||||
@@ -455,12 +537,12 @@ namespace WebWindowTest
|
||||
if ((node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1) ||
|
||||
(node.ParentArea != null && node.ParentArea.AreaList.Count > 1))
|
||||
{
|
||||
for(int i = 0; i < SashList.Count; i++)
|
||||
for (int i = 0; i < SashList.Count; i++)
|
||||
{
|
||||
if (SashList[i].Equals(node))
|
||||
{
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if(node.AreaList.Count >= 1)
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, 0));
|
||||
@@ -484,7 +566,7 @@ namespace WebWindowTest
|
||||
}
|
||||
case AreaTypes.FILL:
|
||||
{
|
||||
if((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
|
||||
if ((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
|
||||
(node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1 && node.ParentArea.ParentArea.AreaList[0].AreaList[0].Equals(node)))
|
||||
maxCol++;
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL", maxRow, col, -1, 0));
|
||||
@@ -498,7 +580,7 @@ namespace WebWindowTest
|
||||
if (node.ParentArea.AreaList.Count > 1 || (node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1))
|
||||
{
|
||||
if (node.ParentArea.AreaList[0].Equals(node) || node.ParentArea.ParentArea.AreaList[0].Equals(node))
|
||||
maxCol ++;
|
||||
maxCol++;
|
||||
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, node.AreaList.Count));
|
||||
else
|
||||
@@ -530,7 +612,7 @@ namespace WebWindowTest
|
||||
CreateElementTable(item, row, col, maxRow, maxCol);
|
||||
}
|
||||
}
|
||||
if(maxCol> m_maxCol)
|
||||
if (maxCol > m_maxCol)
|
||||
{
|
||||
m_maxCol = maxCol;
|
||||
}
|
||||
@@ -539,13 +621,19 @@ namespace WebWindowTest
|
||||
m_maxRow = maxRow;
|
||||
}
|
||||
}
|
||||
|
||||
private string fillTable(int row, int col)
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per riempire tabella con contenuto vuoto o con i simboli per rappresentare la struttura
|
||||
/// </summary>
|
||||
/// <param name="row"> riga della cella </param>
|
||||
/// <param name="col"> colonna della cella </param>
|
||||
/// <returns></returns>
|
||||
private string FillTable(int row, int col)
|
||||
{
|
||||
List<ItemTable> itemSameCol = new List<ItemTable>();
|
||||
for(int k = 0; k < row; k++)
|
||||
for (int k = 0; k < row; k++)
|
||||
{
|
||||
if(ItemTableList[k].Col == col+1)
|
||||
if (ItemTableList[k].Col == col + 1)
|
||||
{
|
||||
itemSameCol.Add(ItemTableList[k]);
|
||||
}
|
||||
@@ -571,10 +659,10 @@ namespace WebWindowTest
|
||||
if (itemSameCol.Count > 0)
|
||||
{
|
||||
// Sono alla riga successiva di un elemento e nella stessa colonna
|
||||
if(itemSameCol.Last().Row == row)
|
||||
if (itemSameCol.Last().Row == row)
|
||||
{
|
||||
// se ha un solo figlio
|
||||
if(itemSameCol.Last().NumChild == 1)
|
||||
if (itemSameCol.Last().NumChild == 1)
|
||||
{
|
||||
return "└";
|
||||
}
|
||||
@@ -587,11 +675,11 @@ namespace WebWindowTest
|
||||
return "├";
|
||||
}
|
||||
}
|
||||
// Non solo alla riga successiva
|
||||
// Non sono alla riga successiva
|
||||
else
|
||||
{
|
||||
// se ha un solo figlio
|
||||
if(itemSameCol.Last().NumChild == 1)
|
||||
if (itemSameCol.Last().NumChild == 1)
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
@@ -622,21 +710,12 @@ namespace WebWindowTest
|
||||
/// <summary>
|
||||
/// Metodo per settare tutti i Joints di Frame o Sash come ANGLED o FULL_H o FULL_V
|
||||
/// </summary>
|
||||
/// <param name="n_type"> tipo di giunzione (ANGLED o FULL_H o FULL_V)</param>
|
||||
/// <param name="n_place"> oggetto a cui essere applicato (Frame o Sash)</param>
|
||||
/// <param name="n_type"> tipo di giunzione (ANGLED o FULL_H o FULL_V) </param>
|
||||
/// <param name="area"> area su cui eseguire la funzione (Frame o Sash) </param>
|
||||
/// <returns></returns>
|
||||
private async Task AllJointsFrame(int n_type, Area area)
|
||||
private async Task ChangeAllJoints(WindowConst.Joints type, Area area)
|
||||
{
|
||||
Joints type = Joints.ANGLED;
|
||||
if (n_type == 2)
|
||||
{
|
||||
type = Joints.FULL_H;
|
||||
}
|
||||
else if (n_type == 3)
|
||||
{
|
||||
type = Joints.FULL_V;
|
||||
}
|
||||
if(area is Frame)
|
||||
if (area is Frame)
|
||||
{
|
||||
foreach (Joint joint in FrameWindow.JointList)
|
||||
{
|
||||
@@ -645,41 +724,22 @@ namespace WebWindowTest
|
||||
}
|
||||
else
|
||||
{
|
||||
Sash s = (Sash)area;
|
||||
foreach (Joint joint in s.JointList)
|
||||
Sash a = (Sash)area;
|
||||
foreach (Joint joint in a.JointList)
|
||||
{
|
||||
joint.SetSelJointType(type);
|
||||
}
|
||||
}
|
||||
//if (n_place == 0)
|
||||
//{
|
||||
// foreach (Joint joint in FrameWindow.JointList)
|
||||
// {
|
||||
// joint.SetSelJointType(type);
|
||||
// }
|
||||
//}
|
||||
//else if (n_place == 1)
|
||||
//{
|
||||
// foreach (Joint joint in m_SashList[0].JointList)
|
||||
// {
|
||||
// joint.SetSelJointType(type);
|
||||
// }
|
||||
//}
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per settare tutti i Joints di Frame o Sash come ANGLED o FULL_H o FULL_V
|
||||
/// Metodo per settare tutti i Fill in contemporanea
|
||||
/// </summary>
|
||||
/// <param name="n_type"> tipo di riempimento (GLASS o WOOD)</param>
|
||||
/// <param name="type"> tipo di riempimento (GLASS o WOOD) </param>
|
||||
/// <returns></returns>
|
||||
private async Task AllFill(int n_type)
|
||||
private async Task ChangeAllFill(WindowConst.FillTypes type)
|
||||
{
|
||||
FillTypes type = FillTypes.GLASS;
|
||||
if (n_type == 2)
|
||||
{
|
||||
type = FillTypes.WOOD;
|
||||
}
|
||||
foreach (Fill currFill in m_FillList)
|
||||
{
|
||||
currFill.SetFillType(type);
|
||||
@@ -690,26 +750,33 @@ namespace WebWindowTest
|
||||
/// <summary>
|
||||
/// Metodo per copiare contenuto di un'anta in un'altra anta
|
||||
/// </summary>
|
||||
/// <param name="sashItem">Sash dove si torva anta </param>
|
||||
/// <param name="IndexCopy">Indice dell'anta che si copia</param>
|
||||
/// <param name="IndexModify">Indice dell'anta che si modifica</param>
|
||||
private async Task CopyContent(Sash sashItem, int IndexCopy, int IndexModify)
|
||||
/// <param name="sashItem"> Sash corrispondente all'anta </param>
|
||||
/// <param name="IndexCopy"> Indice dell'anta che si copia </param>
|
||||
/// <param name="IndexModify"> Indice dell'anta che si modifica </param>
|
||||
private async Task CopyContentSash(Sash sashItem, int IndexCopy, int IndexModify)
|
||||
{
|
||||
// Anta selezionata
|
||||
Area sashSplitted = sashItem.AreaList[IndexModify];
|
||||
// Rimuovo riempimento da anta selezionata
|
||||
sashSplitted.AreaList.RemoveAt(0);
|
||||
// Creo la copia dell'anta scelta
|
||||
Area a = sashItem.AreaList[IndexCopy-1].AreaList[0].Copy(sashSplitted);
|
||||
Area a = sashItem.AreaList[IndexCopy - 1].AreaList[0].Copy(sashSplitted);
|
||||
// Aggiungo copia all'anta selezionata
|
||||
sashItem.AreaList[IndexModify].AreaList.Add(a);
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
private async Task CopySplitted(Splitted currSplitted, int numSash)
|
||||
/// <summary>
|
||||
/// Metodo per copiare una Sash intera
|
||||
/// </summary>
|
||||
/// <param name="currSplitted"> Area Splitted corrente </param>
|
||||
/// <param name="numSash"> Indice della Sash che si vuole copiare </param>
|
||||
/// <returns></returns>
|
||||
private async Task CopySash(Splitted currSplitted, int numSash)
|
||||
{
|
||||
//Rimuovo contenuto di Splitted
|
||||
//Rimuovo contenuto di Splitted e rimuovo area da conteggio gruppi
|
||||
currSplitted.AreaList.RemoveAll(i => i != null);
|
||||
//Area.DelCounterGroup();
|
||||
// Copio sash
|
||||
Area a = SashList[numSash].Copy(currSplitted);
|
||||
a.SetParentArea(currSplitted);
|
||||
@@ -718,6 +785,11 @@ namespace WebWindowTest
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per scambiare due aree di uno split
|
||||
/// </summary>
|
||||
/// <param name="currArea"> Area corrente </param>
|
||||
/// <returns></returns>
|
||||
private async Task SwapTwoAree(Area currArea)
|
||||
{
|
||||
currArea.SwapAree();
|
||||
@@ -727,26 +799,15 @@ namespace WebWindowTest
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private CompileStep currStep;
|
||||
|
||||
private int currSash = -1;
|
||||
|
||||
private ColorWindow currColorWin = ColorWindow.Bianco;
|
||||
|
||||
private Frame m_Frame;
|
||||
|
||||
private Frame? m_Frame;
|
||||
private List<Sash> m_SashList = new List<Sash>();
|
||||
|
||||
private List<Split> m_SplitList = new List<Split>();
|
||||
|
||||
private List<Fill> m_FillList = new List<Fill>();
|
||||
|
||||
private List<Splitted> m_SplittedList = new List<Splitted>();
|
||||
|
||||
private List<ItemTable> m_ItemTableList = new List<ItemTable>();
|
||||
|
||||
//private List<SplitParent> m_SplitParentList = new List<SplitParent>();
|
||||
|
||||
private int m_maxCol = 0;
|
||||
private int m_maxRow = 0;
|
||||
|
||||
@@ -755,67 +816,63 @@ namespace WebWindowTest
|
||||
#region Private Properties
|
||||
|
||||
private Window? m_CurrWindow { get; set; } = null;
|
||||
|
||||
private Window? m_PreviousWindow { get; set; } = null;
|
||||
|
||||
private Template m_SelTemplate { get; set; } = null!;
|
||||
|
||||
private string m_SelFamilyHardware { get; set; } = "";
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare step e aggiornare preview svg
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo </param>
|
||||
private async void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
{
|
||||
currStep = newStep;
|
||||
if (newStep == CompileStep.Sash)
|
||||
currSash = Index;
|
||||
else
|
||||
currSash = -1;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per andare allo step successivo
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo</param>
|
||||
/// <param name="newStep"> step successivo </param>
|
||||
private void AdvStep(CompileStep newStep)
|
||||
{
|
||||
currStep = newStep;
|
||||
currSash = -1;
|
||||
}
|
||||
|
||||
|
||||
private void ChangeColorWindow(ColorWindow newColorWin)
|
||||
{
|
||||
currColorWin = newColorWin;
|
||||
}
|
||||
|
||||
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
|
||||
{
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.EngineQueryType.Preview}");
|
||||
Args.Add("Jwd", e.sJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola il css del tab selezionato
|
||||
/// </summary>
|
||||
/// <param name="testStep"></param>
|
||||
/// <param name="testStep"> Step </param>
|
||||
/// <returns></returns>
|
||||
private string tabNavCss(CompileStep testStep, int Index = -1)
|
||||
{
|
||||
if (testStep == CompileStep.Sash)
|
||||
{
|
||||
if ((currSash == 0 && Index == 0) || (currSash == 1 && Index == 1))
|
||||
{
|
||||
return "nav-link active fw-bold";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "nav-link text-secondary";
|
||||
}
|
||||
}
|
||||
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
}
|
||||
|
||||
private string buttonCss(ColorWindow testColor)
|
||||
{
|
||||
return testColor.Equals(currColorWin) ? "btn btn-outline-secondary active" : "btn btn-outline-secondary";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna contenente nav da mostrare
|
||||
/// </summary>
|
||||
@@ -825,13 +882,31 @@ namespace WebWindowTest
|
||||
return (currStep == CompileStep.Template) ? "col-12" : "col-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza border descrizione split
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string splitCss(Split currSplit)
|
||||
{
|
||||
return (currSplit.SelSplitShape == SplitShapes.GRID ) ? "col-sm-12" : "col-sm-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza border descrizione split
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string splitContentCss(Split currSplit)
|
||||
{
|
||||
return (currSplit.SelSplitShape == SplitShapes.GRID) ? "col-sm-6" : "col-sm-12";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna header nav
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string headerCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-10 d-grid gap-1 px-2 d-md-flex justify-content-md-start" : "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start";
|
||||
return (currStep == CompileStep.Template) ? "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start" : "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -840,7 +915,7 @@ namespace WebWindowTest
|
||||
/// <returns></returns>
|
||||
private string buttonCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-2 d-grid gap-1 d-md-flex justify-content-md-end" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end";
|
||||
return (currStep == CompileStep.Template) ? "col-4 d-grid gap-1 d-md-flex justify-content-md-end" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end";
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -18,4 +18,8 @@
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebWindow.Base\WebWindow.Base.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
+469
-152
@@ -5,9 +5,11 @@ using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using WebWindowTest.Json;
|
||||
using static WebWindowTest.Json.WindowConst;
|
||||
using static WebWindowTest.ParametriOpzioni;
|
||||
|
||||
namespace WebWindowTest
|
||||
{
|
||||
@@ -16,7 +18,7 @@ namespace WebWindowTest
|
||||
{
|
||||
public event EventHandler<OnPreviewEventArgs> OnPreview = delegate { };
|
||||
|
||||
private String m_sProfilePath;
|
||||
private string m_sProfilePath;
|
||||
public string sProfilePath
|
||||
{
|
||||
get
|
||||
@@ -29,6 +31,48 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sMaterial;
|
||||
public string sMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sMaterial = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sColorMaterial;
|
||||
public string sColorMaterial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sColorMaterial;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sColorMaterial = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sGlass;
|
||||
public string sGlass
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sGlass;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sGlass = value;
|
||||
OnUpdatePreview(sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<Frame> m_AreaList = new ObservableCollection<Frame>();
|
||||
public ObservableCollection<Frame> AreaList
|
||||
{
|
||||
@@ -44,7 +88,7 @@ namespace WebWindowTest
|
||||
|
||||
internal JsonWindow Serialize()
|
||||
{
|
||||
JsonWindow JsonWindow = new JsonWindow(sProfilePath);
|
||||
JsonWindow JsonWindow = new JsonWindow(sProfilePath, sMaterial, sColorMaterial, sGlass);
|
||||
foreach (var Area in AreaList)
|
||||
JsonWindow.AreaList.Add(Area.Serialize());
|
||||
return JsonWindow;
|
||||
@@ -53,7 +97,6 @@ namespace WebWindowTest
|
||||
internal string sSerialized()
|
||||
{
|
||||
return JsonConvert.SerializeObject(Serialize(), Formatting.Indented);
|
||||
|
||||
}
|
||||
|
||||
internal void OnUpdatePreview(string sJwd)
|
||||
@@ -79,6 +122,39 @@ namespace WebWindowTest
|
||||
|
||||
public abstract class Area
|
||||
{
|
||||
// Conteggio dei macro elementi
|
||||
private static int m_CounterGroup = 0;
|
||||
public static void AddCounterGroup()
|
||||
{
|
||||
m_CounterGroup++;
|
||||
}
|
||||
//public static void DelCounterGroup()
|
||||
//{
|
||||
// m_CounterGroup--;
|
||||
//}
|
||||
public static int nCounterGroup
|
||||
{
|
||||
get => m_CounterGroup;
|
||||
set => m_CounterGroup = value;
|
||||
}
|
||||
|
||||
private int m_IdGroup;
|
||||
public int IdGroup
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IdGroup;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
m_IdGroup = value;
|
||||
}
|
||||
}
|
||||
public void SetIdGroup(int nIdGroup)
|
||||
{
|
||||
m_IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
protected Window m_ParentWindow;
|
||||
public Window ParentWindow
|
||||
@@ -163,7 +239,8 @@ namespace WebWindowTest
|
||||
// Aggiungo Area split di default
|
||||
Split SplitArea = Split.CreateSplit(this, SplitShapes.HORIZONTAL);
|
||||
// imposto i parametri di default
|
||||
SplitArea.SetSplitQty(1);
|
||||
SplitArea.SetSplitQtyHoriz(1);
|
||||
SplitArea.SetSplitStartVert(false);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SplitArea);
|
||||
// Creo le due aree Splitted
|
||||
@@ -337,6 +414,8 @@ namespace WebWindowTest
|
||||
break;
|
||||
}
|
||||
}
|
||||
// salvo tipo Joint
|
||||
Joints oldJointType = JointList[0].SelJointType;
|
||||
// aggiungo Joint
|
||||
m_JointList.Clear();
|
||||
switch (SelShape)
|
||||
@@ -348,17 +427,21 @@ namespace WebWindowTest
|
||||
case Shapes.ARC:
|
||||
case Shapes.DOUBLEARC:
|
||||
{
|
||||
JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 3, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 4, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 1, oldJointType));
|
||||
JointList.Add(new Joint(this, 2, oldJointType));
|
||||
JointList.Add(new Joint(this, 3, oldJointType));
|
||||
JointList.Add(new Joint(this, 4, oldJointType));
|
||||
//JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
//JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
//JointList.Add(new Joint(this, 3, Joints.FULL_H));
|
||||
//JointList.Add(new Joint(this, 4, Joints.FULL_H));
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.ARC_FULL:
|
||||
{
|
||||
JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 1, oldJointType));
|
||||
JointList.Add(new Joint(this, 2, oldJointType));
|
||||
JointList.Add(new Joint(this, 3, Joints.ANGLED));
|
||||
JointList.Add(new Joint(this, 4, Joints.ANGLED));
|
||||
break;
|
||||
@@ -366,8 +449,8 @@ namespace WebWindowTest
|
||||
|
||||
case Shapes.TRIANGLE:
|
||||
{
|
||||
JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 1, oldJointType));
|
||||
JointList.Add(new Joint(this, 2, oldJointType));
|
||||
JointList.Add(new Joint(this, 3, Joints.ANGLED));
|
||||
break;
|
||||
}
|
||||
@@ -578,7 +661,10 @@ namespace WebWindowTest
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty);
|
||||
Area.nCounterGroup = 0;
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty, IdGroup);
|
||||
foreach (var Dimension in DimensionList)
|
||||
JsonFrame.DimensionList.Add(Dimension.Serialize());
|
||||
foreach (var Joint in JointList)
|
||||
@@ -624,7 +710,7 @@ namespace WebWindowTest
|
||||
// aggiungo area Sash di default
|
||||
for (var SplitIndex = m_SashList.Count; SplitIndex <= value - 1; SplitIndex++)
|
||||
{
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this));
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this, SplitIndex+1));
|
||||
}
|
||||
}
|
||||
else if (value < m_SashList.Count)
|
||||
@@ -716,8 +802,9 @@ namespace WebWindowTest
|
||||
|
||||
}
|
||||
// Aggiungo all'ultimo Splitted l'area di vetro
|
||||
Fill newFill = new Fill(AreaList[1], ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
Fill newFill = Fill.CreateFill(AreaList[1], FillTypes.GLASS);
|
||||
//Fill newFill = new Fill(AreaList[1], ParentWindow);
|
||||
//newFill.SetFillType(FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
@@ -730,37 +817,6 @@ namespace WebWindowTest
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if (AreaList[AreaList.Count - 1].AreaList.Count == 0)
|
||||
//{
|
||||
// if (ContentArea.Count > 0)
|
||||
// {
|
||||
// if (ContentArea[0] is Fill)
|
||||
// {
|
||||
// for (int SplitIndex = 0; SplitIndex <= AreaList.Count() - 1; SplitIndex++)
|
||||
// {
|
||||
// if (SplitIndex == 0)
|
||||
// {
|
||||
// AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Fill f1 = (Fill)ContentArea[0];
|
||||
// AreaList[SplitIndex].AreaList.Add(Fill.CreateFill(AreaList[SplitIndex], f1.FillType));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
// AreaList[1].AreaList.Add(ContentArea[0]);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Fill f1 = (Fill)AreaList[AreaList.Count - 2].AreaList[0];
|
||||
// AreaList[AreaList.Count - 1].AreaList.Add(Fill.CreateFill(AreaList[AreaList.Count - 1], f1.FillType));
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
RefreshHardwareList();
|
||||
@@ -786,7 +842,7 @@ namespace WebWindowTest
|
||||
dNewDimension = dLastDimension / (Qty + 1 - nSashQty);
|
||||
// aggiungo area Sash di default
|
||||
for (var SplitIndex = m_SashList.Count; SplitIndex <= Qty - 1; SplitIndex++)
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this));
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this, SplitIndex+1));
|
||||
}
|
||||
else if (Qty < m_SashList.Count)
|
||||
{
|
||||
@@ -1092,7 +1148,7 @@ namespace WebWindowTest
|
||||
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId);
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId)?? new Hardware("","","","","",0,0);
|
||||
if (m_SelHardware == null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
}
|
||||
@@ -1125,8 +1181,8 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<AGBOption> m_HwdOptionList = new ObservableCollection<AGBOption>();
|
||||
public ObservableCollection<AGBOption> HwdOptionList
|
||||
private ObservableCollection<ParametriOpzioni> m_HwdOptionList = new ObservableCollection<ParametriOpzioni>();
|
||||
public ObservableCollection<ParametriOpzioni> HwdOptionList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1141,6 +1197,8 @@ namespace WebWindowTest
|
||||
internal static Sash CreateSash(Area Area)
|
||||
{
|
||||
Sash newSash = new Sash(Area, Area.ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSash.SetIdGroup(nCounterGroup);
|
||||
newSash.SetAreaType(AreaTypes.SASH);
|
||||
newSash.SetSashQty(1);
|
||||
newSash.SetOrientationSashType(OrientationSash.VERTICAL);
|
||||
@@ -1283,38 +1341,40 @@ namespace WebWindowTest
|
||||
m_HwdOptionList.Clear();
|
||||
}
|
||||
|
||||
//internal OpeningSides GetOpeningSide(Openings OpeningType)
|
||||
//{
|
||||
// switch (OpeningType)
|
||||
// {
|
||||
// case Openings.TURNONLY_LEFT:
|
||||
// case Openings.TILTTURN_LEFT:
|
||||
// case Openings.TILTONLY_TOP:
|
||||
// case Openings.COMPLANARSLIDE_LEFT:
|
||||
// case Openings.LIFTSLIDE_LEFT:
|
||||
// {
|
||||
// return OpeningSides.LEFT;
|
||||
// }
|
||||
internal OpeningSides GetOpeningSide(Openings OpeningType)
|
||||
{
|
||||
switch (OpeningType)
|
||||
{
|
||||
case Openings.TURNONLY_LEFT:
|
||||
case Openings.TILTTURN_LEFT:
|
||||
case Openings.TILTONLY_TOP:
|
||||
case Openings.COMPLANARSLIDE_LEFT:
|
||||
case Openings.LIFTSLIDE_LEFT:
|
||||
{
|
||||
return OpeningSides.LEFT;
|
||||
}
|
||||
|
||||
// case Openings.TURNONLY_RIGHT:
|
||||
// case Openings.TILTTURN_RIGHT:
|
||||
// case Openings.TILTONLY_BOTTOM:
|
||||
// case Openings.COMPLANARSLIDE_RIGHT:
|
||||
// case Openings.LIFTSLIDE_RIGHT:
|
||||
// {
|
||||
// return OpeningSides.RIGHT;
|
||||
// }
|
||||
case Openings.TURNONLY_RIGHT:
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
case Openings.TILTONLY_BOTTOM:
|
||||
case Openings.COMPLANARSLIDE_RIGHT:
|
||||
case Openings.LIFTSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningSides.RIGHT;
|
||||
}
|
||||
|
||||
// default:
|
||||
// {
|
||||
// return OpeningSides.NULL;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
default:
|
||||
{
|
||||
return OpeningSides.NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Sash Copy(Area newParentArea)
|
||||
{
|
||||
Sash newSash = new Sash(newParentArea, m_ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSash.SetIdGroup(nCounterGroup);
|
||||
newSash.SetAreaType(AreaType);
|
||||
// Imposta la quantità di ante e definisce SashDimension di ogni anta ai valori di default
|
||||
newSash.SetSashQty(nSashQty);
|
||||
@@ -1346,7 +1406,9 @@ namespace WebWindowTest
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, m_SelHardware.sId);
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, m_SelHardware.sId, IdGroup);
|
||||
foreach (var SashDimension in SashList)
|
||||
JsonSash.SashList.Add(SashDimension.Serialize());
|
||||
foreach (var Joint in JointList)
|
||||
@@ -1359,62 +1421,81 @@ namespace WebWindowTest
|
||||
|
||||
public class Split : Area
|
||||
{
|
||||
public int nSplitQty
|
||||
private bool m_bSplitStartVert = true;
|
||||
public bool bSplitStartVert
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitPositionList.Count > 0 ? m_SplitPositionList.Count - 1 : 0;
|
||||
return m_bSplitStartVert;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bSplitStartVert = value;
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
internal void SetSplitStartVert(bool SplitStartVert)
|
||||
{
|
||||
bSplitStartVert = SplitStartVert;
|
||||
}
|
||||
public int nSplitQtyVert
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitVertList.Count > 0 ? m_SplitVertList.Count - 1 : 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitPositionList.Count - 1)
|
||||
if (value > m_SplitVertList.Count - 1)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitPositionList.Count > 0)
|
||||
if (m_SplitVertList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitPositionList[m_SplitPositionList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQty);
|
||||
m_SplitPositionList[m_SplitPositionList.Count - 1].SetDimension(dNewDimension);
|
||||
dLastDimension = m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dNewDimension);
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQty);
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitPositionList.Count; SplitIndex <= value; SplitIndex++)
|
||||
SplitPositionList.Add(new SplitDimension(dNewDimension, true, this));
|
||||
for (var SplitIndex = m_SplitVertList.Count; SplitIndex <= value; SplitIndex++)
|
||||
m_SplitVertList.Add(new SplitDimension(dNewDimension, true, this, true));
|
||||
}
|
||||
else if(value == 0)
|
||||
else if (value == 0)
|
||||
{
|
||||
SplitPositionList.RemoveAt(1);
|
||||
SplitPositionList.RemoveAt(0);
|
||||
m_SplitVertList.RemoveAt(1);
|
||||
m_SplitVertList.RemoveAt(0);
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitPositionList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
{
|
||||
dLastDimension += m_SplitPositionList[SplitIndex].dDimension;
|
||||
SplitPositionList.RemoveAt(SplitIndex);
|
||||
dLastDimension += m_SplitVertList[SplitIndex].dDimension;
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
}
|
||||
dLastDimension += m_SplitPositionList[SplitPositionList.Count - 1].dDimension;
|
||||
SplitPositionList[SplitPositionList.Count - 1].SetDimension(dLastDimension);
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
// 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 <= SplitPositionList.Count - 1; SplitIndex++)
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= (m_SplitVertList.Count * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = new Fill(AreaList.Last(), ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
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)
|
||||
{
|
||||
for (var SplitIndex = SplitPositionList.Count; SplitIndex <= AreaList.Count - 1; SplitIndex++)
|
||||
int nAreaList = AreaList.Count - 1;
|
||||
for (var SplitIndex = (m_SplitVertList.Count * nHoriz); SplitIndex <= nAreaList; SplitIndex++)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
}
|
||||
@@ -1430,30 +1511,128 @@ namespace WebWindowTest
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetSplitQty(int Qty, bool NotifyProperty = false)
|
||||
internal void SetSplitQtyVert(int QtyVert, bool NotifyProperty = false)
|
||||
{
|
||||
if (Qty > m_SplitPositionList.Count)
|
||||
if (QtyVert > m_SplitVertList.Count)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitPositionList.Count > 0)
|
||||
if (m_SplitVertList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitPositionList[m_SplitPositionList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (Qty + 1 - nSplitQty);
|
||||
m_SplitPositionList[m_SplitPositionList.Count - 1].dDimension = dNewDimension;
|
||||
dLastDimension = m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (QtyVert + 1 - nSplitQtyVert);
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].dDimension = dNewDimension;
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (Qty + 1 - nSplitQty);
|
||||
dNewDimension = dLastDimension / (QtyVert + 1 - nSplitQtyVert);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitPositionList.Count; SplitIndex <= Qty; SplitIndex++)
|
||||
SplitPositionList.Add(new SplitDimension(dNewDimension, true, this));
|
||||
for (var SplitIndex = m_SplitVertList.Count; SplitIndex <= QtyVert; SplitIndex++)
|
||||
m_SplitVertList.Add(new SplitDimension(dNewDimension, true, this, true));
|
||||
}
|
||||
else if (Qty < m_SplitPositionList.Count)
|
||||
else if (QtyVert < m_SplitVertList.Count)
|
||||
{
|
||||
for (var SplitIndex = m_SplitPositionList.Count - 1; SplitIndex >= Qty; SplitIndex += -1)
|
||||
SplitPositionList.RemoveAt(SplitIndex);
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= QtyVert; SplitIndex += -1)
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public int nSplitQtyHoriz
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count - 1 : 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitHorizList.Count - 1)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitHorizList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyHoriz);
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].SetDimension(dNewDimension);
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyHoriz);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitHorizList.Count; SplitIndex <= value; SplitIndex++)
|
||||
m_SplitHorizList.Add(new SplitDimension(dNewDimension, true, this, false));
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
m_SplitHorizList.RemoveAt(1);
|
||||
m_SplitHorizList.RemoveAt(0);
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitHorizList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
{
|
||||
dLastDimension += m_SplitHorizList[SplitIndex].dDimension;
|
||||
m_SplitHorizList.RemoveAt(SplitIndex);
|
||||
}
|
||||
dLastDimension += m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
// Controllo quanti split verticali ci sono
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= (m_SplitHorizList.Count * nVert) - 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_SplitHorizList.Count * nVert); 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);
|
||||
}
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
internal void SetSplitQtyHoriz(int QtyHoriz, bool NotifyProperty = false)
|
||||
{
|
||||
if (QtyHoriz > m_SplitHorizList.Count)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitHorizList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (QtyHoriz + 1 - nSplitQtyHoriz);
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension = dNewDimension;
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (QtyHoriz + 1 - nSplitQtyHoriz);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitHorizList.Count; SplitIndex <= QtyHoriz; SplitIndex++)
|
||||
m_SplitHorizList.Add(new SplitDimension(dNewDimension, true, this, false));
|
||||
}
|
||||
else if (QtyHoriz < m_SplitHorizList.Count)
|
||||
{
|
||||
for (var SplitIndex = m_SplitHorizList.Count - 1; SplitIndex >= QtyHoriz; SplitIndex += -1)
|
||||
m_SplitHorizList.RemoveAt(SplitIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1482,6 +1661,39 @@ namespace WebWindowTest
|
||||
set
|
||||
{
|
||||
m_SelSplitShape = (SplitShapes)IdNameStruct.IdFromInd(value, m_SplitShapeList);
|
||||
// Cancello elementi nello split e azzero quantità orizzontale e verticale
|
||||
AreaList.Clear();
|
||||
SetSplitQtyVert(0);
|
||||
SetSplitQtyHoriz(0);
|
||||
if (m_SelSplitShape == SplitShapes.VERTICAL)
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyVert(1);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
else if (m_SelSplitShape == SplitShapes.HORIZONTAL)
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitStartVert(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyVert(1);
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
// Aggiungo area Splitted e vetro
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
for (var SplitIndex = 0; SplitIndex <= (nVert * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[SplitIndex].AreaList.Add(newFill);
|
||||
}
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
@@ -1519,6 +1731,32 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitVertList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitVertList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitVertList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitVertList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitHorizList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitHorizList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitHorizList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitHorizList = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Split(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
{
|
||||
}
|
||||
@@ -1526,6 +1764,8 @@ namespace WebWindowTest
|
||||
internal static Split CreateSplit(Area Area, SplitShapes SplitShape)
|
||||
{
|
||||
Split Split = new Split(Area, Area.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Split.SetIdGroup(nCounterGroup);
|
||||
Split.SetAreaType(AreaTypes.SPLIT);
|
||||
Split.SetSplitShape(SplitShape, true);
|
||||
return Split;
|
||||
@@ -1534,7 +1774,11 @@ namespace WebWindowTest
|
||||
public override Split Copy(Area newParentArea)
|
||||
{
|
||||
Split newSplit = new Split(newParentArea, ParentWindow);
|
||||
newSplit.SetSplitQty(nSplitQty);
|
||||
AddCounterGroup();
|
||||
newSplit.SetIdGroup(nCounterGroup);
|
||||
newSplit.SetSplitStartVert(bSplitStartVert);
|
||||
newSplit.SetSplitQtyVert(nSplitQtyVert);
|
||||
newSplit.SetSplitQtyHoriz(nSplitQtyHoriz);
|
||||
newSplit.SetSplitShape(SelSplitShape, true);
|
||||
newSplit.SetAreaType(AreaType);
|
||||
foreach(var item in AreaList)
|
||||
@@ -1547,9 +1791,16 @@ namespace WebWindowTest
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonSplit JsonSplit = new JsonSplit(m_SelSplitShape);
|
||||
foreach (var SplitPosition in m_SplitPositionList)
|
||||
JsonSplit.SplitPositionList.Add(SplitPosition.Serialize());
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSplit JsonSplit = new JsonSplit(m_SelSplitShape, IdGroup);
|
||||
//foreach (var SplitPosition in m_SplitPositionList)
|
||||
// JsonSplit.SplitPositionList.Add(SplitPosition.Serialize());
|
||||
JsonSplit.SplitStartVert = bSplitStartVert;
|
||||
foreach (var SplitVert in m_SplitVertList)
|
||||
JsonSplit.SplitVertList.Add(SplitVert.Serialize());
|
||||
foreach (var SplitHoriz in m_SplitHorizList)
|
||||
JsonSplit.SplitHorizList.Add(SplitHoriz.Serialize());
|
||||
foreach (var Area in AreaList)
|
||||
JsonSplit.AreaList.Add(Area.Serialize());
|
||||
return JsonSplit;
|
||||
@@ -1558,7 +1809,6 @@ namespace WebWindowTest
|
||||
|
||||
public class Splitted : Area
|
||||
{
|
||||
|
||||
public Splitted(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
{
|
||||
}
|
||||
@@ -1566,6 +1816,8 @@ namespace WebWindowTest
|
||||
internal static Splitted CreateSplitted(Area ParentArea)
|
||||
{
|
||||
Splitted Splitted = new Splitted(ParentArea, ParentArea.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Splitted.SetIdGroup(nCounterGroup);
|
||||
Splitted.SetAreaType(AreaTypes.SPLITTED);
|
||||
return Splitted;
|
||||
}
|
||||
@@ -1573,6 +1825,8 @@ namespace WebWindowTest
|
||||
public override Splitted Copy(Area newParentArea)
|
||||
{
|
||||
Splitted newSplitted = new Splitted(newParentArea, ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSplitted.SetIdGroup(nCounterGroup);
|
||||
newSplitted.SetAreaType(AreaType);
|
||||
foreach (var item in AreaList)
|
||||
{
|
||||
@@ -1584,7 +1838,9 @@ namespace WebWindowTest
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonSplitted JsonSplitted = new JsonSplitted();
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSplitted JsonSplitted = new JsonSplitted(IdGroup);
|
||||
foreach (var Area in AreaList)
|
||||
JsonSplitted.AreaList.Add(Area.Serialize());
|
||||
return JsonSplitted;
|
||||
@@ -1649,6 +1905,8 @@ namespace WebWindowTest
|
||||
internal static Fill CreateFill(Area AreaParent, FillTypes FillType)
|
||||
{
|
||||
Fill Fill = new Fill(AreaParent, AreaParent.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Fill.SetIdGroup(nCounterGroup);
|
||||
Fill.SetAreaType(AreaTypes.FILL);
|
||||
Fill.SetFillType(FillType);
|
||||
return Fill;
|
||||
@@ -1657,6 +1915,8 @@ namespace WebWindowTest
|
||||
public override Fill Copy(Area newParentArea)
|
||||
{
|
||||
Fill newFill = new Fill(newParentArea, m_ParentWindow);
|
||||
AddCounterGroup();
|
||||
newFill.SetIdGroup(nCounterGroup);
|
||||
newFill.SetFillType(SelFillType);
|
||||
newFill.SetAreaType(AreaType);
|
||||
return newFill;
|
||||
@@ -1664,7 +1924,9 @@ namespace WebWindowTest
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonFill JsonFill = new JsonFill(FillType);
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonFill JsonFill = new JsonFill(FillType, IdGroup);
|
||||
foreach (var Area in AreaList)
|
||||
JsonFill.AreaList.Add(Area.Serialize());
|
||||
return JsonFill;
|
||||
@@ -1681,6 +1943,7 @@ namespace WebWindowTest
|
||||
return m_ParentArea;
|
||||
}
|
||||
}
|
||||
|
||||
private int m_nIndex;
|
||||
public int nIndex
|
||||
{
|
||||
@@ -1831,7 +2094,7 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
public class AGBOption
|
||||
public partial class ParametriOpzioni
|
||||
{
|
||||
public enum HDWOPTIONTYPES : int
|
||||
{
|
||||
@@ -1840,7 +2103,7 @@ namespace WebWindowTest
|
||||
COMBO = 3
|
||||
}
|
||||
|
||||
private HDWOPTIONTYPES m_Type;
|
||||
protected HDWOPTIONTYPES m_Type;
|
||||
public HDWOPTIONTYPES Type
|
||||
{
|
||||
get
|
||||
@@ -1867,6 +2130,25 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
private Visibility m_OptVisibility;
|
||||
public Visibility OptVisibility
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OptVisibility;
|
||||
}
|
||||
}
|
||||
|
||||
public ParametriOpzioni(ParametriOpzioniParametri HdwOptionParam)
|
||||
{
|
||||
m_sName = HdwOptionParam.NomeParametro;
|
||||
m_sDescription = HdwOptionParam.DescrizioneParametro;
|
||||
m_OptVisibility = Visibility.VISIBLE; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
|
||||
}
|
||||
}
|
||||
|
||||
public class AGBOptionCombo : ParametriOpzioni
|
||||
{
|
||||
private List<AGBOptionParameter> m_ValueList = new List<AGBOptionParameter>();
|
||||
public List<AGBOptionParameter> ValueList
|
||||
{
|
||||
@@ -1889,30 +2171,13 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
private Visibility m_OptVisibility;
|
||||
public Visibility OptVisibility
|
||||
public AGBOptionCombo(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OptVisibility;
|
||||
}
|
||||
m_Type = HDWOPTIONTYPES.COMBO;
|
||||
foreach (var Value in HdwOptionParam.Opzioni)
|
||||
m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
|
||||
m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente)?? new AGBOptionParameter("", "");
|
||||
}
|
||||
|
||||
//public AGBOption(ParametriOpzioniParametri HdwOptionParam)
|
||||
//{
|
||||
// if (HdwOptionParam.Opzioni.Count > 0)
|
||||
// {
|
||||
// m_Type = HDWOPTIONTYPES.COMBO;
|
||||
// foreach (var Value in HdwOptionParam.Opzioni)
|
||||
// m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
|
||||
// }
|
||||
// else
|
||||
// m_Type = HDWOPTIONTYPES.TEXT;
|
||||
// m_sName = HdwOptionParam.NomeParametro;
|
||||
// m_sDescription = HdwOptionParam.DescrizioneParametro;
|
||||
// m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente);
|
||||
// m_OptVisibility = Visibility.Visible; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
|
||||
//}
|
||||
}
|
||||
|
||||
public class AGBOptionParameter
|
||||
@@ -1942,6 +2207,28 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
public class AGBOptionText : ParametriOpzioni
|
||||
{
|
||||
private string m_sValue;
|
||||
public string sValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
public AGBOptionText(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
|
||||
{
|
||||
m_Type = HDWOPTIONTYPES.TEXT;
|
||||
m_sValue = HdwOptionParam.ValoreCorrente;
|
||||
}
|
||||
}
|
||||
|
||||
public class FrameDimension
|
||||
{
|
||||
// valore massimo e minimo della dimensione del frame
|
||||
@@ -2019,6 +2306,15 @@ namespace WebWindowTest
|
||||
{
|
||||
// reference
|
||||
private Sash m_Parent;
|
||||
|
||||
private int m_nSashId;
|
||||
public int nSashId
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSashId;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bIsRelative = false;
|
||||
public bool bIsRelative
|
||||
@@ -2197,17 +2493,18 @@ namespace WebWindowTest
|
||||
|
||||
public SashDimension Copy()
|
||||
{
|
||||
SashDimension newSashDim = new SashDimension(dDimension, bIsRelative, m_Parent);
|
||||
SashDimension newSashDim = new SashDimension(dDimension, bIsRelative, m_Parent, m_nSashId);
|
||||
newSashDim.SetOpeningType(SelOpeningType);
|
||||
newSashDim.SetHasHandle(bHasHandle);
|
||||
return newSashDim;
|
||||
}
|
||||
|
||||
public SashDimension(double dDimension, bool bIsRelative, Sash Parent)
|
||||
public SashDimension(double dDimension, bool bIsRelative, Sash Parent, int nSashId)
|
||||
{
|
||||
m_dDimension = dDimension;
|
||||
m_bIsRelative = bIsRelative;
|
||||
m_Parent = Parent;
|
||||
m_nSashId = nSashId;
|
||||
// assengno maniglia
|
||||
if (Parent.SashList.Count == 0 || !Parent.SashList.Any(x => x.bHasHandle))
|
||||
m_bHasHandle = true;
|
||||
@@ -2232,13 +2529,13 @@ namespace WebWindowTest
|
||||
|
||||
case Openings.TILTTURN_LEFT:
|
||||
{
|
||||
SetOpeningType(Openings.TILTTURN_RIGHT);
|
||||
SetOpeningType(Openings.TURNONLY_RIGHT);
|
||||
break;
|
||||
}
|
||||
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
{
|
||||
SetOpeningType(Openings.TILTTURN_LEFT);
|
||||
SetOpeningType(Openings.TURNONLY_LEFT);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2285,7 +2582,7 @@ namespace WebWindowTest
|
||||
|
||||
internal JsonSashDimension Serialize()
|
||||
{
|
||||
JsonSashDimension JsonSashDimension = new JsonSashDimension(OpeningType, m_bHasHandle, m_dDimension);
|
||||
JsonSashDimension JsonSashDimension = new JsonSashDimension(OpeningType, m_bHasHandle, m_dDimension, m_nSashId);
|
||||
return JsonSashDimension;
|
||||
}
|
||||
}
|
||||
@@ -2308,6 +2605,20 @@ namespace WebWindowTest
|
||||
m_bIsRelative = value;
|
||||
}
|
||||
|
||||
private bool m_bIsVertListDim = false;
|
||||
public bool bIsVertListDim
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsVertListDim;
|
||||
}
|
||||
}
|
||||
internal void SetIsVertListDim(bool value)
|
||||
{
|
||||
m_bIsVertListDim = value;
|
||||
}
|
||||
|
||||
|
||||
private double m_dDimension;
|
||||
public double dDimension
|
||||
{
|
||||
@@ -2323,8 +2634,13 @@ namespace WebWindowTest
|
||||
// se sono in percentuale
|
||||
if (m_bIsRelative)
|
||||
{
|
||||
List<SplitDimension> RelativeDimList = new List<SplitDimension>();
|
||||
if (bIsVertListDim)
|
||||
RelativeDimList = m_Parent.SplitVertList.Where(x => x.bIsRelative).ToList();
|
||||
else
|
||||
RelativeDimList = m_Parent.SplitHorizList.Where(x => x.bIsRelative).ToList();
|
||||
// verifico se ci sono assoluti
|
||||
List<SplitDimension> RelativeDimList = m_Parent.SplitPositionList.Where(x => x.bIsRelative).ToList();
|
||||
//List<SplitDimension> RelativeDimList = m_Parent.SplitPositionList.Where(x => x.bIsRelative).ToList();
|
||||
if (RelativeDimList.Count > 0)
|
||||
{
|
||||
if (m_Parent.bIsPercentage)
|
||||
@@ -2395,14 +2711,15 @@ namespace WebWindowTest
|
||||
|
||||
public SplitDimension Copy()
|
||||
{
|
||||
SplitDimension newSplitDim = new SplitDimension(dDimension, bIsRelative, m_Parent);
|
||||
SplitDimension newSplitDim = new SplitDimension(dDimension, bIsRelative, m_Parent, bIsVertListDim);
|
||||
return newSplitDim;
|
||||
}
|
||||
public SplitDimension(double dDimension, bool bIsRelative, Split Parent)
|
||||
public SplitDimension(double dDimension, bool bIsRelative, Split Parent, bool IsVertList)
|
||||
{
|
||||
m_dDimension = dDimension;
|
||||
m_bIsRelative = bIsRelative;
|
||||
m_Parent = Parent;
|
||||
m_bIsVertListDim = IsVertList;
|
||||
}
|
||||
|
||||
internal JsonSplitDimension Serialize()
|
||||
|
||||
Reference in New Issue
Block a user