- Gestito salvataggio e chiusura componente con salvataggio jwd
- Correzioni valori nulli - Aggiunta funzione per calcolare altezza sashGroup
This commit is contained in:
@@ -79,7 +79,7 @@ namespace WebWindowComplex
|
||||
/// se torna false --> richiesta revert
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_OnClose { get; set; }
|
||||
public EventCallback<DataSave> EC_OnClose { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento errore validazione con una lista di errori rilevati
|
||||
@@ -398,7 +398,23 @@ namespace WebWindowComplex
|
||||
{
|
||||
editLock = false;
|
||||
Log.Info("Richietsa Chiusura");
|
||||
return EC_OnClose.InvokeAsync(false);
|
||||
//return EC_OnClose.InvokeAsync(false);
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
#if DEBUG
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
#else
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize());
|
||||
#endif
|
||||
//manca salvataggio JWD
|
||||
DataSave dataSave = new DataSave()
|
||||
{
|
||||
currJwd = CurrJwd,
|
||||
open = false,
|
||||
};
|
||||
return EC_OnClose.InvokeAsync(dataSave);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -544,8 +560,23 @@ namespace WebWindowComplex
|
||||
{
|
||||
editLock = false;
|
||||
Log.Info("Richietsa Salvataggio");
|
||||
//manca salvataggio JWD
|
||||
return EC_OnClose.InvokeAsync(true);
|
||||
//return EC_OnClose.InvokeAsync(false);
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
#if DEBUG
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
#else
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize());
|
||||
#endif
|
||||
//manca salvataggio JWD
|
||||
DataSave dataSave = new DataSave()
|
||||
{
|
||||
currJwd = CurrJwd,
|
||||
open = true,
|
||||
};
|
||||
return EC_OnClose.InvokeAsync(dataSave);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
@@ -1259,6 +1290,11 @@ namespace WebWindowComplex
|
||||
double valStd = Window.m_ParameterList.GetValueOrDefault(profileNameList.ElementAt(index) + "_DimStd");
|
||||
anta.ElementDimensionList.Add(new ElementDimension(sash, index + 1, valStd));
|
||||
}
|
||||
int numElemDelete = anta.ElementDimensionList.Count - profileNameList.Count;
|
||||
for (int i = 0; i < numElemDelete; i++)
|
||||
{
|
||||
anta.ElementDimensionList.RemoveAt(anta.ElementDimensionList.Count - 1);
|
||||
}
|
||||
for (int index = profileNameList.Count; index < anta.ElementDimensionList.Count; index++)
|
||||
anta.ElementDimensionList.RemoveAt(index);
|
||||
for (int i = 0; i < anta.ElementDimensionList.Count; i++)
|
||||
@@ -1953,4 +1989,9 @@ namespace WebWindowComplex
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
public class DataSave
|
||||
{
|
||||
public string currJwd { get; set; }
|
||||
public bool open { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user