WebWindowComplex:
- Aggiunto Nuget Web.Window.Data - Aggiornate classi Window e JsonUtility - Aggiornata interfaccia
This commit is contained in:
+491
-197
@@ -5,10 +5,12 @@ using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.ParametriOpzioni;
|
||||
using Egw.Window.Data;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
using static WebWindowComplex.ParametriOpzioni;
|
||||
|
||||
namespace WebWindowComplex
|
||||
{
|
||||
@@ -96,7 +98,6 @@ namespace WebWindowComplex
|
||||
internal string sSerialized()
|
||||
{
|
||||
return JsonConvert.SerializeObject(Serialize(), Formatting.Indented);
|
||||
|
||||
}
|
||||
|
||||
internal void OnUpdatePreview(string sJwd)
|
||||
@@ -122,6 +123,35 @@ namespace WebWindowComplex
|
||||
|
||||
public abstract class Area
|
||||
{
|
||||
// Conteggio dei macro elementi
|
||||
private static int m_CounterGroup = 0;
|
||||
public static void AddCounterGroup()
|
||||
{
|
||||
m_CounterGroup++;
|
||||
}
|
||||
public static int nCounterGroup
|
||||
{
|
||||
get => m_CounterGroup;
|
||||
set => m_CounterGroup = value;
|
||||
}
|
||||
|
||||
private int m_IdGroup;
|
||||
public int IdGroup
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IdGroup;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
m_IdGroup = value;
|
||||
}
|
||||
}
|
||||
public void SetIdGroup(int nIdGroup)
|
||||
{
|
||||
m_IdGroup = nIdGroup;
|
||||
}
|
||||
|
||||
protected Window m_ParentWindow;
|
||||
public Window ParentWindow
|
||||
@@ -206,7 +236,8 @@ namespace WebWindowComplex
|
||||
// Aggiungo Area split di default
|
||||
Split SplitArea = Split.CreateSplit(this, SplitShapes.HORIZONTAL);
|
||||
// imposto i parametri di default
|
||||
SplitArea.SetSplitQty(1);
|
||||
SplitArea.SetSplitQtyHoriz(1);
|
||||
SplitArea.SetSplitStartVert(false);
|
||||
// Aggiungo area
|
||||
AreaList.Add(SplitArea);
|
||||
// Creo le due aree Splitted
|
||||
@@ -380,6 +411,8 @@ namespace WebWindowComplex
|
||||
break;
|
||||
}
|
||||
}
|
||||
// salvo tipo Joint
|
||||
Joints oldJointType = JointList[0].SelJointType;
|
||||
// aggiungo Joint
|
||||
m_JointList.Clear();
|
||||
switch (SelShape)
|
||||
@@ -391,17 +424,21 @@ namespace WebWindowComplex
|
||||
case Shapes.ARC:
|
||||
case Shapes.DOUBLEARC:
|
||||
{
|
||||
JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 3, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 4, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 1, oldJointType));
|
||||
JointList.Add(new Joint(this, 2, oldJointType));
|
||||
JointList.Add(new Joint(this, 3, oldJointType));
|
||||
JointList.Add(new Joint(this, 4, oldJointType));
|
||||
//JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
//JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
//JointList.Add(new Joint(this, 3, Joints.FULL_H));
|
||||
//JointList.Add(new Joint(this, 4, Joints.FULL_H));
|
||||
break;
|
||||
}
|
||||
|
||||
case Shapes.ARC_FULL:
|
||||
{
|
||||
JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 1, oldJointType));
|
||||
JointList.Add(new Joint(this, 2, oldJointType));
|
||||
JointList.Add(new Joint(this, 3, Joints.ANGLED));
|
||||
JointList.Add(new Joint(this, 4, Joints.ANGLED));
|
||||
break;
|
||||
@@ -409,8 +446,8 @@ namespace WebWindowComplex
|
||||
|
||||
case Shapes.TRIANGLE:
|
||||
{
|
||||
JointList.Add(new Joint(this, 1, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 2, Joints.FULL_H));
|
||||
JointList.Add(new Joint(this, 1, oldJointType));
|
||||
JointList.Add(new Joint(this, 2, oldJointType));
|
||||
JointList.Add(new Joint(this, 3, Joints.ANGLED));
|
||||
break;
|
||||
}
|
||||
@@ -621,7 +658,10 @@ namespace WebWindowComplex
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty);
|
||||
Area.nCounterGroup = 0;
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty, IdGroup);
|
||||
foreach (var Dimension in DimensionList)
|
||||
JsonFrame.DimensionList.Add(Dimension.Serialize());
|
||||
foreach (var Joint in JointList)
|
||||
@@ -667,7 +707,7 @@ namespace WebWindowComplex
|
||||
// aggiungo area Sash di default
|
||||
for (var SplitIndex = m_SashList.Count; SplitIndex <= value - 1; SplitIndex++)
|
||||
{
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this));
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this, SplitIndex + 1));
|
||||
}
|
||||
}
|
||||
else if (value < m_SashList.Count)
|
||||
@@ -759,8 +799,9 @@ namespace WebWindowComplex
|
||||
|
||||
}
|
||||
// Aggiungo all'ultimo Splitted l'area di vetro
|
||||
Fill newFill = new Fill(AreaList[1], ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
Fill newFill = Fill.CreateFill(AreaList[1], FillTypes.GLASS);
|
||||
//Fill newFill = new Fill(AreaList[1], ParentWindow);
|
||||
//newFill.SetFillType(FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
@@ -773,37 +814,6 @@ namespace WebWindowComplex
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if (AreaList[AreaList.Count - 1].AreaList.Count == 0)
|
||||
//{
|
||||
// if (ContentArea.Count > 0)
|
||||
// {
|
||||
// if (ContentArea[0] is Fill)
|
||||
// {
|
||||
// for (int SplitIndex = 0; SplitIndex <= AreaList.Count() - 1; SplitIndex++)
|
||||
// {
|
||||
// if (SplitIndex == 0)
|
||||
// {
|
||||
// AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Fill f1 = (Fill)ContentArea[0];
|
||||
// AreaList[SplitIndex].AreaList.Add(Fill.CreateFill(AreaList[SplitIndex], f1.FillType));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
// AreaList[1].AreaList.Add(ContentArea[0]);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Fill f1 = (Fill)AreaList[AreaList.Count - 2].AreaList[0];
|
||||
// AreaList[AreaList.Count - 1].AreaList.Add(Fill.CreateFill(AreaList[AreaList.Count - 1], f1.FillType));
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
RefreshHardwareList();
|
||||
@@ -829,7 +839,7 @@ namespace WebWindowComplex
|
||||
dNewDimension = dLastDimension / (Qty + 1 - nSashQty);
|
||||
// aggiungo area Sash di default
|
||||
for (var SplitIndex = m_SashList.Count; SplitIndex <= Qty - 1; SplitIndex++)
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this));
|
||||
SashList.Add(new SashDimension(dNewDimension, true, this, SplitIndex + 1));
|
||||
}
|
||||
else if (Qty < m_SashList.Count)
|
||||
{
|
||||
@@ -1135,7 +1145,7 @@ namespace WebWindowComplex
|
||||
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId) ?? new Hardware("", "", "", "", "", 0, 0);
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.Id == sId) ?? new Hardware("", "", "", "", "", 0, 0);
|
||||
if (m_SelHardware == null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
}
|
||||
@@ -1184,6 +1194,8 @@ namespace WebWindowComplex
|
||||
internal static Sash CreateSash(Area Area)
|
||||
{
|
||||
Sash newSash = new Sash(Area, Area.ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSash.SetIdGroup(nCounterGroup);
|
||||
newSash.SetAreaType(AreaTypes.SASH);
|
||||
newSash.SetSashQty(1);
|
||||
newSash.SetOrientationSashType(OrientationSash.VERTICAL);
|
||||
@@ -1317,7 +1329,7 @@ namespace WebWindowComplex
|
||||
string sSashShape = FindSashShape();
|
||||
string sOpeningType = ConvertOpeningType();
|
||||
m_HardwareList = new ObservableCollection<Hardware>(from Hardware in m_HardwareCompleteList
|
||||
where Hardware.sId == "000000" || (Hardware.sFamily == s_SelFamilyHW && Hardware.nSashQty == nSashQty && Hardware.sShape == sSashShape && Hardware.sOpeningType == sOpeningType)
|
||||
where Hardware.Id == "000000" || (Hardware.FamilyName == s_SelFamilyHW && Hardware.SashQty == nSashQty && Hardware.Shape == sSashShape && Hardware.OpeningType == sOpeningType)
|
||||
select Hardware);
|
||||
}
|
||||
|
||||
@@ -1358,6 +1370,8 @@ namespace WebWindowComplex
|
||||
public override Sash Copy(Area newParentArea)
|
||||
{
|
||||
Sash newSash = new Sash(newParentArea, m_ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSash.SetIdGroup(nCounterGroup);
|
||||
newSash.SetAreaType(AreaType);
|
||||
// Imposta la quantità di ante e definisce SashDimension di ogni anta ai valori di default
|
||||
newSash.SetSashQty(nSashQty);
|
||||
@@ -1387,9 +1401,20 @@ namespace WebWindowComplex
|
||||
return newSash;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
ParentArea.AreaList.Remove(this);
|
||||
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
ParentArea.AreaList.Add(newFill);
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, m_SelHardware.sId);
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, m_SelHardware.Id, IdGroup);
|
||||
foreach (var SashDimension in SashList)
|
||||
JsonSash.SashList.Add(SashDimension.Serialize());
|
||||
foreach (var Joint in JointList)
|
||||
@@ -1402,101 +1427,247 @@ namespace WebWindowComplex
|
||||
|
||||
public class Split : Area
|
||||
{
|
||||
public int nSplitQty
|
||||
private bool m_bSplitStartVert = true;
|
||||
public bool bSplitStartVert
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitPositionList.Count > 0 ? m_SplitPositionList.Count - 1 : 0;
|
||||
return m_bSplitStartVert;
|
||||
}
|
||||
set
|
||||
{
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitPositionList.Count - 1)
|
||||
m_bSplitStartVert = value;
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
internal void SetSplitStartVert(bool SplitStartVert)
|
||||
{
|
||||
bSplitStartVert = SplitStartVert;
|
||||
}
|
||||
public int nSplitQtyVert
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitVertList.Count > 0 ? m_SplitVertList.Count - 1 : 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitPositionList.Count > 0)
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value; SplitIndex += -1)
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
if (nSplitQtyHoriz == 0)
|
||||
{
|
||||
dLastDimension = m_SplitPositionList[m_SplitPositionList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQty);
|
||||
m_SplitPositionList[m_SplitPositionList.Count - 1].SetDimension(dNewDimension);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
ParentArea.AreaList.Add(newFill);
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQty);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitPositionList.Count; SplitIndex <= value; SplitIndex++)
|
||||
SplitPositionList.Add(new SplitDimension(dNewDimension, true, this));
|
||||
SetSplitShape(SplitShapes.HORIZONTAL);
|
||||
}
|
||||
else if (value == 0)
|
||||
{
|
||||
SplitPositionList.RemoveAt(1);
|
||||
SplitPositionList.RemoveAt(0);
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitPositionList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitVertList.Count - 1)
|
||||
{
|
||||
dLastDimension += m_SplitPositionList[SplitIndex].dDimension;
|
||||
SplitPositionList.RemoveAt(SplitIndex);
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitVertList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dNewDimension);
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyVert);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitVertList.Count; SplitIndex <= value; SplitIndex++)
|
||||
m_SplitVertList.Add(new SplitDimension(dNewDimension, true, this, true));
|
||||
}
|
||||
dLastDimension += m_SplitPositionList[SplitPositionList.Count - 1].dDimension;
|
||||
SplitPositionList[SplitPositionList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= SplitPositionList.Count - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = new Fill(AreaList.Last(), ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
for (var SplitIndex = SplitPositionList.Count; SplitIndex <= AreaList.Count - 1; SplitIndex++)
|
||||
else if (value == 0)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
m_SplitVertList.RemoveAt(1);
|
||||
m_SplitVertList.RemoveAt(0);
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
{
|
||||
dLastDimension += m_SplitVertList[SplitIndex].dDimension;
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
}
|
||||
dLastDimension += m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
// Controllo quanti split orizzontali ci sono
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= (m_SplitVertList.Count * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
int nAreaList = AreaList.Count - 1;
|
||||
for (var SplitIndex = (m_SplitVertList.Count * nHoriz); SplitIndex <= nAreaList; SplitIndex++)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
}
|
||||
}
|
||||
// Se elimino l'unico split presente
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
}
|
||||
// Se elimino l'unico split presente
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetSplitQty(int Qty, bool NotifyProperty = false)
|
||||
internal void SetSplitQtyVert(int QtyVert, bool NotifyProperty = false)
|
||||
{
|
||||
if (Qty > m_SplitPositionList.Count)
|
||||
if (QtyVert > m_SplitVertList.Count)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitPositionList.Count > 0)
|
||||
if (m_SplitVertList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitPositionList[m_SplitPositionList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (Qty + 1 - nSplitQty);
|
||||
m_SplitPositionList[m_SplitPositionList.Count - 1].dDimension = dNewDimension;
|
||||
dLastDimension = m_SplitVertList[m_SplitVertList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (QtyVert + 1 - nSplitQtyVert);
|
||||
m_SplitVertList[m_SplitVertList.Count - 1].dDimension = dNewDimension;
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (Qty + 1 - nSplitQty);
|
||||
dNewDimension = dLastDimension / (QtyVert + 1 - nSplitQtyVert);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitPositionList.Count; SplitIndex <= Qty; SplitIndex++)
|
||||
SplitPositionList.Add(new SplitDimension(dNewDimension, true, this));
|
||||
for (var SplitIndex = m_SplitVertList.Count; SplitIndex <= QtyVert; SplitIndex++)
|
||||
m_SplitVertList.Add(new SplitDimension(dNewDimension, true, this, true));
|
||||
}
|
||||
else if (Qty < m_SplitPositionList.Count)
|
||||
else if (QtyVert < m_SplitVertList.Count)
|
||||
{
|
||||
for (var SplitIndex = m_SplitPositionList.Count - 1; SplitIndex >= Qty; SplitIndex += -1)
|
||||
SplitPositionList.RemoveAt(SplitIndex);
|
||||
for (var SplitIndex = m_SplitVertList.Count - 1; SplitIndex >= QtyVert; SplitIndex += -1)
|
||||
m_SplitVertList.RemoveAt(SplitIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public int nSplitQtyHoriz
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count - 1 : 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
for (var SplitIndex = m_SplitHorizList.Count - 1; SplitIndex >= value; SplitIndex += -1)
|
||||
m_SplitHorizList.RemoveAt(SplitIndex);
|
||||
if (nSplitQtyVert == 0)
|
||||
{
|
||||
ParentArea.AreaList.Remove(this);
|
||||
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
ParentArea.AreaList.Add(newFill);
|
||||
}
|
||||
else
|
||||
SetSplitShape(SplitShapes.VERTICAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ricalcolo dimensioni aggiungendo split
|
||||
if (value > m_SplitHorizList.Count - 1)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitHorizList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyHoriz);
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].SetDimension(dNewDimension);
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (value + 1 - nSplitQtyHoriz);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitHorizList.Count; SplitIndex <= value; SplitIndex++)
|
||||
m_SplitHorizList.Add(new SplitDimension(dNewDimension, true, this, false));
|
||||
}
|
||||
// Ricalcolo dimensioni rimuovendo split
|
||||
else
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SplitHorizList.Count - 1; SplitIndex >= value + 1; SplitIndex += -1)
|
||||
{
|
||||
dLastDimension += m_SplitHorizList[SplitIndex].dDimension;
|
||||
m_SplitHorizList.RemoveAt(SplitIndex);
|
||||
}
|
||||
dLastDimension += m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
// Controllo quanti split verticali ci sono
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= (m_SplitHorizList.Count * nVert) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
int nAreaList = AreaList.Count - 1;
|
||||
for (var SplitIndex = (m_SplitHorizList.Count * nVert); SplitIndex <= nAreaList; SplitIndex++)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
}
|
||||
}
|
||||
// Se elimino l'unico split presente
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
}
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
internal void SetSplitQtyHoriz(int QtyHoriz, bool NotifyProperty = false)
|
||||
{
|
||||
if (QtyHoriz > m_SplitHorizList.Count)
|
||||
{
|
||||
// recupero larghezza ultimo
|
||||
double dLastDimension = 100;
|
||||
double dNewDimension = 100;
|
||||
if (m_SplitHorizList.Count > 0)
|
||||
{
|
||||
dLastDimension = m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension;
|
||||
dNewDimension = dLastDimension / (QtyHoriz + 1 - nSplitQtyHoriz);
|
||||
m_SplitHorizList[m_SplitHorizList.Count - 1].dDimension = dNewDimension;
|
||||
}
|
||||
else
|
||||
dNewDimension = dLastDimension / (QtyHoriz + 1 - nSplitQtyHoriz);
|
||||
// aggiungo area Split di default
|
||||
for (var SplitIndex = m_SplitHorizList.Count; SplitIndex <= QtyHoriz; SplitIndex++)
|
||||
m_SplitHorizList.Add(new SplitDimension(dNewDimension, true, this, false));
|
||||
}
|
||||
else if (QtyHoriz < m_SplitHorizList.Count)
|
||||
{
|
||||
for (var SplitIndex = m_SplitHorizList.Count - 1; SplitIndex >= QtyHoriz; SplitIndex += -1)
|
||||
m_SplitHorizList.RemoveAt(SplitIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1525,6 +1696,39 @@ namespace WebWindowComplex
|
||||
set
|
||||
{
|
||||
m_SelSplitShape = (SplitShapes)IdNameStruct.IdFromInd(value, m_SplitShapeList);
|
||||
// Cancello elementi nello split e azzero quantità orizzontale e verticale
|
||||
AreaList.Clear();
|
||||
SetSplitQtyVert(0);
|
||||
SetSplitQtyHoriz(0);
|
||||
if (m_SelSplitShape == SplitShapes.VERTICAL)
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyVert(1);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
else if (m_SelSplitShape == SplitShapes.HORIZONTAL)
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitStartVert(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inserisco valori di default
|
||||
SetSplitQtyVert(1);
|
||||
SetSplitQtyHoriz(1);
|
||||
SetSplitStartVert(true);
|
||||
}
|
||||
// Aggiungo area Splitted e vetro
|
||||
int nVert = m_SplitVertList.Count > 0 ? m_SplitVertList.Count : 1;
|
||||
int nHoriz = m_SplitHorizList.Count > 0 ? m_SplitHorizList.Count : 1;
|
||||
for (var SplitIndex = 0; SplitIndex <= (nVert * nHoriz) - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
Fill newFill = Fill.CreateFill(AreaList[SplitIndex], FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[SplitIndex].AreaList.Add(newFill);
|
||||
}
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
}
|
||||
@@ -1562,6 +1766,32 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitVertList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitVertList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitVertList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitVertList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<SplitDimension> m_SplitHorizList = new ObservableCollection<SplitDimension>();
|
||||
public ObservableCollection<SplitDimension> SplitHorizList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitHorizList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitHorizList = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Split(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
{
|
||||
}
|
||||
@@ -1569,6 +1799,8 @@ namespace WebWindowComplex
|
||||
internal static Split CreateSplit(Area Area, SplitShapes SplitShape)
|
||||
{
|
||||
Split Split = new Split(Area, Area.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Split.SetIdGroup(nCounterGroup);
|
||||
Split.SetAreaType(AreaTypes.SPLIT);
|
||||
Split.SetSplitShape(SplitShape, true);
|
||||
return Split;
|
||||
@@ -1577,7 +1809,11 @@ namespace WebWindowComplex
|
||||
public override Split Copy(Area newParentArea)
|
||||
{
|
||||
Split newSplit = new Split(newParentArea, ParentWindow);
|
||||
newSplit.SetSplitQty(nSplitQty);
|
||||
AddCounterGroup();
|
||||
newSplit.SetIdGroup(nCounterGroup);
|
||||
newSplit.SetSplitStartVert(bSplitStartVert);
|
||||
newSplit.SetSplitQtyVert(nSplitQtyVert);
|
||||
newSplit.SetSplitQtyHoriz(nSplitQtyHoriz);
|
||||
newSplit.SetSplitShape(SelSplitShape, true);
|
||||
newSplit.SetAreaType(AreaType);
|
||||
foreach (var item in AreaList)
|
||||
@@ -1588,11 +1824,27 @@ namespace WebWindowComplex
|
||||
return newSplit;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
ParentArea.AreaList.Remove(this);
|
||||
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
ParentArea.AreaList.Add(newFill);
|
||||
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
|
||||
}
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonSplit JsonSplit = new JsonSplit(m_SelSplitShape);
|
||||
foreach (var SplitPosition in m_SplitPositionList)
|
||||
JsonSplit.SplitPositionList.Add(SplitPosition.Serialize());
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSplit JsonSplit = new JsonSplit(m_SelSplitShape, IdGroup);
|
||||
//foreach (var SplitPosition in m_SplitPositionList)
|
||||
// JsonSplit.SplitPositionList.Add(SplitPosition.Serialize());
|
||||
JsonSplit.SplitStartVert = bSplitStartVert;
|
||||
foreach (var SplitVert in m_SplitVertList)
|
||||
JsonSplit.SplitVertList.Add(SplitVert.Serialize());
|
||||
foreach (var SplitHoriz in m_SplitHorizList)
|
||||
JsonSplit.SplitHorizList.Add(SplitHoriz.Serialize());
|
||||
foreach (var Area in AreaList)
|
||||
JsonSplit.AreaList.Add(Area.Serialize());
|
||||
return JsonSplit;
|
||||
@@ -1601,7 +1853,6 @@ namespace WebWindowComplex
|
||||
|
||||
public class Splitted : Area
|
||||
{
|
||||
|
||||
public Splitted(Area ParentArea, Window ParentWindow) : base(ParentArea, ParentWindow)
|
||||
{
|
||||
}
|
||||
@@ -1609,6 +1860,8 @@ namespace WebWindowComplex
|
||||
internal static Splitted CreateSplitted(Area ParentArea)
|
||||
{
|
||||
Splitted Splitted = new Splitted(ParentArea, ParentArea.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Splitted.SetIdGroup(nCounterGroup);
|
||||
Splitted.SetAreaType(AreaTypes.SPLITTED);
|
||||
return Splitted;
|
||||
}
|
||||
@@ -1616,6 +1869,8 @@ namespace WebWindowComplex
|
||||
public override Splitted Copy(Area newParentArea)
|
||||
{
|
||||
Splitted newSplitted = new Splitted(newParentArea, ParentWindow);
|
||||
AddCounterGroup();
|
||||
newSplitted.SetIdGroup(nCounterGroup);
|
||||
newSplitted.SetAreaType(AreaType);
|
||||
foreach (var item in AreaList)
|
||||
{
|
||||
@@ -1627,7 +1882,9 @@ namespace WebWindowComplex
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonSplitted JsonSplitted = new JsonSplitted();
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonSplitted JsonSplitted = new JsonSplitted(IdGroup);
|
||||
foreach (var Area in AreaList)
|
||||
JsonSplitted.AreaList.Add(Area.Serialize());
|
||||
return JsonSplitted;
|
||||
@@ -1692,6 +1949,8 @@ namespace WebWindowComplex
|
||||
internal static Fill CreateFill(Area AreaParent, FillTypes FillType)
|
||||
{
|
||||
Fill Fill = new Fill(AreaParent, AreaParent.ParentWindow);
|
||||
AddCounterGroup();
|
||||
Fill.SetIdGroup(nCounterGroup);
|
||||
Fill.SetAreaType(AreaTypes.FILL);
|
||||
Fill.SetFillType(FillType);
|
||||
return Fill;
|
||||
@@ -1700,6 +1959,8 @@ namespace WebWindowComplex
|
||||
public override Fill Copy(Area newParentArea)
|
||||
{
|
||||
Fill newFill = new Fill(newParentArea, m_ParentWindow);
|
||||
AddCounterGroup();
|
||||
newFill.SetIdGroup(nCounterGroup);
|
||||
newFill.SetFillType(SelFillType);
|
||||
newFill.SetAreaType(AreaType);
|
||||
return newFill;
|
||||
@@ -1707,7 +1968,9 @@ namespace WebWindowComplex
|
||||
|
||||
internal override JsonArea Serialize()
|
||||
{
|
||||
JsonFill JsonFill = new JsonFill(FillType);
|
||||
if (nCounterGroup < IdGroup)
|
||||
Area.nCounterGroup = IdGroup;
|
||||
JsonFill JsonFill = new JsonFill(FillType, IdGroup);
|
||||
foreach (var Area in AreaList)
|
||||
JsonFill.AreaList.Add(Area.Serialize());
|
||||
return JsonFill;
|
||||
@@ -1724,6 +1987,7 @@ namespace WebWindowComplex
|
||||
return m_ParentArea;
|
||||
}
|
||||
}
|
||||
|
||||
private int m_nIndex;
|
||||
public int nIndex
|
||||
{
|
||||
@@ -1797,82 +2061,82 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public class Hardware
|
||||
{
|
||||
private string m_sId;
|
||||
public string sId
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sId;
|
||||
}
|
||||
}
|
||||
//public class Hardware
|
||||
//{
|
||||
// private string m_sId;
|
||||
// public string sId
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_sId;
|
||||
// }
|
||||
// }
|
||||
|
||||
private string m_sFamily;
|
||||
public string sFamily
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sFamily;
|
||||
}
|
||||
}
|
||||
// private string m_sFamily;
|
||||
// public string sFamily
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_sFamily;
|
||||
// }
|
||||
// }
|
||||
|
||||
private string m_sName;
|
||||
public string sName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sName;
|
||||
}
|
||||
}
|
||||
// private string m_sName;
|
||||
// public string sName
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_sName;
|
||||
// }
|
||||
// }
|
||||
|
||||
private string m_sOpeningType;
|
||||
public string sOpeningType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sOpeningType;
|
||||
}
|
||||
}
|
||||
// private string m_sOpeningType;
|
||||
// public string sOpeningType
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_sOpeningType;
|
||||
// }
|
||||
// }
|
||||
|
||||
private string m_sShape;
|
||||
public string sShape
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sShape;
|
||||
}
|
||||
}
|
||||
// private string m_sShape;
|
||||
// public string sShape
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_sShape;
|
||||
// }
|
||||
// }
|
||||
|
||||
private int m_nSashQty;
|
||||
public int nSashQty
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSashQty;
|
||||
}
|
||||
}
|
||||
// private int m_nSashQty;
|
||||
// public int nSashQty
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_nSashQty;
|
||||
// }
|
||||
// }
|
||||
|
||||
private int m_nSashPosition;
|
||||
public int nSashPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSashPosition;
|
||||
}
|
||||
}
|
||||
// private int m_nSashPosition;
|
||||
// public int nSashPosition
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return m_nSashPosition;
|
||||
// }
|
||||
// }
|
||||
|
||||
public Hardware(string sId, string sFamily, string sName, string sOpeningType, string sShape, int nSashQty, int nSashPosition)
|
||||
{
|
||||
m_sId = sId;
|
||||
m_sFamily = sFamily;
|
||||
m_sName = sName;
|
||||
m_sOpeningType = sOpeningType;
|
||||
m_sShape = sShape;
|
||||
m_nSashQty = nSashQty;
|
||||
m_nSashPosition = nSashPosition;
|
||||
}
|
||||
}
|
||||
// public Hardware(string sId, string sFamily, string sName, string sOpeningType, string sShape, int nSashQty, int nSashPosition)
|
||||
// {
|
||||
// m_sId = sId;
|
||||
// m_sFamily = sFamily;
|
||||
// m_sName = sName;
|
||||
// m_sOpeningType = sOpeningType;
|
||||
// m_sShape = sShape;
|
||||
// m_nSashQty = nSashQty;
|
||||
// m_nSashPosition = nSashPosition;
|
||||
// }
|
||||
//}
|
||||
|
||||
public partial class ParametriOpzioni
|
||||
{
|
||||
@@ -2087,6 +2351,15 @@ namespace WebWindowComplex
|
||||
// reference
|
||||
private Sash m_Parent;
|
||||
|
||||
private int m_nSashId;
|
||||
public int nSashId
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSashId;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bIsRelative = false;
|
||||
public bool bIsRelative
|
||||
{
|
||||
@@ -2264,17 +2537,18 @@ namespace WebWindowComplex
|
||||
|
||||
public SashDimension Copy()
|
||||
{
|
||||
SashDimension newSashDim = new SashDimension(dDimension, bIsRelative, m_Parent);
|
||||
SashDimension newSashDim = new SashDimension(dDimension, bIsRelative, m_Parent, m_nSashId);
|
||||
newSashDim.SetOpeningType(SelOpeningType);
|
||||
newSashDim.SetHasHandle(bHasHandle);
|
||||
return newSashDim;
|
||||
}
|
||||
|
||||
public SashDimension(double dDimension, bool bIsRelative, Sash Parent)
|
||||
public SashDimension(double dDimension, bool bIsRelative, Sash Parent, int nSashId)
|
||||
{
|
||||
m_dDimension = dDimension;
|
||||
m_bIsRelative = bIsRelative;
|
||||
m_Parent = Parent;
|
||||
m_nSashId = nSashId;
|
||||
// assengno maniglia
|
||||
if (Parent.SashList.Count == 0 || !Parent.SashList.Any(x => x.bHasHandle))
|
||||
m_bHasHandle = true;
|
||||
@@ -2299,13 +2573,13 @@ namespace WebWindowComplex
|
||||
|
||||
case Openings.TILTTURN_LEFT:
|
||||
{
|
||||
SetOpeningType(Openings.TILTTURN_RIGHT);
|
||||
SetOpeningType(Openings.TURNONLY_RIGHT);
|
||||
break;
|
||||
}
|
||||
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
{
|
||||
SetOpeningType(Openings.TILTTURN_LEFT);
|
||||
SetOpeningType(Openings.TURNONLY_LEFT);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2352,7 +2626,7 @@ namespace WebWindowComplex
|
||||
|
||||
internal JsonSashDimension Serialize()
|
||||
{
|
||||
JsonSashDimension JsonSashDimension = new JsonSashDimension(OpeningType, m_bHasHandle, m_dDimension);
|
||||
JsonSashDimension JsonSashDimension = new JsonSashDimension(OpeningType, m_bHasHandle, m_dDimension, m_nSashId);
|
||||
return JsonSashDimension;
|
||||
}
|
||||
}
|
||||
@@ -2375,6 +2649,20 @@ namespace WebWindowComplex
|
||||
m_bIsRelative = value;
|
||||
}
|
||||
|
||||
private bool m_bIsVertListDim = false;
|
||||
public bool bIsVertListDim
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsVertListDim;
|
||||
}
|
||||
}
|
||||
internal void SetIsVertListDim(bool value)
|
||||
{
|
||||
m_bIsVertListDim = value;
|
||||
}
|
||||
|
||||
|
||||
private double m_dDimension;
|
||||
public double dDimension
|
||||
{
|
||||
@@ -2390,8 +2678,13 @@ namespace WebWindowComplex
|
||||
// se sono in percentuale
|
||||
if (m_bIsRelative)
|
||||
{
|
||||
List<SplitDimension> RelativeDimList = new List<SplitDimension>();
|
||||
if (bIsVertListDim)
|
||||
RelativeDimList = m_Parent.SplitVertList.Where(x => x.bIsRelative).ToList();
|
||||
else
|
||||
RelativeDimList = m_Parent.SplitHorizList.Where(x => x.bIsRelative).ToList();
|
||||
// verifico se ci sono assoluti
|
||||
List<SplitDimension> RelativeDimList = m_Parent.SplitPositionList.Where(x => x.bIsRelative).ToList();
|
||||
//List<SplitDimension> RelativeDimList = m_Parent.SplitPositionList.Where(x => x.bIsRelative).ToList();
|
||||
if (RelativeDimList.Count > 0)
|
||||
{
|
||||
if (m_Parent.bIsPercentage)
|
||||
@@ -2462,14 +2755,15 @@ namespace WebWindowComplex
|
||||
|
||||
public SplitDimension Copy()
|
||||
{
|
||||
SplitDimension newSplitDim = new SplitDimension(dDimension, bIsRelative, m_Parent);
|
||||
SplitDimension newSplitDim = new SplitDimension(dDimension, bIsRelative, m_Parent, bIsVertListDim);
|
||||
return newSplitDim;
|
||||
}
|
||||
public SplitDimension(double dDimension, bool bIsRelative, Split Parent)
|
||||
public SplitDimension(double dDimension, bool bIsRelative, Split Parent, bool IsVertList)
|
||||
{
|
||||
m_dDimension = dDimension;
|
||||
m_bIsRelative = bIsRelative;
|
||||
m_Parent = Parent;
|
||||
m_bIsVertListDim = IsVertList;
|
||||
}
|
||||
|
||||
internal JsonSplitDimension Serialize()
|
||||
|
||||
Reference in New Issue
Block a user