Merge branch 'release/FixCompoDataFlux_05'
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
EC_OnClose="CloseObj">
|
||||
</WebWindowComplex.TableComp>
|
||||
|
||||
|
||||
@if (!string.IsNullOrEmpty(outClose))
|
||||
{
|
||||
<div class="alert alert-danger fs-4">
|
||||
@@ -22,16 +23,6 @@ else if (!string.IsNullOrEmpty(outSave))
|
||||
@outSave
|
||||
</div>
|
||||
}
|
||||
|
||||
@*
|
||||
IN_ColorMaterialList="@AvailColorMaterialList"
|
||||
IN_FamilyHardwareList="@AvailFamilyHardwareList"
|
||||
IN_GlassList="@AvailGlassList"
|
||||
IN_HardwareList="@AvailHardwareList"
|
||||
IN_MaterialList="@AvailMaterialList"
|
||||
LiveSVG="@currSvg"
|
||||
CurrJwd="@InitialJwd"
|
||||
IN_SelFamilyHardware="@SelFamilyHardware"
|
||||
IN_SelColorMaterial="@SelColorMaterial"
|
||||
IN_SelMaterial="@SelMaterial"
|
||||
IN_SelGlass="@SelGlass" *@
|
||||
<p>
|
||||
@currJwd
|
||||
</p>
|
||||
|
||||
@@ -14,9 +14,15 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
public partial class EditJWD : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
#region Public Fields
|
||||
|
||||
public string InitialJwd = "";
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
|
||||
#endregion Public Properties
|
||||
@@ -32,46 +38,54 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Predisposizione valori live SVG/JWD
|
||||
/// </summary>
|
||||
protected LivePayload CurrData = new LivePayload();
|
||||
|
||||
protected string currJwd = "...";
|
||||
protected string prevJwd = "";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
protected string prevJwd = "";
|
||||
/// <summary>
|
||||
/// Configurazione elenchi anagrafiche
|
||||
/// </summary>
|
||||
protected BaseListPayload SetupList = new BaseListPayload();
|
||||
|
||||
#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>()
|
||||
|
||||
protected List<string> AvailFamilyHardwareList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Pine"),
|
||||
new string("Fir")
|
||||
new string("Arc"),
|
||||
new string("Profilo78")
|
||||
};
|
||||
|
||||
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")
|
||||
new string("Vetro BE 2S 4/12/4"),
|
||||
new string("Vetro BE 2S 4/16/4"),
|
||||
new string("Vetro BE 3S 4/12/4/12/4"),
|
||||
new string("Vetro BE 3S 4/16/4/16/4"),
|
||||
new string("Vetro BE 2S 4T/12/4T"),
|
||||
new string("Vetro BE 2S 4T/16/4T")
|
||||
};
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
|
||||
protected List<string> AvailMaterialList { get; set; } = new List<string>()
|
||||
{
|
||||
new string("Pino"),
|
||||
new string("Abete")
|
||||
};
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
|
||||
@@ -86,6 +100,11 @@ namespace Test.UI.Components.Pages
|
||||
get => (MarkupString)currJwd.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
protected string SelMaterial { get; set; } = "";
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -93,10 +112,6 @@ namespace Test.UI.Components.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
SelFamilyHardware = "Natura";
|
||||
//SelColorMaterial = "Black";
|
||||
//SelColorMaterial = "Pine";
|
||||
//SelGlass = "4T/16/4T";
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
// rileggo altri dati
|
||||
@@ -107,6 +122,8 @@ namespace Test.UI.Components.Pages
|
||||
ColorMaterial = AvailColorMaterialList,
|
||||
FamilyHardware = AvailFamilyHardwareList,
|
||||
Glass = AvailGlassList,
|
||||
//Hardware = new List<Hardware>(),
|
||||
//Material = new List<string>(),
|
||||
Hardware = AvailHardwareList,
|
||||
Material = AvailMaterialList,
|
||||
TemplateDTO = null
|
||||
@@ -119,16 +136,6 @@ namespace Test.UI.Components.Pages
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Configurazione elenchi anagrafiche
|
||||
/// </summary>
|
||||
protected BaseListPayload SetupList = new BaseListPayload();
|
||||
/// <summary>
|
||||
/// Predisposizione valori live SVG/JWD
|
||||
/// </summary>
|
||||
protected LivePayload CurrData = new LivePayload();
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
@@ -136,14 +143,15 @@ namespace Test.UI.Components.Pages
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string CalcUid = "CurrWindow";
|
||||
private string cFileTemplate = "Data/Setup.json";
|
||||
private string cFileHardware = "Hardware/Setup.json";
|
||||
private string cFileTemplate = "Data/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
private string outClose = "";
|
||||
private string outSave = "";
|
||||
private string subChannel = "";
|
||||
|
||||
private string windowUid = "CurrWindow";
|
||||
@@ -169,6 +177,16 @@ namespace Test.UI.Components.Pages
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua chiusura oggetto con eventuale save
|
||||
/// </summary>
|
||||
/// <param name="reqSave"></param>
|
||||
private void CloseObj(bool reqSave)
|
||||
{
|
||||
outClose = !reqSave ? "Richiesto chiusura!" : "";
|
||||
outSave = reqSave ? "Richiesto salvataggio!" : "";
|
||||
}
|
||||
|
||||
private void ConfInit()
|
||||
{
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
@@ -252,18 +270,5 @@ namespace Test.UI.Components.Pages
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Effettua chiusura oggetto con eventuale save
|
||||
/// </summary>
|
||||
/// <param name="reqSave"></param>
|
||||
private void CloseObj(bool reqSave)
|
||||
{
|
||||
outClose = !reqSave ? "Richiesto chiusura!" : "";
|
||||
outSave = reqSave ? "Richiesto salvataggio!" : "";
|
||||
}
|
||||
|
||||
private string outClose = "";
|
||||
private string outSave = "";
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Nero",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -39,19 +38,19 @@
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"IdGroup": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"nSashId": 1,
|
||||
"OpeningType": "TURNONLY_LEFT",
|
||||
"bHasHandle": false,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"SashId": 2,
|
||||
"nSashId": 2,
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 50.0
|
||||
@@ -77,6 +76,7 @@
|
||||
}
|
||||
],
|
||||
"Hardware": "000559",
|
||||
"IdGroup": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
@@ -94,8 +94,8 @@
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 6,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
@@ -44,7 +44,7 @@
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"nSashId": 1,
|
||||
"OpeningType": "TILTTURN_LEFT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -39,11 +38,11 @@
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"IdGroup": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitStartVert": false,
|
||||
"SplitStartVert": false,
|
||||
"SplitVertList": [],
|
||||
"SplitHorizList": [
|
||||
{
|
||||
@@ -55,13 +54,14 @@
|
||||
"dDimension": 60.0
|
||||
}
|
||||
],
|
||||
"IdGroup": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 4,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -72,17 +72,16 @@
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"nSashId": 1,
|
||||
"OpeningType": "TURNONLY_LEFT",
|
||||
"bHasHandle": false,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"SashId": 2,
|
||||
"nSashId": 2,
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 50.0
|
||||
@@ -108,13 +107,14 @@
|
||||
}
|
||||
],
|
||||
"Hardware": "000559",
|
||||
"IdGroup": 6,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 7,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 8,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 8,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -125,8 +125,8 @@
|
||||
"IdGroup": 9,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 10,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 10,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "DOUBLECHAMFER",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -44,11 +43,11 @@
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"IdGroup": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitStartVert": true,
|
||||
"SplitStartVert": true,
|
||||
"SplitVertList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
@@ -60,16 +59,16 @@
|
||||
}
|
||||
],
|
||||
"SplitHorizList": [],
|
||||
"IdGroup": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"nSashId": 1,
|
||||
"OpeningType": "TILTTURN_LEFT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
@@ -97,10 +96,11 @@
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"Hardware": "000000",
|
||||
"IdGroup": 4,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 5,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 5,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -114,11 +114,10 @@
|
||||
"IdGroup": 6,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 7,
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"nSashId": 1,
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
@@ -146,10 +145,11 @@
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"Hardware": "000000",
|
||||
"IdGroup": 7,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 8,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 8,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -39,9 +38,9 @@
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"IdGroup": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "GRID",
|
||||
"SplitStartVert": false,
|
||||
"SplitVertList": [
|
||||
@@ -68,13 +67,14 @@
|
||||
"dDimension": 30.0
|
||||
}
|
||||
],
|
||||
"IdGroup": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 4,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -85,8 +85,8 @@
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 6,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -97,8 +97,8 @@
|
||||
"IdGroup": 7,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 8,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 8,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -109,8 +109,8 @@
|
||||
"IdGroup": 9,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 10,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 10,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -121,8 +121,8 @@
|
||||
"IdGroup": 11,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 12,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 12,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -133,8 +133,8 @@
|
||||
"IdGroup": 13,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 14,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 14,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pine",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "4T/16/4T",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 1,
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
@@ -39,9 +38,9 @@
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"IdGroup": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 2,
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitStartVert": true,
|
||||
"SplitVertList": [
|
||||
@@ -55,13 +54,14 @@
|
||||
}
|
||||
],
|
||||
"SplitHorizList": [],
|
||||
"IdGroup": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 3,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 4,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 4,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
@@ -72,8 +72,8 @@
|
||||
"IdGroup": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"IdGroup": 6,
|
||||
"FillType": "GLASS",
|
||||
"IdGroup": 6,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
|
||||
+359
-35
@@ -1,47 +1,371 @@
|
||||
[
|
||||
{
|
||||
"Id": "000558",
|
||||
"FamilyName": "Natura",
|
||||
"Description": "Profilo78_Rect_Sash",
|
||||
"OpeningType": "ANTA_RIBALTA",
|
||||
"Shape": "Rectangular",
|
||||
"SashQty": 1,
|
||||
"SashPosition": 1
|
||||
"id": "000548",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_DoubleSash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"Id": "000562",
|
||||
"FamilyName": "Natura",
|
||||
"Description": "Profilo78_Rect_Sash",
|
||||
"OpeningType": "ANTA_BANDIERA",
|
||||
"Shape": "Rectangular",
|
||||
"SashQty": 1,
|
||||
"SashPosition": 1
|
||||
"id": "000546",
|
||||
"familyName": "Trap",
|
||||
"description": "Trap_Sash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Trapezoidal",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"Id": "000559",
|
||||
"FamilyName": "Natura",
|
||||
"Description": "Profilo78_Rect_DoubleSash",
|
||||
"OpeningType": "ANTA_RIBALTA",
|
||||
"Shape": "Rectangular",
|
||||
"SashQty": 2,
|
||||
"SashPosition": 1
|
||||
"id": "000547",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_Sash_Compl",
|
||||
"openingType": "ComplanarSlide",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"Id": "000563",
|
||||
"FamilyName": "Natura",
|
||||
"Description": "Profilo78_TurnOnly_Rect_DoubleSash",
|
||||
"OpeningType": "ANTA_BANDIERA",
|
||||
"Shape": "Rectangular",
|
||||
"SashQty": 2,
|
||||
"SashPosition": 1
|
||||
"id": "000561",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_Rect_TripleSash_HiddenHinges",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"Id": "000560",
|
||||
"FamilyName": "Natura",
|
||||
"Description": "Profilo78_Rect_TripleSash",
|
||||
"OpeningType": "ANTA_RIBALTA",
|
||||
"Shape": "Rectangular",
|
||||
"SashQty": 3,
|
||||
"SashPosition": 1
|
||||
"id": "000563",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_TurnOnly_Rect_DoubleSash",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000564",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_TurnOnly_Rect_TripleSash",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 2
|
||||
},
|
||||
{
|
||||
"id": "000603",
|
||||
"familyName": "SegArc",
|
||||
"description": "SegArc_2S_TurnOnly",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Arc",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000602",
|
||||
"familyName": "Arc",
|
||||
"description": "Arc_2S_TurnOnly",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "FullArc",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000601",
|
||||
"familyName": "SegArc",
|
||||
"description": "SegArc_1S_TurnOnly",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Arc",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000610",
|
||||
"familyName": "SemiArc",
|
||||
"description": "SemiArc_1S",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "SemiFullArc",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000611",
|
||||
"familyName": "SemiSegArc",
|
||||
"description": "SemiSegArc_S1",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "SemiArc",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000596",
|
||||
"familyName": "Arc",
|
||||
"description": "Arc_1S",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "FullArc",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000599",
|
||||
"familyName": "SegArc",
|
||||
"description": "SegArc_2S",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Arc",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000597",
|
||||
"familyName": "SegArc",
|
||||
"description": "SegArc_1S",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Arc",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000598",
|
||||
"familyName": "Arc",
|
||||
"description": "Arc_2S",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "FullArc",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000600",
|
||||
"familyName": "Arc",
|
||||
"description": "Arc_1S_TurnOnly",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "FullArc",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000606",
|
||||
"familyName": "Trap",
|
||||
"description": "Trap_S1_TurnOnly",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Trapezoidal",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000605",
|
||||
"familyName": "Trap",
|
||||
"description": "Trap_S2",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Trapezoidal",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000607",
|
||||
"familyName": "Trap",
|
||||
"description": "Trap_S2_TurnOnly",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Trapezoidal",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000604",
|
||||
"familyName": "Trap",
|
||||
"description": "Trap_S1",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Trapezoidal",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000595",
|
||||
"familyName": "Slide",
|
||||
"description": "Slide_quadruple",
|
||||
"openingType": "LiftSlide",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 4,
|
||||
"sashPosition": 2
|
||||
},
|
||||
{
|
||||
"id": "000592",
|
||||
"familyName": "Slide",
|
||||
"description": "Slide_2S",
|
||||
"openingType": "LiftSlide",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000594",
|
||||
"familyName": "Slide",
|
||||
"description": "Slide_4S",
|
||||
"openingType": "LiftSlide",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 4,
|
||||
"sashPosition": 2
|
||||
},
|
||||
{
|
||||
"id": "000593",
|
||||
"familyName": "Slide",
|
||||
"description": "Slide_double",
|
||||
"openingType": "LiftSlide",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000575",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_TurnOnly_Rect_QuadrupleSash",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 4,
|
||||
"sashPosition": 2
|
||||
},
|
||||
{
|
||||
"id": "000558",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_Rect_Sash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000559",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_Rect_DoubleSash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000566",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_TurnOnly_Rect_TripleSash_CenterHandle",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 2
|
||||
},
|
||||
{
|
||||
"id": "000565",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_TurnOnly_Rect_TripleSash_SideHandle",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000562",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_Rect_Sash",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000560",
|
||||
"familyName": "Profilo78",
|
||||
"description": "Profilo78_Rect_TripleSash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000550",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_DoubleSash_4",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000552",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_DoubleSashStrana",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000549",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_DoubleSash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 2,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000555",
|
||||
"familyName": "Round",
|
||||
"description": "Round_Sash",
|
||||
"openingType": "Pivot",
|
||||
"shape": "Circular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000556",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_Sash_Bilico",
|
||||
"openingType": "Pivot",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000554",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_QuadrupolSash_Bandiera",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 4,
|
||||
"sashPosition": 2
|
||||
},
|
||||
{
|
||||
"id": "000551",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_Sash_Bandiera",
|
||||
"openingType": "TurnOnly",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000544",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_Sash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000553",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_TripleSash",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 3,
|
||||
"sashPosition": 1
|
||||
},
|
||||
{
|
||||
"id": "000545",
|
||||
"familyName": "Rect",
|
||||
"description": "Rect_Sash_4",
|
||||
"openingType": "TiltTurn",
|
||||
"shape": "Rectangular",
|
||||
"sashQty": 1,
|
||||
"sashPosition": 1
|
||||
}
|
||||
]
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="border mb-2 shadow-sm rounded border border-2 border-danger">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-4">
|
||||
<h3 class="card-title">Area frame</h3>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (CurrSashList.Count == 0 && CurrSplitList.Count == 0)
|
||||
{
|
||||
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="RaiseAddSash">Aggiungi window</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (!(CurrFrameWindow.AreaList[0] is Split))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="RaiseAddWindow">Aggiungi split</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
public partial class AreaFrame
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public Frame CurrFrameWindow { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<Sash> CurrSashList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<Split> CurrSplitList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_AddSash { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_AddWindow { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento richiesta aggiunta sash
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseAddSash()
|
||||
{
|
||||
await EC_AddSash.InvokeAsync(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento richiesta aggiunta window
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task RaiseAddWindow()
|
||||
{
|
||||
await EC_AddWindow.InvokeAsync(true);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,6 @@ namespace WebWindowComplex.DTO
|
||||
/// <returns></returns>
|
||||
public bool IsValid()
|
||||
{
|
||||
//bool templateOK = TemplateDTO != null && TemplateDTO.Count > 0;
|
||||
bool famHwOK = FamilyHardware != null && FamilyHardware.Count > 0;
|
||||
bool hwOK = Hardware != null && Hardware.Count > 0;
|
||||
bool glassOK = Glass != null && Glass.Count > 0;
|
||||
@@ -58,5 +57,18 @@ namespace WebWindowComplex.DTO
|
||||
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
|
||||
return famHwOK && glassOK && hwOK && colorOK && matOK;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica che Payload sia almeno parzialmente popolato
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsPopulated()
|
||||
{
|
||||
bool famHwOK = FamilyHardware != null && FamilyHardware.Count > 0;
|
||||
bool hwOK = Hardware != null && Hardware.Count > 0;
|
||||
bool glassOK = Glass != null && Glass.Count > 0;
|
||||
bool matOK = Material != null && Material.Count > 0;
|
||||
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
|
||||
return famHwOK || glassOK || hwOK || colorOK || matOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-6">
|
||||
<h5 class="card-title">General</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<label class="input-group-text" for="MaterialWindow">Material</label>
|
||||
<select class="form-select @(cssValid("Material"))" id="MaterialWindow" @bind="CurrMaterial">
|
||||
@foreach (var item in ListPayload.Material)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ProfileWindow">Profile</label>
|
||||
<select class="form-select" id="ProfileWindow">
|
||||
<option value="0">Profilo 78</option>
|
||||
<option value="1">Profilo..</option>
|
||||
<option value="2">Profilo...</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<h5>Fill type</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="GlassWindow">Glass</label>
|
||||
<select class="form-select @(cssValid("Glass"))" id="GlassWindow" @bind="@CurrGlass">
|
||||
@foreach (string glass in ListPayload.Glass)
|
||||
{
|
||||
<option value="@glass">@glass</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="PanelWindow">Pannello</label>
|
||||
<select class="form-select" id="PanelWindow">
|
||||
<option value="0">Liscio</option>
|
||||
<option value="1">Con venatura</option>
|
||||
<option value="2">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<h5 class="card-title">Color</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ColorWindow">Window</label>
|
||||
<select class="form-select @(cssValid("ColorMaterial"))" id="ColorWindow" @bind="@CurrColor">
|
||||
@foreach (string colorMaterial in ListPayload.ColorMaterial)
|
||||
{
|
||||
<option value="@colorMaterial">@colorMaterial</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,102 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebWindowComplex.DTO;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
public partial class General
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Finestra corrente
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Window CurrWindow { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelColor { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelGlass { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_SelWindMat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Elenco anagrafiche di base
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public BaseListPayload ListPayload { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Warnings attivi
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Dictionary<string, string> ListWarnings { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string CurrColor
|
||||
{
|
||||
get => currColor;
|
||||
set
|
||||
{
|
||||
currColor = value;
|
||||
_ = EC_SelColor.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
protected string CurrGlass
|
||||
{
|
||||
get => currGlass;
|
||||
set
|
||||
{
|
||||
currGlass = value;
|
||||
_ = EC_SelGlass.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
protected string CurrMaterial
|
||||
{
|
||||
get => currMaterial;
|
||||
set
|
||||
{
|
||||
currMaterial = value;
|
||||
_ = EC_SelWindMat.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcola CSS warning
|
||||
/// </summary>
|
||||
/// <param name="fKey"></param>
|
||||
/// <returns></returns>
|
||||
protected string cssValid(string fKey)
|
||||
{
|
||||
return ListWarnings.ContainsKey(fKey) ? "border border-danger" : "";
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
currColor = CurrWindow.sColorMaterial;
|
||||
currGlass = CurrWindow.sGlass;
|
||||
currMaterial = CurrWindow.sMaterial;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string currColor = "";
|
||||
private string currGlass = "";
|
||||
private string currMaterial = "";
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -397,6 +397,7 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
foreach (var Joint in m_JointList)
|
||||
newSash.JointList.Add(Joint.Deserialize((Area)ParentArea));
|
||||
newSash.SetSelFamilyHardwareFromIndex(Hardware);
|
||||
newSash.RefreshHardwareList();
|
||||
newSash.SetSelHardwareFromId(Hardware);
|
||||
foreach (var Area in AreaList)
|
||||
|
||||
+762
-804
File diff suppressed because it is too large
Load Diff
+208
-189
@@ -49,6 +49,12 @@ namespace WebWindowComplex
|
||||
[Parameter]
|
||||
public EventCallback<Dictionary<string, string>> EC_OnUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento errore validazione con una lista di errori rilevati
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<Dictionary<string, string>> EC_ValidError { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Elenco anagrafiche di base
|
||||
/// </summary>
|
||||
@@ -85,122 +91,6 @@ namespace WebWindowComplex
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#if false
|
||||
[Parameter]
|
||||
public string CurrJwd
|
||||
{
|
||||
get => m_CurrJwd;
|
||||
set
|
||||
{
|
||||
// Se viene passato un JWD
|
||||
if (m_CurrJwd != value && value != "")
|
||||
{
|
||||
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;
|
||||
}
|
||||
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)
|
||||
{
|
||||
// Aggiornate liste di sash, split, splitted, fill e itemTable
|
||||
UpdateLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
[Parameter]
|
||||
public string LiveSVG
|
||||
{
|
||||
get => m_SelSVG;
|
||||
set => m_SelSVG = value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if false
|
||||
[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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public List<TemplateSelectDTO> IN_TemplateDTOList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_FamilyHardwareList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<Hardware> IN_HardwareList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_ColorMaterialList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_MaterialList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public List<string> IN_GlassList { get; set; } = null!;
|
||||
#endif
|
||||
|
||||
#if false
|
||||
[Parameter]
|
||||
public string IN_SelFamilyHardware { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelColorMaterial { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelMaterial { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public string? IN_SelGlass { get; set; } = null;
|
||||
#endif
|
||||
|
||||
#region Protected Enums
|
||||
|
||||
protected enum CompileStep
|
||||
@@ -242,8 +132,6 @@ namespace WebWindowComplex
|
||||
get => m_ItemTableList;
|
||||
}
|
||||
|
||||
protected string? m_CurrJwd { get; set; }
|
||||
|
||||
protected string m_SelSVG { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
@@ -265,30 +153,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
|
||||
protected string SelFamilyHardware
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelFamilyHardware;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelFamilyHardware = value;
|
||||
Sash.s_SelFamilyHW = value;
|
||||
for (int i = 0; i < SashList.Count; i++)
|
||||
{
|
||||
SashList[i].RefreshHardwareList();
|
||||
SashList[i].RefreshHardwareOptionList();
|
||||
SashList[i].SetFirstHardware();
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnUpdatePreview(m_CurrWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
|
||||
protected string SelMaterial { get; set; } = ""!;
|
||||
@@ -644,7 +509,7 @@ namespace WebWindowComplex
|
||||
if (string.IsNullOrEmpty(LiveData.CurrJwd))
|
||||
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>(LiveData.CurrJwd!, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
@@ -659,6 +524,7 @@ namespace WebWindowComplex
|
||||
currSplit = -1;
|
||||
currStep = CompileStep.Tree;
|
||||
editLock = false;
|
||||
bError = false;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
@@ -684,6 +550,11 @@ namespace WebWindowComplex
|
||||
await EC_OnSelectedTemplate.InvokeAsync(newSel);
|
||||
}
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Primo init componente
|
||||
/// </summary>
|
||||
@@ -691,6 +562,11 @@ namespace WebWindowComplex
|
||||
{
|
||||
// reset editLock...
|
||||
editLock = false;
|
||||
// reset variabile errori
|
||||
bError = false;
|
||||
listErrPre = new Dictionary<string, string>();
|
||||
listErrLink = new Dictionary<string, string>();
|
||||
listWarnings = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -698,53 +574,152 @@ namespace WebWindowComplex
|
||||
/// </summary>
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
bool updateSvg = false;
|
||||
// controllo elenchi BasePayload siano validi...
|
||||
if (ListPayload.IsValid())
|
||||
isLoading = true;
|
||||
// SOLO SE sono presenti...
|
||||
if (ListPayload.IsPopulated() && LiveData.IsValid())
|
||||
{
|
||||
// controllo sia popolato anche per la componente LIVE
|
||||
if (LiveData.IsValid())
|
||||
bool updateSvg = false;
|
||||
listErrPre = new Dictionary<string, string>();
|
||||
listErrLink = new Dictionary<string, string>();
|
||||
listWarnings = new Dictionary<string, string>();
|
||||
// controllo elenchi BasePayload siano validi...
|
||||
if (ListPayload.IsValid())
|
||||
{
|
||||
// SOLO SE modificato live data...
|
||||
if (prevLiveData == null || !prevLiveData.Equals(LiveData))
|
||||
// controllo sia popolato anche per la componente LIVE
|
||||
if (LiveData.IsValid())
|
||||
{
|
||||
prevLiveData = LiveData;
|
||||
m_CurrJwd = LiveData.CurrJwd;
|
||||
m_SelSVG = LiveData.SvgPreview;
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
setCurrWindow(WindowFromJson);
|
||||
//SOLO SE non sono in edit...
|
||||
if (!editLock)
|
||||
// SOLO SE modificato live data...
|
||||
if (prevLiveData == null || !prevLiveData.Equals(LiveData))
|
||||
{
|
||||
currStep = CompileStep.Tree;
|
||||
prevLiveData = new LivePayload()
|
||||
{
|
||||
CurrJwd = LiveData.CurrJwd,
|
||||
SvgPreview = LiveData.SvgPreview
|
||||
};
|
||||
m_SelSVG = LiveData.SvgPreview;
|
||||
// Aggiornati parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = new JsonWindow("", "", "", "");
|
||||
// provo a deserializzare
|
||||
try
|
||||
{
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(LiveData.CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
setCurrWindow(WindowFromJson);
|
||||
//SOLO SE non sono in edit...
|
||||
if (!editLock)
|
||||
{
|
||||
currStep = CompileStep.Tree;
|
||||
}
|
||||
}
|
||||
// altrimenti errore!
|
||||
catch (Exception ex)
|
||||
{
|
||||
listErrLink.Add("Window", $"Deserializing Error:{Environment.NewLine}{ex}");
|
||||
}
|
||||
|
||||
updateSvg = true;
|
||||
}
|
||||
checkWarnings();
|
||||
}
|
||||
else if (CurrSelection != null && CurrSelection.Template != null)
|
||||
{
|
||||
// Se viene passato il template selezionato oppure se non è ancora stato selezionato un template oppure se si cambia template di selezione
|
||||
if (m_SelTemplate == null || (m_SelTemplate != null && CurrSelection.Template.nIndex != m_SelTemplate.nIndex) && !string.IsNullOrEmpty(CurrSelection.Template.JWD))
|
||||
{
|
||||
m_SelTemplate = CurrSelection.Template;
|
||||
// Aggiornamento parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = new JsonWindow("", "", "", "");
|
||||
// provo a deserializzare
|
||||
try
|
||||
{
|
||||
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
setCurrWindow(WindowFromJson);
|
||||
currStep = CompileStep.Template;
|
||||
}
|
||||
// altrimenti errore!
|
||||
catch (Exception ex)
|
||||
{
|
||||
listErrLink.Add("Window", $"Deserializing Error:{Environment.NewLine}{ex}");
|
||||
}
|
||||
}
|
||||
updateSvg = true;
|
||||
}
|
||||
}
|
||||
else if (CurrSelection != null && CurrSelection.Template != null)
|
||||
{
|
||||
// Se viene passato il template selezionato oppure se non è ancora stato selezionato un template oppure se si cambia template di selezione
|
||||
if (m_SelTemplate == null || (m_SelTemplate != null && CurrSelection.Template.nIndex != m_SelTemplate.nIndex) && !string.IsNullOrEmpty(CurrSelection.Template.JWD))
|
||||
if (SashList.Count > 0)
|
||||
{
|
||||
m_SelTemplate = CurrSelection.Template;
|
||||
// Aggiornamento parametri di ingresso selezionati
|
||||
UpdateSelParameter();
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
|
||||
setCurrWindow(WindowFromJson);
|
||||
currStep = CompileStep.Template;
|
||||
currAnta = 0;
|
||||
}
|
||||
if (updateSvg)
|
||||
{
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
updateSvg = true;
|
||||
}
|
||||
if (SashList.Count > 0)
|
||||
currAnta = 0;
|
||||
|
||||
if (updateSvg)
|
||||
else
|
||||
{
|
||||
await DoPreviewSvg();
|
||||
checkErrorPre();
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica errori prelimionari per mostrare dove sia il problema
|
||||
/// </summary>
|
||||
private void checkErrorPre()
|
||||
{
|
||||
// verifico 1:1 le liste e indico cosa manca
|
||||
if (ListPayload.Hardware == null || ListPayload.Hardware.Count == 0)
|
||||
{
|
||||
listErrPre.Add("Hardware", "Missing Hardware List!");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ListPayload.FamilyHardware == null || ListPayload.FamilyHardware.Count == 0)
|
||||
{
|
||||
listErrPre.Add("FamilyHardware", "Missing Famly HW List!");
|
||||
}
|
||||
}
|
||||
if (ListPayload.Glass == null || ListPayload.Glass.Count == 0)
|
||||
{
|
||||
listErrPre.Add("Glass", "Missing Glass List!");
|
||||
}
|
||||
if (ListPayload.Material == null || ListPayload.Material.Count == 0)
|
||||
{
|
||||
listErrPre.Add("Material", "Missing Material List!");
|
||||
}
|
||||
if (ListPayload.ColorMaterial == null || ListPayload.ColorMaterial.Count == 0)
|
||||
{
|
||||
listErrPre.Add("ColorMaterial", "Missing ColorMaterial List!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica warning minori (es coerenza colori...)
|
||||
/// </summary>
|
||||
private void checkWarnings()
|
||||
{
|
||||
// verifico 1:1 le liste e i valori siano coerenti...
|
||||
if (ListPayload.ColorMaterial != null && ListPayload.ColorMaterial.Count > 0)
|
||||
{
|
||||
// verifico colore attuale sia consistente...
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
if (!ListPayload.ColorMaterial.Contains(m_CurrWindow.sColorMaterial))
|
||||
{
|
||||
listWarnings.Add("ColorMaterial", $"Missing Color: {m_CurrWindow.sColorMaterial}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola CSS warning
|
||||
/// </summary>
|
||||
/// <param name="fKey"></param>
|
||||
/// <returns></returns>
|
||||
protected string cssValid(string fKey)
|
||||
{
|
||||
return listWarnings.ContainsKey(fKey) ? "border border-danger" : "";
|
||||
}
|
||||
|
||||
protected void setCurrWindow(JsonWindow WindowFromJson)
|
||||
@@ -798,19 +773,10 @@ namespace WebWindowComplex
|
||||
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
|
||||
if (CurrSelection != null && CurrSelection.IsValid())
|
||||
{
|
||||
SelFamilyHardware = CurrSelection.FamilyHardware;
|
||||
SelFamilyHardware = CurrSelection.FamilyHardware ?? "";
|
||||
SelColorMaterial = CurrSelection.ColorMaterial ?? "";
|
||||
SelMaterial = CurrSelection.Material ?? "";
|
||||
SelGlass = CurrSelection.Glass ?? "";
|
||||
Sash.s_SelFamilyHW = CurrSelection.FamilyHardware ?? "";
|
||||
}
|
||||
else
|
||||
{
|
||||
// se ho elementi, seleziono la prima
|
||||
if (ListPayload.FamilyHardware.Count > 0)
|
||||
{
|
||||
Sash.s_SelFamilyHW = Sash.s_FamilyHardwareList.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -818,12 +784,40 @@ namespace WebWindowComplex
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool bError = false;
|
||||
|
||||
private int currAnta = 0;
|
||||
|
||||
private int currFill = -1;
|
||||
|
||||
private int currSash = -1;
|
||||
|
||||
private int currSplit = -1;
|
||||
|
||||
private CompileStep currStep;
|
||||
|
||||
private bool editLock = false;
|
||||
|
||||
/// <summary>
|
||||
/// Booleana fase loading
|
||||
/// </summary>
|
||||
private bool isLoading = false;
|
||||
|
||||
/// <summary>
|
||||
/// ELenco errori di coerenza/link dati (vanno risolti per disegnare/procedere)
|
||||
/// </summary>
|
||||
private Dictionary<string, string> listErrLink = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco errori preliminari (mancano elementi di base di validazione modello dati))
|
||||
/// </summary>
|
||||
private Dictionary<string, string> listErrPre = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco warnings non bloccanti
|
||||
/// </summary>
|
||||
private Dictionary<string, string> listWarnings = new Dictionary<string, string>();
|
||||
|
||||
private List<Fill> m_FillList = new List<Fill>();
|
||||
|
||||
private Frame? m_Frame;
|
||||
@@ -861,6 +855,11 @@ namespace WebWindowComplex
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void AddSashToFrame(Frame f)
|
||||
{
|
||||
bError = f.AddFirstSash();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per andare allo step successivo
|
||||
/// </summary>
|
||||
@@ -1099,7 +1098,7 @@ namespace WebWindowComplex
|
||||
/// Metodo per cambiare step e aggiornare preview svg
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo </param>
|
||||
private async void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
private void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
{
|
||||
editLock = true;
|
||||
currStep = newStep;
|
||||
@@ -1131,7 +1130,6 @@ namespace WebWindowComplex
|
||||
#if false
|
||||
await DoPreviewSvg();
|
||||
#endif
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1193,5 +1191,26 @@ namespace WebWindowComplex
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
private void SelectColor(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sColorMaterial = newVal;
|
||||
}
|
||||
}
|
||||
private void SelectMat(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sMaterial = newVal;
|
||||
}
|
||||
}
|
||||
private void SelectGlass(string newVal)
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.sGlass = newVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.717</Version>
|
||||
<Version>2.7.10.1012</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -18,7 +18,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
|
||||
@@ -87,6 +87,85 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+140
-193
@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Security.Cryptography;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using WebWindowComplex.Json;
|
||||
@@ -74,8 +75,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<Frame> m_AreaList = new ObservableCollection<Frame>();
|
||||
public ObservableCollection<Frame> AreaList
|
||||
private List<Frame> m_AreaList = new List<Frame>();
|
||||
public List<Frame> AreaList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -264,42 +265,72 @@ namespace WebWindowComplex
|
||||
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
public void AddSash()
|
||||
public bool AddFirstSash()
|
||||
{
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
bool answ = false;
|
||||
// Salvo il parent
|
||||
Area ParentArea = AreaList[0].ParentArea;
|
||||
// Salvo gli oggetti già presenti e li cancello da AreaList
|
||||
ContentArea.Add(AreaList[0]);
|
||||
AreaList.Remove(AreaList[0]);
|
||||
// Aggiungo Area sash di default
|
||||
// Creo area sash di default
|
||||
Sash SashArea = Sash.CreateSash(ParentArea);
|
||||
Sash.s_SelFamilyHW = Sash.s_FamilyHardwareList.First();
|
||||
SashArea.RefreshHardwareList();
|
||||
SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SashArea);
|
||||
if (SashArea.nSashQty == 1)
|
||||
// ricerco tra ttuti gli hw disponibili...
|
||||
string sShape = FindSashShape();
|
||||
var listHwValid = Sash
|
||||
.m_HardwareCompleteList
|
||||
.Where(x => x.Shape == sShape && x.SashQty == 1)
|
||||
.FirstOrDefault();
|
||||
if (listHwValid != null)
|
||||
{
|
||||
// Inserisco il riempimento precedente
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
AreaList[0].AreaList[0].SetParentArea(AreaList[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// All'area Sash aggiunto uno Splitted per ogni anta
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
// seleziono la famiglia del primo hw trovato...
|
||||
SashArea.SelFamilyHardware = listHwValid.FamilyName;
|
||||
SashArea.RefreshHardwareList();
|
||||
if (SashArea.HardwareList.Count == 0)
|
||||
{
|
||||
AreaList[0].AreaList.Add(Splitted.CreateSplitted(SashArea));
|
||||
SashArea.Remove();
|
||||
answ = true;
|
||||
}
|
||||
Fill fill2 = (Fill)ContentArea[0];
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
else
|
||||
{
|
||||
AreaList[0].AreaList[1].AreaList.Add(Fill.CreateFill(AreaList[0].AreaList[1], fill2.FillType));
|
||||
SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
|
||||
// Salvo gli oggetti già presenti e li cancello da AreaList
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
ContentArea.Add(AreaList[0]);
|
||||
AreaList.Remove(AreaList[0]);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SashArea);
|
||||
if (SashArea.nSashQty == 1)
|
||||
{
|
||||
// Inserisco il riempimento precedente
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
AreaList[0].AreaList[0].SetParentArea(AreaList[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// All'area Sash aggiunto uno Splitted per ogni anta
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
{
|
||||
AreaList[0].AreaList.Add(Splitted.CreateSplitted(SashArea));
|
||||
}
|
||||
Fill fill2 = (Fill)ContentArea[0];
|
||||
for (int i = 1; i < SashArea.nSashQty; i++)
|
||||
{
|
||||
AreaList[0].AreaList[1].AreaList.Add(Fill.CreateFill(AreaList[0].AreaList[1], fill2.FillType));
|
||||
}
|
||||
}
|
||||
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MockUp chiamata a c++ x scelta forma sash per Hw
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string FindSashShape()
|
||||
{
|
||||
return "Rectangular";
|
||||
}
|
||||
public void SwapAree()
|
||||
{
|
||||
Area tempArea;
|
||||
@@ -316,7 +347,8 @@ namespace WebWindowComplex
|
||||
|
||||
public class Frame : Area
|
||||
{
|
||||
private ObservableCollection<IdNameStruct> m_ShapeList = new ObservableCollection<IdNameStruct>
|
||||
|
||||
private List<IdNameStruct> m_ShapeList = new List<IdNameStruct>
|
||||
{
|
||||
new IdNameStruct((int)Shapes.RECTANGLE, "Rectangle"),
|
||||
new IdNameStruct((int)Shapes.RIGHTCHAMFER, "Right Chamfer"),
|
||||
@@ -327,7 +359,7 @@ namespace WebWindowComplex
|
||||
new IdNameStruct((int)Shapes.DOUBLEARC, "Double Arc"),
|
||||
new IdNameStruct((int)Shapes.TRIANGLE, "Triangle")
|
||||
};
|
||||
public ObservableCollection<IdNameStruct> ShapeList
|
||||
public List<IdNameStruct> ShapeList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -431,10 +463,6 @@ namespace WebWindowComplex
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -571,8 +599,8 @@ namespace WebWindowComplex
|
||||
m_Shape = Value;
|
||||
}
|
||||
|
||||
private ObservableCollection<FrameDimension> m_DimensionList = new ObservableCollection<FrameDimension>();
|
||||
public ObservableCollection<FrameDimension> DimensionList
|
||||
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();
|
||||
public List<FrameDimension> DimensionList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -580,8 +608,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<Joint> m_JointList = new ObservableCollection<Joint>();
|
||||
public ObservableCollection<Joint> JointList
|
||||
private List<Joint> m_JointList = new List<Joint>();
|
||||
public List<Joint> JointList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -681,8 +709,6 @@ namespace WebWindowComplex
|
||||
public static List<Hardware> m_HardwareCompleteList = new List<Hardware>();
|
||||
// Lista hardware completa passata dal chiamante del componente
|
||||
public static List<string> s_FamilyHardwareList = new List<string>();
|
||||
// Macro famiglia hardware scelta dal chiamante
|
||||
public static string s_SelFamilyHW = "";
|
||||
|
||||
public int nSashQty
|
||||
{
|
||||
@@ -940,8 +966,8 @@ namespace WebWindowComplex
|
||||
m_bIsMeasureGlass = IsMeasureGlass;
|
||||
}
|
||||
|
||||
private ObservableCollection<SashDimension> m_SashList = new ObservableCollection<SashDimension>();
|
||||
public ObservableCollection<SashDimension> SashList
|
||||
private List<SashDimension> m_SashList = new List<SashDimension>();
|
||||
public List<SashDimension> SashList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -970,8 +996,8 @@ namespace WebWindowComplex
|
||||
m_SashType = SashType;
|
||||
}
|
||||
|
||||
private ObservableCollection<Joint> m_JointList = new ObservableCollection<Joint>();
|
||||
public ObservableCollection<Joint> JointList
|
||||
private List<Joint> m_JointList = new List<Joint>();
|
||||
public List<Joint> JointList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1039,8 +1065,36 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<Hardware> m_HardwareList = new ObservableCollection<Hardware>();
|
||||
public ObservableCollection<Hardware> HardwareList
|
||||
private string m_SelFamilyHardware;
|
||||
public string SelFamilyHardware
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelFamilyHardware;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelFamilyHardware = value;
|
||||
RefreshHardwareList();
|
||||
RefreshHardwareOptionList();
|
||||
SetFirstHardware();
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
internal string SetSelFamilyHardwareFromIndex(string codHardware)
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_SelFamilyHardware))
|
||||
{
|
||||
SelFamilyHardware = (m_HardwareCompleteList
|
||||
.Where(x => x.Id == codHardware)
|
||||
.First()).FamilyName;
|
||||
}
|
||||
return SelFamilyHardware;
|
||||
}
|
||||
|
||||
private List<Hardware> m_HardwareList = new List<Hardware>();
|
||||
public List<Hardware> HardwareList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1138,29 +1192,23 @@ namespace WebWindowComplex
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
if (m_HardwareList.Count == 0)
|
||||
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", "", "", 0, 0);
|
||||
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
else
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", "", "", 0, 0);
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id.Equals(sId)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
if (m_SelHardware == null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
//SelFamilyHardware = m_SelHardware.FamilyName;
|
||||
}
|
||||
|
||||
public int SelHardwareTypeIndex
|
||||
public string SelHardwareFromId
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < m_HardwareList.Count; i++)
|
||||
{
|
||||
if (m_HardwareList[i].Equals(m_SelHardware))
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
//return IdNameStruct.IndFromId((int)m_SelHardware, m_HardwareList);
|
||||
return m_SelHardware.Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelHardware = m_HardwareList[value];
|
||||
//m_SelOpeningType = (Openings)IdNameStruct.IdFromInd(value, m_OpeningTypeList);
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => !string.IsNullOrEmpty(value) && x.Id.Equals(value)) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
ParentWindow.OnUpdatePreview(ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
@@ -1173,8 +1221,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<ParametriOpzioni> m_HwdOptionList = new ObservableCollection<ParametriOpzioni>();
|
||||
public ObservableCollection<ParametriOpzioni> HwdOptionList
|
||||
private List<ParametriOpzioni> m_HwdOptionList = new List<ParametriOpzioni>();
|
||||
public List<ParametriOpzioni> HwdOptionList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1199,6 +1247,7 @@ namespace WebWindowComplex
|
||||
newSash.JointList.Add(new Joint(newSash, JointIndex + 1, Joints.FULL_H));
|
||||
newSash.SetSashBottomRail(false);
|
||||
newSash.SetSashBottomRailQty(0);
|
||||
newSash.SelFamilyHardware = Sash.s_FamilyHardwareList.First();
|
||||
newSash.RefreshHardwareList();
|
||||
newSash.RefreshHardwareOptionList();
|
||||
newSash.SetFirstHardware();
|
||||
@@ -1209,109 +1258,75 @@ namespace WebWindowComplex
|
||||
return "Rectangular";
|
||||
}
|
||||
|
||||
internal OpeningTypes GetOpeningType(Openings OpeningType)
|
||||
internal Enums.OpeningTypes GetOpeningType(Openings OpeningType)
|
||||
{
|
||||
switch (OpeningType)
|
||||
{
|
||||
case Openings.TURNONLY_LEFT:
|
||||
case Openings.TURNONLY_RIGHT:
|
||||
{
|
||||
return OpeningTypes.TURNONLY;
|
||||
return Enums.OpeningTypes.TurnOnly;
|
||||
}
|
||||
|
||||
case Openings.TILTTURN_LEFT:
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
{
|
||||
return OpeningTypes.TILTTURN;
|
||||
return Enums.OpeningTypes.TiltTurn;
|
||||
}
|
||||
|
||||
case Openings.TILTONLY_TOP:
|
||||
case Openings.TILTONLY_BOTTOM:
|
||||
{
|
||||
return OpeningTypes.TILTONLY;
|
||||
return Enums.OpeningTypes.TiltOnly;
|
||||
}
|
||||
|
||||
case Openings.PIVOT:
|
||||
{
|
||||
return OpeningTypes.PIVOT;
|
||||
return Enums.OpeningTypes.Pivot;
|
||||
}
|
||||
|
||||
case Openings.FIXED:
|
||||
{
|
||||
return OpeningTypes.FIXED;
|
||||
return Enums.OpeningTypes.Fixed;
|
||||
}
|
||||
|
||||
case Openings.COMPLANARSLIDE_LEFT:
|
||||
case Openings.COMPLANARSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningTypes.COMPLANARSLIDE;
|
||||
return Enums.OpeningTypes.ComplanarSlide;
|
||||
}
|
||||
|
||||
case Openings.LIFTSLIDE_LEFT:
|
||||
case Openings.LIFTSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningTypes.LIFTSLIDE;
|
||||
return Enums.OpeningTypes.LiftSlide;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return OpeningTypes.NULL;
|
||||
return Enums.OpeningTypes.Null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string ConvertOpeningType()
|
||||
private Enums.OpeningTypes ConvertOpeningType()
|
||||
{
|
||||
var answ = Enums.OpeningTypes.Null;
|
||||
if (m_SashList.Count > 1)
|
||||
{
|
||||
for (int i = 0; i < m_SashList.Count; i++)
|
||||
{
|
||||
if (m_SashList[i].bHasHandle)
|
||||
{
|
||||
if (GetOpeningType(m_SashList[i].OpeningType) == OpeningTypes.TURNONLY)
|
||||
return "ANTA_BANDIERA";
|
||||
else
|
||||
return "ANTA_RIBALTA";
|
||||
answ = GetOpeningType(m_SashList[i].OpeningType);
|
||||
}
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
else if (m_SashList.Count == 1)
|
||||
else
|
||||
{
|
||||
switch (GetOpeningType(m_SashList[0].OpeningType))
|
||||
{
|
||||
case OpeningTypes.TILTTURN:
|
||||
{
|
||||
return "ANTA_RIBALTA";
|
||||
}
|
||||
case OpeningTypes.TURNONLY:
|
||||
{
|
||||
return "ANTA_BANDIERA";
|
||||
}
|
||||
case OpeningTypes.TILTONLY:
|
||||
{
|
||||
return "VASISTAS";
|
||||
}
|
||||
case OpeningTypes.PIVOT:
|
||||
{
|
||||
return "PIVOT";
|
||||
}
|
||||
case OpeningTypes.COMPLANARSLIDE:
|
||||
{
|
||||
return "COMPLANARE";
|
||||
}
|
||||
case OpeningTypes.LIFTSLIDE:
|
||||
{
|
||||
return "ALZANTE_SCORREVOLE";
|
||||
}
|
||||
default:
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
answ = GetOpeningType(m_SashList[0].OpeningType);
|
||||
}
|
||||
return "";
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void RefreshHardwareList()
|
||||
@@ -1320,26 +1335,21 @@ namespace WebWindowComplex
|
||||
{
|
||||
m_HardwareList.Clear();
|
||||
string sSashShape = FindSashShape();
|
||||
string sOpeningType = ConvertOpeningType();
|
||||
Enums.OpeningTypes sOpeningType = ConvertOpeningType();
|
||||
var iComp = StringComparison.InvariantCultureIgnoreCase;
|
||||
var rawList = m_HardwareCompleteList
|
||||
.Where(x => x.Id == "000000" ||
|
||||
(!string.IsNullOrEmpty(s_SelFamilyHW) && x.FamilyName.Equals(s_SelFamilyHW, iComp) && x.SashQty == nSashQty && x.Shape.Equals(sSashShape, iComp) && x.OpeningType.Equals(sOpeningType, iComp))
|
||||
)
|
||||
.ToList();
|
||||
.Where(x => x.Id == "000000" ||
|
||||
(!string.IsNullOrEmpty(m_SelFamilyHardware) && x.FamilyName.Equals(m_SelFamilyHardware, iComp) && x.SashQty == nSashQty && x.Shape.Equals(sSashShape, iComp) && x.OpeningType == sOpeningType)
|
||||
)
|
||||
.ToList();
|
||||
if (rawList != null && rawList.Count > 0)
|
||||
{
|
||||
m_HardwareList = new ObservableCollection<Hardware>(rawList);
|
||||
m_HardwareList = new List<Hardware>(rawList);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_HardwareList = new ObservableCollection<Hardware>();
|
||||
m_HardwareList = new List<Hardware>();
|
||||
}
|
||||
#if false
|
||||
m_HardwareList = new ObservableCollection<Hardware>(from Hardware in m_HardwareCompleteList
|
||||
where Hardware.Id == "000000" || (Hardware.FamilyName == s_SelFamilyHW && Hardware.SashQty == nSashQty && Hardware.Shape == sSashShape && Hardware.OpeningType == sOpeningType)
|
||||
select Hardware);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1388,6 +1398,7 @@ namespace WebWindowComplex
|
||||
newSash.SetIsSashVertical(bIsSashVertical);
|
||||
newSash.SetOrientationSashType(OrientationSashType);
|
||||
newSash.SetSashBottomRailQty(SashBottomRailQty);
|
||||
newSash.SetSelFamilyHardwareFromIndex(SelHardware.Id);
|
||||
newSash.RefreshHardwareList();
|
||||
newSash.RefreshHardwareOptionList();
|
||||
newSash.SetSelHardware(SelHardware);
|
||||
@@ -1681,14 +1692,14 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<IdNameStruct> m_SplitShapeList = new ObservableCollection<IdNameStruct>
|
||||
private List<IdNameStruct> m_SplitShapeList = new List<IdNameStruct>
|
||||
{
|
||||
new IdNameStruct((int)SplitShapes.VERTICAL, "Vertical"),
|
||||
new IdNameStruct((int)SplitShapes.HORIZONTAL, "Horizontal"),
|
||||
new IdNameStruct((int)SplitShapes.GRID, "Grid"),
|
||||
new IdNameStruct((int)SplitShapes.CUSTOM, "Custom")
|
||||
};
|
||||
public ObservableCollection<IdNameStruct> SplitShapeList
|
||||
public List<IdNameStruct> SplitShapeList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1763,8 +1774,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitPositionList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitPositionList
|
||||
private List<SplitDimension> m_SplitPositionList = new List<SplitDimension>();
|
||||
public List<SplitDimension> SplitPositionList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1776,8 +1787,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitVertList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitVertList
|
||||
private List<SplitDimension> m_SplitVertList = new List<SplitDimension>();
|
||||
public List<SplitDimension> SplitVertList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1789,8 +1800,8 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitHorizList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitHorizList
|
||||
private List<SplitDimension> m_SplitHorizList = new List<SplitDimension>();
|
||||
public List<SplitDimension> SplitHorizList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1915,6 +1926,7 @@ namespace WebWindowComplex
|
||||
return m_FillTypeList;
|
||||
}
|
||||
}
|
||||
|
||||
private FillTypes m_SelFillType;
|
||||
public FillTypes SelFillType
|
||||
{
|
||||
@@ -2750,23 +2762,6 @@ namespace WebWindowComplex
|
||||
return Name;
|
||||
}
|
||||
|
||||
public static int IndFromId(int Id, ObservableCollection<IdNameStruct> List)
|
||||
{
|
||||
checked
|
||||
{
|
||||
int num = List.Count - 1;
|
||||
for (int i = 0; i <= num; i++)
|
||||
{
|
||||
if (List[i].Id == Id)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int IndFromId(int Id, List<IdNameStruct> List)
|
||||
{
|
||||
checked
|
||||
@@ -2784,33 +2779,11 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public static int IdFromInd(int Ind, ObservableCollection<IdNameStruct> List)
|
||||
{
|
||||
return List[Ind].Id;
|
||||
}
|
||||
|
||||
public static int IdFromInd(int Ind, List<IdNameStruct> List)
|
||||
{
|
||||
return List[Ind].Id;
|
||||
}
|
||||
|
||||
public static int IndFromId(int Id, ObservableCollection<object> List)
|
||||
{
|
||||
checked
|
||||
{
|
||||
int num = List.Count - 1;
|
||||
for (int i = 0; i <= num; i++)
|
||||
{
|
||||
if (List[i] is IdNameStruct && ((IdNameStruct)List[i]).Id == Id)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int IndFromId(int Id, List<object> List)
|
||||
{
|
||||
checked
|
||||
@@ -2828,16 +2801,6 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public static int IdFromInd(int Ind, ObservableCollection<object> List)
|
||||
{
|
||||
if (List[Ind] is IdNameStruct)
|
||||
{
|
||||
return ((IdNameStruct)List[Ind]).Id;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int IdFromInd(int Ind, List<object> List)
|
||||
{
|
||||
if (List[Ind] is IdNameStruct)
|
||||
@@ -2848,22 +2811,6 @@ namespace WebWindowComplex
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int IdFromName(string Name, ObservableCollection<object> List)
|
||||
{
|
||||
checked
|
||||
{
|
||||
int num = List.Count - 1;
|
||||
for (int i = 0; i <= num; i++)
|
||||
{
|
||||
if (string.Compare(((IdNameStruct)List[i]).Name, Name, false) == 0)
|
||||
{
|
||||
return ((IdNameStruct)List[i]).Id;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int IdFromName(string Name, List<object> List)
|
||||
{
|
||||
checked
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.717</Version>
|
||||
<Version>2.7.10.1012</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -26,7 +26,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
|
||||
@@ -102,6 +102,109 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.218" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10-beta.915" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.19" />
|
||||
|
||||
+46
-83
@@ -136,7 +136,7 @@ namespace WebWindowTest
|
||||
}
|
||||
|
||||
private int m_IdGroup;
|
||||
public int IdGroup
|
||||
public int IdGroup
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -146,7 +146,7 @@ namespace WebWindowTest
|
||||
set
|
||||
{
|
||||
m_IdGroup = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void SetIdGroup(int nIdGroup)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ namespace WebWindowTest
|
||||
SashArea.SetSelHardwareFromId(SashArea.HardwareList.First().Id);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SashArea);
|
||||
if(SashArea.nSashQty == 1)
|
||||
if (SashArea.nSashQty == 1)
|
||||
{
|
||||
// Inserisco il riempimento precedente
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
@@ -303,7 +303,7 @@ namespace WebWindowTest
|
||||
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];
|
||||
@@ -710,12 +710,12 @@ namespace WebWindowTest
|
||||
// aggiungo area Sash di default
|
||||
for (var SplitIndex = m_SashList.Count; SplitIndex <= value - 1; SplitIndex++)
|
||||
{
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this, SplitIndex+1));
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this, SplitIndex + 1));
|
||||
}
|
||||
}
|
||||
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)
|
||||
@@ -725,7 +725,7 @@ namespace WebWindowTest
|
||||
}
|
||||
dLastDimension += m_SashList[SashList.Count - 1].dDimension;
|
||||
SashList[SashList.Count - 1].SetDimension(dLastDimension);
|
||||
if(value == 1)
|
||||
if (value == 1)
|
||||
SashList[0].SetHasHandle(true);
|
||||
}
|
||||
else
|
||||
@@ -733,7 +733,7 @@ namespace WebWindowTest
|
||||
SashList.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
if(m_SashList.Count == 0)
|
||||
if (m_SashList.Count == 0)
|
||||
{
|
||||
Area child = AreaList[0];
|
||||
// Se nella singola anta ho uno split
|
||||
@@ -774,7 +774,7 @@ namespace WebWindowTest
|
||||
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
|
||||
@@ -829,7 +829,7 @@ namespace WebWindowTest
|
||||
}
|
||||
internal void SetSashQty(int Qty)
|
||||
{
|
||||
if(Qty >= 0 && Qty <= 4)
|
||||
if (Qty >= 0 && Qty <= 4)
|
||||
{
|
||||
if (Qty > m_SashList.Count)
|
||||
{
|
||||
@@ -902,7 +902,7 @@ namespace WebWindowTest
|
||||
set
|
||||
{
|
||||
m_SelOrientationSashType = (OrientationSash)IdNameStruct.IdFromInd(value, m_OrientationSashTypeList);
|
||||
if(value == 0)
|
||||
if (value == 0)
|
||||
{
|
||||
m_bIsSashVertical = true;
|
||||
}
|
||||
@@ -1026,7 +1026,7 @@ namespace WebWindowTest
|
||||
set
|
||||
{
|
||||
// Controllo che il valore inserito sia positivo
|
||||
if(value >= 0)
|
||||
if (value >= 0)
|
||||
{
|
||||
m_nSashBottomRailQty = value;
|
||||
if (m_nSashBottomRailQty > 0)
|
||||
@@ -1153,12 +1153,12 @@ namespace WebWindowTest
|
||||
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
if(m_HardwareList.Count == 0)
|
||||
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", "", "", 0, 0);
|
||||
if (m_HardwareList.Count == 0)
|
||||
m_SelHardware = m_HardwareCompleteList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
else
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id == sId)?? new Hardware("","","","","",0,0);
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", Enums.OpeningTypes.Null, "", 0, 0);
|
||||
if (m_SelHardware == null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
}
|
||||
|
||||
public int SelHardwareTypeIndex
|
||||
@@ -1224,123 +1224,86 @@ namespace WebWindowTest
|
||||
{
|
||||
return "Rectangular";
|
||||
}
|
||||
|
||||
internal OpeningTypes GetOpeningType(Openings OpeningType)
|
||||
internal Enums.OpeningTypes GetOpeningType(Openings OpeningType)
|
||||
{
|
||||
switch (OpeningType)
|
||||
{
|
||||
case Openings.TURNONLY_LEFT:
|
||||
case Openings.TURNONLY_RIGHT:
|
||||
{
|
||||
return OpeningTypes.TURNONLY;
|
||||
return Enums.OpeningTypes.TurnOnly;
|
||||
}
|
||||
|
||||
case Openings.TILTTURN_LEFT:
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
{
|
||||
return OpeningTypes.TILTTURN;
|
||||
return Enums.OpeningTypes.TiltTurn;
|
||||
}
|
||||
|
||||
case Openings.TILTONLY_TOP:
|
||||
case Openings.TILTONLY_BOTTOM:
|
||||
{
|
||||
return OpeningTypes.TILTONLY;
|
||||
return Enums.OpeningTypes.TiltOnly;
|
||||
}
|
||||
|
||||
case Openings.PIVOT:
|
||||
{
|
||||
return OpeningTypes.PIVOT;
|
||||
return Enums.OpeningTypes.Pivot;
|
||||
}
|
||||
|
||||
case Openings.FIXED:
|
||||
{
|
||||
return OpeningTypes.FIXED;
|
||||
return Enums.OpeningTypes.Fixed;
|
||||
}
|
||||
|
||||
case Openings.COMPLANARSLIDE_LEFT:
|
||||
case Openings.COMPLANARSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningTypes.COMPLANARSLIDE;
|
||||
return Enums.OpeningTypes.ComplanarSlide;
|
||||
}
|
||||
|
||||
case Openings.LIFTSLIDE_LEFT:
|
||||
case Openings.LIFTSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningTypes.LIFTSLIDE;
|
||||
return Enums.OpeningTypes.LiftSlide;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return OpeningTypes.NULL;
|
||||
return Enums.OpeningTypes.Null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string ConvertOpeningType()
|
||||
private Enums.OpeningTypes ConvertOpeningType()
|
||||
{
|
||||
if(m_SashList.Count > 1)
|
||||
var answ = Enums.OpeningTypes.Null;
|
||||
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)
|
||||
{
|
||||
if (GetOpeningType(m_SashList[i].OpeningType) == OpeningTypes.TURNONLY)
|
||||
return "ANTA_BANDIERA";
|
||||
else
|
||||
return "ANTA_RIBALTA";
|
||||
answ = GetOpeningType(m_SashList[i].OpeningType);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
else if (m_SashList.Count > 0)
|
||||
else
|
||||
{
|
||||
switch (GetOpeningType(m_SashList[0].OpeningType))
|
||||
{
|
||||
case OpeningTypes.TILTTURN:
|
||||
{
|
||||
return "ANTA_RIBALTA";
|
||||
}
|
||||
case OpeningTypes.TURNONLY:
|
||||
{
|
||||
return "ANTA_BANDIERA";
|
||||
}
|
||||
case OpeningTypes.TILTONLY:
|
||||
{
|
||||
return "VASISTAS";
|
||||
}
|
||||
case OpeningTypes.PIVOT:
|
||||
{
|
||||
return "PIVOT";
|
||||
}
|
||||
|
||||
case OpeningTypes.COMPLANARSLIDE:
|
||||
{
|
||||
return "COMPLANARE";
|
||||
}
|
||||
|
||||
case OpeningTypes.LIFTSLIDE:
|
||||
{
|
||||
return "ALZANTE_SCORREVOLE";
|
||||
}
|
||||
default:
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
answ = GetOpeningType(m_SashList[0].OpeningType);
|
||||
}
|
||||
return "";
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void RefreshHardwareList()
|
||||
{
|
||||
m_HardwareList.Clear();
|
||||
string sSashShape = FindSashShape();
|
||||
string sOpeningType = ConvertOpeningType();
|
||||
Enums.OpeningTypes sOpeningType = ConvertOpeningType();
|
||||
var iComp = StringComparison.InvariantCultureIgnoreCase;
|
||||
var rawList = m_HardwareCompleteList
|
||||
.Where(x => x.Id == "000000" ||
|
||||
(x.FamilyName.Equals(s_SelFamilyHW, iComp) && x.SashQty == nSashQty && x.Shape.Equals(sSashShape, iComp) && x.OpeningType.Equals(sOpeningType, iComp))
|
||||
(x.FamilyName.Equals(s_SelFamilyHW, iComp) && x.SashQty == nSashQty && x.Shape.Equals(sSashShape, iComp) && x.OpeningType.Equals(sOpeningType))
|
||||
)
|
||||
.ToList();
|
||||
if (rawList != null && rawList.Count > 0)
|
||||
@@ -1401,12 +1364,12 @@ namespace WebWindowTest
|
||||
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)
|
||||
{
|
||||
@@ -1836,7 +1799,7 @@ namespace WebWindowTest
|
||||
newSplit.SetSplitQtyHoriz(nSplitQtyHoriz);
|
||||
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);
|
||||
@@ -2064,7 +2027,7 @@ namespace WebWindowTest
|
||||
|
||||
public Joint Copy()
|
||||
{
|
||||
Joint newJoint = new Joint(ParentArea,nIndex, SelJointType);
|
||||
Joint newJoint = new Joint(ParentArea, nIndex, SelJointType);
|
||||
return newJoint;
|
||||
}
|
||||
|
||||
@@ -2165,7 +2128,7 @@ namespace WebWindowTest
|
||||
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("", "");
|
||||
m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente) ?? new AGBOptionParameter("", "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2295,7 +2258,7 @@ namespace WebWindowTest
|
||||
{
|
||||
// reference
|
||||
private Sash m_Parent;
|
||||
|
||||
|
||||
private int m_nSashId;
|
||||
public int nSashId
|
||||
{
|
||||
@@ -2626,7 +2589,7 @@ namespace WebWindowTest
|
||||
List<SplitDimension> RelativeDimList = new List<SplitDimension>();
|
||||
if (bIsVertListDim)
|
||||
RelativeDimList = m_Parent.SplitVertList.Where(x => x.bIsRelative).ToList();
|
||||
else
|
||||
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();
|
||||
@@ -2671,7 +2634,7 @@ namespace WebWindowTest
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
}
|
||||
dRes = (100 - dRes);
|
||||
if(dRes != 0)
|
||||
if (dRes != 0)
|
||||
RelativeDimList[nIndex - 1].SetDimension(dRes);
|
||||
else
|
||||
return;
|
||||
@@ -2690,8 +2653,8 @@ namespace WebWindowTest
|
||||
}
|
||||
m_dDimension = value;
|
||||
m_Parent.ParentWindow.OnUpdatePreview(m_Parent.ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
internal void SetDimension(double dValue)
|
||||
|
||||
Reference in New Issue
Block a user