- Aggiunto componente CardTree
- Aggiunti commenti - Enum di TableComp portati in un file esterno (LayoutConst)
This commit is contained in:
+102
-114
@@ -6,7 +6,9 @@ using WebWindowComplex.Compo;
|
||||
using WebWindowComplex.DTO;
|
||||
using WebWindowComplex.Json;
|
||||
using WebWindowComplex.Models;
|
||||
using static WebWindowComplex.LayoutConst;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
//using static WebWindowComplex.Compo.CardTree;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
@@ -88,29 +90,6 @@ namespace WebWindowComplex
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Enums
|
||||
|
||||
protected enum CompileStep
|
||||
{
|
||||
Template = 0,
|
||||
Tree = 1,
|
||||
Frame,
|
||||
Split,
|
||||
Sash,
|
||||
Fill,
|
||||
General
|
||||
}
|
||||
|
||||
protected enum PositionJoints
|
||||
{
|
||||
BL = 0, // Bottom Left
|
||||
BR = 1, // Bottom Right
|
||||
TR, // Top Right
|
||||
TL // Top Left
|
||||
}
|
||||
|
||||
#endregion Protected Enums
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected List<Fill> FillList
|
||||
@@ -975,7 +954,7 @@ namespace WebWindowComplex
|
||||
/// <param name="currSplitted"> Area Splitted corrente </param>
|
||||
/// <param name="numSash"> Indice della Sash che si vuole copiare </param>
|
||||
/// <returns></returns>
|
||||
private async Task CopySash(Data Args)
|
||||
private async Task CopySash(DataAreaSplit Args)
|
||||
{
|
||||
Splitted currSplitted = Args.splitted;
|
||||
int numSash = Args.index;
|
||||
@@ -990,90 +969,92 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per riempire tabella con contenuto vuoto o con i simboli per rappresentare la struttura
|
||||
/// </summary>
|
||||
/// <param name="row"> riga della cella </param>
|
||||
/// <param name="col"> colonna della cella </param>
|
||||
/// <returns></returns>
|
||||
private string FillTable(int row, int col)
|
||||
{
|
||||
List<ItemTable> itemSameCol = new List<ItemTable>();
|
||||
for (int k = 0; k < row; k++)
|
||||
{
|
||||
if (ItemTableList[k].Col == col + 1)
|
||||
{
|
||||
itemSameCol.Add(ItemTableList[k]);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
int numItemNextCol = 0;
|
||||
for (int k = 0; k < row; k++)
|
||||
{
|
||||
if (ItemTableList[k].Row <= row && ItemTableList[k].Col == col + 2)
|
||||
{
|
||||
numItemNextCol++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (itemSameCol.Count > 1)
|
||||
{
|
||||
for (int i = 0; i <= itemSameCol.Count - 2; i++)
|
||||
{
|
||||
if (itemSameCol[i].NumChild > 0)
|
||||
numItemNextCol = numItemNextCol - itemSameCol[i].NumChild;
|
||||
}
|
||||
}
|
||||
if (itemSameCol.Count > 0)
|
||||
{
|
||||
// Sono alla riga successiva di un elemento e nella stessa colonna
|
||||
if (itemSameCol.Last().Row == row)
|
||||
{
|
||||
// se ha un solo figlio
|
||||
if (itemSameCol.Last().NumChild == 1)
|
||||
{
|
||||
return "└";
|
||||
}
|
||||
else if (itemSameCol.Last().NumChild == 0)
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "├";
|
||||
}
|
||||
}
|
||||
// Non sono alla riga successiva
|
||||
else
|
||||
{
|
||||
// se ha un solo figlio
|
||||
if (itemSameCol.Last().NumChild == 1)
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
else if (col + 2 <= m_maxCol && ItemTableList[row].Col == col + 2)
|
||||
{
|
||||
if (numItemNextCol < itemSameCol.Last().NumChild && numItemNextCol != (itemSameCol.Last().NumChild - 1))
|
||||
{
|
||||
return "├";
|
||||
}
|
||||
return "└";
|
||||
}
|
||||
else if (numItemNextCol < itemSameCol.Last().NumChild)
|
||||
{
|
||||
return "│";
|
||||
}
|
||||
else
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
///// <summary>
|
||||
///// Metodo per riempire tabella con contenuto vuoto o con i simboli per rappresentare la struttura
|
||||
///// </summary>
|
||||
///// <param name="row"> riga della cella </param>
|
||||
///// <param name="col"> colonna della cella </param>
|
||||
///// <returns></returns>
|
||||
//private string FillTable(DataFillTable Args)
|
||||
//{
|
||||
// int row = Args.indRow;
|
||||
// int col = Args.indCol;
|
||||
// List<ItemTable> itemSameCol = new List<ItemTable>();
|
||||
// for (int k = 0; k < row; k++)
|
||||
// {
|
||||
// if (ItemTableList[k].Col == col + 1)
|
||||
// {
|
||||
// itemSameCol.Add(ItemTableList[k]);
|
||||
// }
|
||||
// continue;
|
||||
// }
|
||||
// int numItemNextCol = 0;
|
||||
// for (int k = 0; k < row; k++)
|
||||
// {
|
||||
// if (ItemTableList[k].Row <= row && ItemTableList[k].Col == col + 2)
|
||||
// {
|
||||
// numItemNextCol++;
|
||||
// }
|
||||
// continue;
|
||||
// }
|
||||
// if (itemSameCol.Count > 1)
|
||||
// {
|
||||
// for (int i = 0; i <= itemSameCol.Count - 2; i++)
|
||||
// {
|
||||
// if (itemSameCol[i].NumChild > 0)
|
||||
// numItemNextCol = numItemNextCol - itemSameCol[i].NumChild;
|
||||
// }
|
||||
// }
|
||||
// if (itemSameCol.Count > 0)
|
||||
// {
|
||||
// // Sono alla riga successiva di un elemento e nella stessa colonna
|
||||
// if (itemSameCol.Last().Row == row)
|
||||
// {
|
||||
// // se ha un solo figlio
|
||||
// if (itemSameCol.Last().NumChild == 1)
|
||||
// {
|
||||
// return "└";
|
||||
// }
|
||||
// else if (itemSameCol.Last().NumChild == 0)
|
||||
// {
|
||||
// return " ";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return "├";
|
||||
// }
|
||||
// }
|
||||
// // Non sono alla riga successiva
|
||||
// else
|
||||
// {
|
||||
// // se ha un solo figlio
|
||||
// if (itemSameCol.Last().NumChild == 1)
|
||||
// {
|
||||
// return " ";
|
||||
// }
|
||||
// else if (col + 2 <= m_maxCol && ItemTableList[row].Col == col + 2)
|
||||
// {
|
||||
// if (numItemNextCol < itemSameCol.Last().NumChild && numItemNextCol != (itemSameCol.Last().NumChild - 1))
|
||||
// {
|
||||
// return "├";
|
||||
// }
|
||||
// return "└";
|
||||
// }
|
||||
// else if (numItemNextCol < itemSameCol.Last().NumChild)
|
||||
// {
|
||||
// return "│";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return " ";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return " ";
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna header nav
|
||||
@@ -1102,10 +1083,21 @@ namespace WebWindowComplex
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare step e aggiornare preview svg
|
||||
/// Metodo per cambiare step
|
||||
/// </summary>
|
||||
/// <param name="Args"> argomenti passati dal componente </param>
|
||||
private void NextStepArgs(DataNextStep Args)
|
||||
{
|
||||
CompileStep newStep = Args.currCompileStep;
|
||||
int Index = Args.index;
|
||||
NextStep(newStep, Index);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare step
|
||||
/// </summary>
|
||||
/// <param name="newStep"> step successivo </param>
|
||||
private void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
private void NextStep(CompileStep newStep, int Index = 1)
|
||||
{
|
||||
editLock = true;
|
||||
currStep = newStep;
|
||||
@@ -1133,10 +1125,6 @@ namespace WebWindowComplex
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
await DoPreviewSvg();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user