Corretti alcuni Warnings
This commit is contained in:
@@ -276,7 +276,7 @@ namespace WebWindowComplex.Models
|
||||
if (value > 0)
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
SashDimension itemDelete = null;
|
||||
SashDimension itemDelete = new SashDimension(0, MeasureTypes.NULL, this, 0);
|
||||
double deleteDim;
|
||||
for (var SplitIndex = m_SashList.Count - 1; SplitIndex >= value; SplitIndex += -1)
|
||||
{
|
||||
@@ -476,7 +476,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelHardware;
|
||||
return m_SelHardware!;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -492,7 +492,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelHardware.Id;
|
||||
return m_SelHardware!.Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -570,7 +570,7 @@ namespace WebWindowComplex.Models
|
||||
Area newArea = item.Copy(newSash);
|
||||
newSash.AreaList.Add(newArea);
|
||||
}
|
||||
newSash.SetSelFamilyHardwareFromIndex(m_SelHardware.Id);
|
||||
newSash.SetSelFamilyHardwareFromIndex(m_SelHardware!.Id);
|
||||
newSash.SetSelHardwareFromId(CustomHwId);
|
||||
//if (ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.ARC ||
|
||||
// ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.DOUBLEARC ||
|
||||
@@ -592,7 +592,7 @@ namespace WebWindowComplex.Models
|
||||
m_HardwareList.Clear();
|
||||
Enums.OpeningTypes sOpeningType = ConvertOpeningType();
|
||||
if (string.IsNullOrEmpty(m_SelFamilyHardware))
|
||||
m_SelFamilyHardware = s_FamilyHardwareList.FirstOrDefault();
|
||||
m_SelFamilyHardware = s_FamilyHardwareList.FirstOrDefault() ?? "";
|
||||
int sashPosition = 1;
|
||||
if (nSashQty > 2 && !(SashList.First().bHasHandle || SashList.Last().bHasHandle))
|
||||
sashPosition = 2;
|
||||
@@ -610,6 +610,7 @@ namespace WebWindowComplex.Models
|
||||
if(rawList.Count == 0 || rawList == null)
|
||||
{
|
||||
Hardware hw = new Hardware(CustomHwId, m_SelFamilyHardware, "Custom", sOpeningType, m_CurrShape, nSashQty, 1);
|
||||
rawList = new List<Hardware>();
|
||||
rawList.Add(hw);
|
||||
}
|
||||
m_HardwareList = new List<Hardware>(rawList);
|
||||
@@ -672,7 +673,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
RefreshHardwareList();
|
||||
// se il vecchio hw selezionato non va più bene viene selezionato il primo della lista
|
||||
if (!HardwareList.Contains(m_SelHardware) || m_SelHardware.Shape != m_CurrShape)
|
||||
if (!HardwareList.Contains(m_SelHardware!) || m_SelHardware!.Shape != m_CurrShape)
|
||||
{
|
||||
SetFirstHardware();
|
||||
ClearHardwareOptionList();
|
||||
@@ -796,7 +797,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
string currHwId = hideHw ? CustomHwId : m_SelHardware.Id;
|
||||
string currHwId = hideHw ? CustomHwId : m_SelHardware!.Id;
|
||||
JsonSash JsonSash = new JsonSash(m_bIsSashVertical, m_SashType, m_bSashBottomRail, m_nSashBottomRailQty, currHwId, GroupId);
|
||||
foreach (var SashDimension in SashList)
|
||||
JsonSash.SashList.Add(SashDimension.Serialize());
|
||||
@@ -854,11 +855,11 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
if (!string.IsNullOrEmpty(OptionXml))
|
||||
{
|
||||
ParametriOpzioni HwOptions = null;
|
||||
ParametriOpzioni HwOptions = new ParametriOpzioni();
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(ParametriOpzioni));
|
||||
StringReader reader = new StringReader(OptionXml);
|
||||
HwOptions = (ParametriOpzioni)serializer.Deserialize(reader);
|
||||
if (HwOptions.Items != null)
|
||||
if (HwOptions!.Items != null)
|
||||
{
|
||||
m_HwOptionList.Clear();
|
||||
foreach (var HwOption in HwOptions.Items)
|
||||
@@ -1031,7 +1032,7 @@ namespace WebWindowComplex.Models
|
||||
private List<SashDimension> m_SashList = new List<SashDimension>();
|
||||
private SashTypes m_SashType;
|
||||
private string m_SelFamilyHardware = "";
|
||||
private Hardware m_SelHardware;
|
||||
private Hardware? m_SelHardware = null;
|
||||
private OrientationSash m_SelOrientationSashType;
|
||||
//private SashArcElement m_SashArcElement;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user