-
Area split @(CurrSplittedList.Count > 1 ? (CurrSplittedList.IndexOf(CurrSplitted) + 1) : "")
+
+
Area split @(SplittedList.Count > 1 ? (SplittedList.IndexOf(CurrSplitted) + 1) : "")
-
+
- @for (int j = 0; j < CurrSashList.Count; j++)
+ @for (int j = 0; j < SashList.Count; j++)
{
int Index = j;
-
+
}
diff --git a/WebWindowComplex/Compo/AreaSplit.razor.cs b/WebWindowComplex/Compo/AreaSplit.razor.cs
index 61e8cac..aba53c8 100644
--- a/WebWindowComplex/Compo/AreaSplit.razor.cs
+++ b/WebWindowComplex/Compo/AreaSplit.razor.cs
@@ -12,80 +12,56 @@ namespace WebWindowComplex.Compo
/// Lista delle sash
///
[Parameter]
- public List
CurrSashList { get; set; } = null;
+ public List SashList { get; set; } = null!;
///
/// Oggetto splitted corrente
///
[Parameter]
- public Splitted CurrSplitted { get; set; } = null;
+ public Splitted CurrSplitted { get; set; } = null!;
///
/// Lista degli Splitted
///
[Parameter]
- public List CurrSplittedList { get; set; } = null;
-
- ///
- /// Evento per copiare Sash
- ///
- [Parameter]
- public EventCallback EC_CopySash { get; set; }
+ public List SplittedList { get; set; } = null!;
///
/// Evento per aggiungere Sash
///
[Parameter]
- public EventCallback EC_AddSash { get; set; }
+ public EventCallback EC_UpdateSplitted { get; set; }
#endregion Public Properties
#region Private Methods
///
- /// Sollevo evento richiesta copia sash
+ /// Metodo per copiare sash
///
///
- private async Task RaiseCopySash(Splitted item, int indexCurrSash)
+ private async Task RaiseCopySash(int indexCurrSash)
{
- var Args = new DataAreaSplit
- {
- splitted = item,
- index = indexCurrSash,
- };
- await EC_CopySash.InvokeAsync(Args);
+ //Rimuovo contenuto di Splitted e rimuovo area da conteggio gruppi
+ CurrSplitted.AreaList.RemoveAll(i => i != null);
+ // Copio sash
+ Area a = SashList[indexCurrSash].Copy(CurrSplitted);
+ a.SetParentArea(CurrSplitted);
+ // Aggiungo copia a Splitted
+ CurrSplitted.AreaList.Add(a);
+ await EC_UpdateSplitted.InvokeAsync(CurrSplitted);
}
///
- /// Sollevo evento richiesta copia sash
+ /// Metodo per aggiungere prima sash
///
///
- private async Task RaiseAddSash(Splitted item)
+ private async Task RaiseAddSash()
{
- var Args = new DataAreaSplitted
- {
- splitted = item
- };
- await EC_AddSash.InvokeAsync(Args);
+ CurrSplitted.AddFirstSash();
+ await EC_UpdateSplitted.InvokeAsync(CurrSplitted);
}
+
#endregion Private Methods
-
- }
-
- ///
- /// Classe per raggruppare oggetti che servono per copiare Sash
- ///
- public class DataAreaSplit
- {
- public Splitted splitted { get; set; }
- public int index { get; set; }
- }
-
- ///
- /// Classe per raggruppare oggetti che servono per aggiungere Sash
- ///
- public class DataAreaSplitted
- {
- public Splitted splitted { get; set; }
}
}
\ No newline at end of file
diff --git a/WebWindowComplex/Compo/CardArcElement.razor b/WebWindowComplex/Compo/CardArcElement.razor
new file mode 100644
index 0000000..e29174e
--- /dev/null
+++ b/WebWindowComplex/Compo/CardArcElement.razor
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+ @foreach (var sashGroup in SashList)
+ {
+
+
+
+ }
+
+
+
\ No newline at end of file
diff --git a/WebWindowComplex/Compo/CardArcElement.razor.cs b/WebWindowComplex/Compo/CardArcElement.razor.cs
new file mode 100644
index 0000000..6d9646a
--- /dev/null
+++ b/WebWindowComplex/Compo/CardArcElement.razor.cs
@@ -0,0 +1,60 @@
+using Microsoft.AspNetCore.Components;
+using WebWindowComplex.DTO;
+using WebWindowComplex.Models;
+
+namespace WebWindowComplex.Compo
+{
+ public partial class CardArcElement
+ {
+ #region Public Properties
+
+ ///
+ /// Frame corrente
+ ///
+ [Parameter]
+ public Frame CurrFrame { get; set; } = null!;
+
+ ///
+ /// Lista sash group
+ ///
+ [Parameter]
+ public List SashList { get; set; } = null!;
+
+ [Parameter]
+ public EventCallback EC_UpdatePreview { get; set; }
+
+ [Parameter]
+ public EventCallback EC_ReqClose { get; set; }
+
+ #endregion Public Properties
+
+ private async Task UpdatePreview()
+ {
+ var args = new DataUpdateFrame
+ {
+ currFrame = CurrFrame
+ };
+ await EC_UpdatePreview.InvokeAsync(args);
+ }
+
+ private async Task UpdatePreviewSash(Sash CurrSashGRoup)
+ {
+ var currRec = SashList.First(x => x.GroupId == CurrSashGRoup.GroupId);
+ if (currRec != null)
+ {
+ currRec = CurrSashGRoup;
+ var args = new DataUpdateFrame
+ {
+ currFrame = CurrFrame
+ };
+ await EC_UpdatePreview.InvokeAsync(args);
+ }
+ }
+
+ private void ReqClose()
+ {
+ _ = EC_ReqClose.InvokeAsync(true);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/WebWindowComplex/Compo/CardFill.razor b/WebWindowComplex/Compo/CardFill.razor
index 5d40cd8..8f357f6 100644
--- a/WebWindowComplex/Compo/CardFill.razor
+++ b/WebWindowComplex/Compo/CardFill.razor
@@ -1,7 +1,7 @@

-@foreach (var currSplitted in SplittedList)
+@* @foreach (var currSplitted in SplittedList)
{
- @if (currSplitted.AreaList.First().Equals(CurrItem))
+ @if (currSplitted.AreaList.First().Equals(CurrFill))
{
-
}
-}
-
+} *@
diff --git a/WebWindowComplex/Compo/CardFill.razor.cs b/WebWindowComplex/Compo/CardFill.razor.cs
index 1ec78ca..7b5c001 100644
--- a/WebWindowComplex/Compo/CardFill.razor.cs
+++ b/WebWindowComplex/Compo/CardFill.razor.cs
@@ -18,31 +18,13 @@ namespace WebWindowComplex.Compo
/// Fill corrente rispetto alla lista fill
///
[Parameter]
- public Fill CurrItem { get; set; } = null!;
+ public Fill CurrFill { get; set; } = null!;
///
/// Evento per cambiare tutti i fill
///
[Parameter]
- public EventCallback EC_ChangeAllType { get; set; }
-
- ///
- /// Evento per cambiare solo il fill corrente
- ///
- [Parameter]
- public EventCallback EC_ChangeType { get; set; }
-
- ///
- /// Evento per copiare sash
- ///
- [Parameter]
- public EventCallback EC_CopySash { get; set; }
-
- ///
- /// Evento per aggiungere sash
- ///
- [Parameter]
- public EventCallback EC_AddSash { get; set; }
+ public EventCallback EC_UpdatePreviewFill { get; set; }
///
/// Evento per tornare nella pagine Tree
@@ -50,67 +32,19 @@ namespace WebWindowComplex.Compo
[Parameter]
public EventCallback EC_ReqClose { get; set; }
- ///
- /// Lista dei Fill
- ///
- [Parameter]
- public List FillList { get; set; } = null!;
-
- ///
- /// Lista delle sash
- ///
- [Parameter]
- public List SashList { get; set; } = null!;
-
- ///
- /// Lista degli Splitted
- ///
- [Parameter]
- public List SplittedList { get; set; } = null!;
-
-
#endregion Public Properties
#region Protected Methods
///
- /// Sollevo evento per cambiare tutti i Fill
- ///
- /// tipo di fill richiesto
- ///
- protected async Task ChangeAllFill(FillTypes reqFillType)
- {
- await EC_ChangeAllType.InvokeAsync(reqFillType);
- }
-
- ///
- /// Sollevo evento per cambiare solo il Fill corrente
+ /// Metodo per cambiare solo il Fill corrente
///
/// tipo di fill richiesto
///
protected async Task ChangeOneFill(FillTypes reqFillType)
{
- await EC_ChangeType.InvokeAsync(reqFillType);
- }
-
- ///
- /// Sollevo evento per copiare sash
- ///
- ///
- ///
- protected async Task CopySash(DataAreaSplit Args)
- {
- await EC_CopySash.InvokeAsync(Args);
- }
-
- ///
- /// Sollevo evento per aggiungere sash
- ///
- ///
- ///
- protected async Task AddSash(DataAreaSplitted Args)
- {
- await EC_AddSash.InvokeAsync(Args);
+ CurrFill.SetFillType(reqFillType);
+ await EC_UpdatePreviewFill.InvokeAsync(CurrFill);
}
#endregion Protected Methods
@@ -118,7 +52,7 @@ namespace WebWindowComplex.Compo
#region Private Methods
///
- /// Sollevo evento per tornare alla pagina Tree
+ /// Metodo per tornare alla pagina Tree
///
private void ReqClose()
{
@@ -131,7 +65,7 @@ namespace WebWindowComplex.Compo
///
private string buttonFillCss(FillTypes reqFillTypes)
{
- return (FillList.ElementAt(CurrIndex).SelFillType == reqFillTypes) ? "btn btn-secondary btn-sm" : "btn btn-outline-secondary btn-sm";
+ return (CurrFill.SelFillType == reqFillTypes) ? "btn btn-secondary btn-sm" : "btn btn-outline-secondary btn-sm";
}
#endregion Private Methods
diff --git a/WebWindowComplex/Compo/CardFrame.razor b/WebWindowComplex/Compo/CardFrame.razor
index 15ac48b..2fda835 100644
--- a/WebWindowComplex/Compo/CardFrame.razor
+++ b/WebWindowComplex/Compo/CardFrame.razor
@@ -17,18 +17,10 @@
- @foreach (FrameDimension dimension in FrameWindow.DimensionList)
+ @foreach (FrameDimension dimension in CurrFrameWindow.DimensionList)
{
-