Inizio spacchettamento file window delle classi di base del modello
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
public class Splitted : Area
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public Splitted(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public override Splitted Copy(Area newParentArea)
|
||||
{
|
||||
Splitted newSplitted = new Splitted(newParentArea, ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSplitted.SetIdGroup(nCounterGroup);
|
||||
newSplitted.SetAreaType(AreaType);
|
||||
foreach (var item in AreaList)
|
||||
{
|
||||
Area a = item.Copy(newSplitted);
|
||||
newSplitted.AreaList.Add(a);
|
||||
}
|
||||
return newSplitted;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
internal static Splitted CreateSplitted(Area ParentArea)
|
||||
{
|
||||
Splitted Splitted = new Splitted(ParentArea, ParentArea.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Splitted.SetIdGroup(nCounterGroup);
|
||||
Splitted.SetAreaType(AreaTypes.SPLITTED);
|
||||
return Splitted;
|
||||
}
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSplitted JsonSplitted = new JsonSplitted(IdGroup);
|
||||
foreach (var Area in AreaList)
|
||||
JsonSplitted.AreaList.Add(Area.Serialize());
|
||||
return JsonSplitted;
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user