diff --git a/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor b/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor index 0668ec9..c49079b 100644 --- a/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor +++ b/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor @@ -1,4 +1,5 @@  +
diff --git a/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor b/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor index 0668ec9..6d86d0f 100644 --- a/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor +++ b/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor @@ -1,27 +1,27 @@  - - -
- @foreach (var item in TextData) - { -
- @item.Key -
-
- @item.Value -
- } + + + + + + + + + + +
+
+ @TitleText +
+
+ @BodyText +
+
+ +
- - - - - - - - - - diff --git a/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor.cs b/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor.cs index 465c2e4..79f3c92 100644 --- a/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor.cs +++ b/WebDoorCreator.UI/Components/SvgComp/HomeCard.razor.cs @@ -6,17 +6,26 @@ namespace WebDoorCreator.UI.Components.SvgComp { #region Public Properties + [Parameter] + public string BodyStyle { get; set; } = "font-size: 2em;"; + + [Parameter] + public string BodyText { get; set; } = "Body Text"; + + [Parameter] + public string ButtonText { get; set; } = "Button Text"; + [Parameter] public EventCallback EC_ExeFunct { get; set; } [Parameter] - public string ImagePath { get; set; } = "images/LogoEgw.png"; + public string ImagePath { get; set; } = "images/DOORBG.png"; [Parameter] - public string LineColor { get; set; } = "#00838F"; + public string LineColor { get; set; } = "#3989CC"; [Parameter] - public int LineWidth { get; set; } = 8; + public int LineWidth { get; set; } = 16; [Parameter] public int ObjH { get; set; } = 204; @@ -28,41 +37,55 @@ namespace WebDoorCreator.UI.Components.SvgComp public int ObjW { get; set; } = 450; [Parameter] - public Dictionary TextData { get; set; } = new Dictionary(); + public int StartPoint { get; set; } = 220; [Parameter] - public string TextStyle { get; set; } = "font-size: 1.5em; fill: #000;"; + public string TitleStyle { get; set; } = "font-size: 5em;"; [Parameter] - public string Message1 { get; set; } = ""; - [Parameter] - public string Message2 { get; set; } = ""; - - [Parameter] - public string LeftTextClass { get; set; } = ""; - [Parameter] - public string RightTextClass { get; set; } = ""; + public string TitleText { get; set; } = "Title Text"; #endregion Public Properties #region Protected Properties - protected LineData BaseLine { get; set; } = null!; + protected List PathClip { get; set; } = null!; - protected CircleData CircleImg { get; set; } = null!; - - protected CircleData CircleLine { get; set; } = null!; - - protected int LineDist { get; set; } = 20; - - protected int TextAreaHeight + protected string PathClipData { - get => (ObjH * 96 / 100); + get + { + //string path = $"{PathLineData} L1200,0 L1920,0 L1920,1080 L900,1080 Z"; + string path = PathLineData; + if (pathClipCloseList.Count > 0) + { + for (int i = 0; i < pathClipCloseList.Count; i++) + { + path += $" L{pathClipCloseList[i].px},{pathClipCloseList[i].py}"; + } + } + path += " Z"; + return path; + } } - protected int TextAreaWidth + protected List PathLine { get; set; } = null!; + + protected string PathLineData { - get => ObjW - (ObjH * 120 / 100); + get + { + string path = ""; + if (pathPointList.Count > 0) + { + path = $"M{pathPointList[0].px},{pathPointList[0].py} Q"; + for (int i = 1; i < pathPointList.Count; i++) + { + path += $" {pathPointList[i].px},{pathPointList[i].py}"; + } + } + return path; + } } #endregion Protected Properties @@ -79,52 +102,32 @@ namespace WebDoorCreator.UI.Components.SvgComp setupGraphParams(); } + protected void setupGraphParams() + { + // calcolo i dati necessari a disegnare + int deltaX = 20; + int deltaY = 400; + // inizio aggiungendo punti parametrici + pathPointList.Add(new PointData(StartPoint, ObjH)); + pathPointList.Add(new PointData(StartPoint + deltaX, ObjH - deltaY)); + pathPointList.Add(new PointData(ObjW / 2, ObjH / 2)); + pathPointList.Add(new PointData(ObjW - (StartPoint + deltaX), deltaY)); + pathPointList.Add(new PointData(ObjW - StartPoint, 0)); + // ora provvedo x la parte clip + pathClipCloseList.Add(new PointData(ObjW - StartPoint, 0)); + pathClipCloseList.Add(new PointData(ObjW, 0)); + pathClipCloseList.Add(new PointData(ObjW, ObjH)); + pathClipCloseList.Add(new PointData(StartPoint, ObjH)); + + } + + protected List pathPointList = new List(); + protected List pathClipCloseList = new List(); + #endregion Protected Methods #region Protected Classes - protected class CircleData - { - #region Public Constructors - - public CircleData(int px, int py, int radius) - { - cx = px; - cy = py; - rad = radius; - } - - #endregion Public Constructors - - #region Public Properties - - public int cx { get; set; } = 0; - public int cy { get; set; } = 0; - public int rad { get; set; } = 100; - - #endregion Public Properties - } - - protected class LineData - { - #region Public Constructors - - public LineData(PointData pA, PointData pB) - { - p1 = pA; - p2 = pB; - } - - #endregion Public Constructors - - #region Public Properties - - public PointData p1 { get; set; } - public PointData p2 { get; set; } - - #endregion Public Properties - } - protected class PointData { #region Public Constructors @@ -146,18 +149,5 @@ namespace WebDoorCreator.UI.Components.SvgComp } #endregion Protected Classes - - #region Private Methods - - private void setupGraphParams() - { - // calcolo i dati del cerchi... - CircleLine = new CircleData(ObjW - LineWidth - (ObjH / 2), ObjH / 2, (ObjH - LineWidth) / 2); - CircleImg = new CircleData(ObjW - LineWidth - (ObjH / 2), ObjH / 2, (ObjH - 2 * LineWidth) / 2); - BaseLine = new LineData(new PointData(0, ObjH - LineWidth / 2), new PointData(ObjW - LineWidth - (ObjH / 2), ObjH - LineWidth / 2)); - LineDist = ObjH / 4; - } - - #endregion Private Methods } } \ No newline at end of file diff --git a/WebDoorCreator.UI/Pages/Index.razor b/WebDoorCreator.UI/Pages/Index.razor index baa924b..fc1637b 100644 --- a/WebDoorCreator.UI/Pages/Index.razor +++ b/WebDoorCreator.UI/Pages/Index.razor @@ -2,8 +2,7 @@ Index -
-
-
Web Door Creator
-
-
\ No newline at end of file + +
+ +
diff --git a/WebDoorCreator.UI/temp/Conf.yaml b/WebDoorCreator.UI/temp/Conf.yaml index c93667b..b62a767 100644 --- a/WebDoorCreator.UI/temp/Conf.yaml +++ b/WebDoorCreator.UI/temp/Conf.yaml @@ -15,12 +15,12 @@ order: date: 2023-05-10T00:00:00.0000000Z piece: DO_1 properties: Oak -finishing: Veneer +finishing: Varnishing size: - width: 33.81 - height: 81 + width: 33.8125 + height: 81.25 thickness: 1.75 -swing: RHRI +swing: LH secure: UP material: wood profiles: @@ -41,22 +41,10 @@ profiles: machining: ON overmaterial: 0.1 hardware: - flush_pulls: - - template: Generic\Circle - position: 35 - back_set: 6 - depth: 1 - face: secure - - template: Generic\Circle - position: 35 - back_set: 5 - depth: 1 - face: secure - - template: Generic\Circle - position: 35 - back_set: 5 - depth: 1 - face: secure + ept: + - template: Generic\StdEPT + ToptoCL: 15 + FacetoCL: 0.875 ---