98 lines
2.5 KiB
C#
98 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Thermo.Active.Model.DTOModels.Recipe
|
|
{
|
|
public class DTOWarmers
|
|
{
|
|
public int Id { get; set; } = 0;
|
|
public double SetpointHMI { get; set; } = 0;
|
|
public double SetpointPLC { get; set; } = 0;
|
|
//public RPRange Range { get; set; }
|
|
//public RPStatus Status { get; set; }
|
|
public string UnitMeasure { get; set; }
|
|
public double ValueAct { get; set; }
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (!(obj is DTOWarmers item))
|
|
return false;
|
|
|
|
if (Id!= item.Id)
|
|
return false;
|
|
if (SetpointHMI != item.SetpointHMI)
|
|
return false;
|
|
if (SetpointPLC != item.SetpointPLC)
|
|
return false;
|
|
//if (!Range.Equals(item.Range))
|
|
// return false;
|
|
//if (!Status.Equals(item.Status))
|
|
// return false;
|
|
if (UnitMeasure != item.UnitMeasure)
|
|
return false;
|
|
if (ValueAct != item.ValueAct)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
}
|
|
|
|
#if false
|
|
public struct RPRange
|
|
{
|
|
public double Min { get; set; }
|
|
public double Max { get; set; }
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (!(obj is RPRange item))
|
|
return false;
|
|
|
|
if (Min != item.Min)
|
|
return false;
|
|
if (Max != item.Max)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
}
|
|
public struct RPStatus
|
|
{
|
|
public bool Visible { get; set; }
|
|
public bool Enabled { get; set; }
|
|
public bool HasError { get; set; }
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (!(obj is RPStatus item))
|
|
return false;
|
|
|
|
if (Visible != item.Visible)
|
|
return false;
|
|
if (Enabled != item.Enabled)
|
|
return false;
|
|
if (HasError != item.HasError)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
}
|
|
#endif
|
|
}
|