inizio fix gestione params iniziali
This commit is contained in:
@@ -67,7 +67,7 @@ namespace WebDoorCreator.Data.DDF
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentDoorOp.doorOpsDict = dictDoorOP;
|
||||
CurrentDoorOp.hardware = dictDoorOP;
|
||||
string doorOpSer = CurrentDoorOp.GetSerialized(RemDoorOp);
|
||||
// ora popolo l'oggetto DTO principale
|
||||
CurrentConf.version = FormatVers;
|
||||
|
||||
@@ -17,18 +17,19 @@ namespace WebDoorCreator.Data.DTO
|
||||
|
||||
#region Public Properties
|
||||
public string version { get; set; } = "0";
|
||||
|
||||
public bool produce { get; set; } = true;
|
||||
public string measures { get; set; } = "mm";
|
||||
public string code { get; set; } = "0015943";
|
||||
public DateTime date { get; set; } = DateTime.Now;
|
||||
public string material { get; set; } = "wood";
|
||||
public string measures { get; set; } = "millimiters";
|
||||
|
||||
public OrderDto order { get; set; } = new OrderDto();
|
||||
public DateTime date { get; set; } = DateTime.Now;
|
||||
public string piece { get; set; } = "DO_1";
|
||||
public bool produce { get; set; } = false;
|
||||
public Edges profiles { get; set; } = new Edges();
|
||||
public string secure { get; set; } = "UP";
|
||||
public Sizing size { get; set; } = new Sizing();
|
||||
public string swing { get; set; } = "RH";
|
||||
public string secure { get; set; } = "UP";
|
||||
public string material { get; set; } = "wood";
|
||||
|
||||
public Edges profiles { get; set; } = new Edges();
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace WebDoorCreator.Data.DTO
|
||||
[Serializable]
|
||||
public class DoorOpsDTO
|
||||
{
|
||||
public Dictionary<string, List<Dictionary<string, string>>> doorOpsDict { get; set; } = new Dictionary<string, List<Dictionary<string, string>>>();
|
||||
public Dictionary<string, List<Dictionary<string, string>>> hardware { get; set; } = new Dictionary<string, List<Dictionary<string, string>>>();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
@@ -30,9 +30,9 @@ namespace WebDoorCreator.Data.DTO
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (!item.StartsWith("doorOps") && item.Length > 2 && !item.Contains("Separator"))
|
||||
if (item.Length > 2 && !item.Contains("Separator"))
|
||||
{
|
||||
sb.AppendLine(item.Substring(2));
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
if (item.Contains("Separator"))
|
||||
{
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
public class Edges
|
||||
{
|
||||
public EdgesDto lockEdge { get; set; } = new EdgesDto();
|
||||
public EdgesDto hingeEdge { get; set; } = new EdgesDto();
|
||||
public EdgesDto topEdge { get; set; } = new EdgesDto();
|
||||
public EdgesDto bottomEdge { get; set; } = new EdgesDto();
|
||||
public EdgesDto lockedge { get; set; } = new EdgesDto();
|
||||
public EdgesDto hingeedge { get; set; } = new EdgesDto();
|
||||
public EdgesDto top { get; set; } = new EdgesDto();
|
||||
public EdgesDto bottom { get; set; } = new EdgesDto();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,13 +82,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
//graphicParamsTemp = deserialized;
|
||||
foreach (var kvp in deserialized)
|
||||
{
|
||||
foreach (var val in kvp.Value)
|
||||
if (!graphicParams.ContainsKey(kvp.Key))
|
||||
{
|
||||
if (!graphicParams.ContainsKey(val.Key))
|
||||
{
|
||||
graphicParams.Add(val.Key, val.Value);
|
||||
}
|
||||
graphicParams.Add(kvp.Key, kvp.Value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,7 +103,8 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
protected Dictionary<string, string> currValToCompare { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
|
||||
protected Dictionary<string, List<string>> graphicParams { get; set; } = new Dictionary<string, List<string>>();
|
||||
//protected Dictionary<string, List<string>> graphicParams { get; set; } = new Dictionary<string, List<string>>();
|
||||
protected Dictionary<string, Dictionary<string, List<string>>> graphicParams { get; set; } = new Dictionary<string, Dictionary<string, List<string>>>();
|
||||
protected Dictionary<string, Dictionary<string, List<string>>> graphicParamsTemp { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
@@ -127,10 +126,17 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
protected List<string> comboSet(string pKey)
|
||||
{
|
||||
List<string> answ = new List<string>();
|
||||
if (graphicParams.ContainsKey(pKey))
|
||||
foreach (var item in graphicParams)
|
||||
{
|
||||
answ = graphicParams[pKey].ToList();
|
||||
foreach (var param in item.Value)
|
||||
{
|
||||
//if (item.ContainsKey(pKey))
|
||||
//{
|
||||
// answ = param[pKey].ToList();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,40 +3,64 @@
|
||||
#Door1
|
||||
|
||||
version: 2
|
||||
produce: true
|
||||
measures: mm
|
||||
code: 0015943
|
||||
date: 2023-04-21T12:51:15.4331164+02:00
|
||||
material: wood
|
||||
measures: millimiters
|
||||
order:
|
||||
customer:
|
||||
elevation:
|
||||
project:
|
||||
pO:
|
||||
line:
|
||||
date: 21-04-2023
|
||||
piece: DO_1
|
||||
produce: false
|
||||
profiles:
|
||||
lockEdge:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
hingeEdge:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
topEdge:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
bottomEdge:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
secure: UP
|
||||
size:
|
||||
width: 33.8125
|
||||
height: 81.25
|
||||
thickness: 1.75
|
||||
swing: RH
|
||||
secure: UP
|
||||
material: wood
|
||||
profiles:
|
||||
lockedge:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
hingeedge:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
top:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
bottom:
|
||||
type: BV
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
hardware:
|
||||
ept:
|
||||
- template: Generic\StdEPT
|
||||
ToptoCL: 15
|
||||
FacetoCL: 0.875
|
||||
- template: Generic\StdEPT
|
||||
ToptoCL: 15
|
||||
FacetoCL: 0.875
|
||||
|
||||
flush_bolts:
|
||||
- template: Corner\8501
|
||||
type: corner
|
||||
side: top
|
||||
position: 5
|
||||
offset_WS: 0.0
|
||||
|
||||
groove:
|
||||
- template: Generic\Groove
|
||||
type: side
|
||||
width: 0.6
|
||||
depth: 0.8
|
||||
offset_WS: 0
|
||||
side: bottom
|
||||
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user