88 lines
2.2 KiB
C#
88 lines
2.2 KiB
C#
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Xml.Serialization;
|
|||
|
|
|
|||
|
|
namespace TBF.BenchControl
|
|||
|
|
{
|
|||
|
|
public class ComponentCfgBase
|
|||
|
|
{
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public string Name
|
|||
|
|
{
|
|||
|
|
get { return name; }
|
|||
|
|
set { name = value; }
|
|||
|
|
}
|
|||
|
|
string name;
|
|||
|
|
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public Generic.IComponentFactory Factory
|
|||
|
|
{
|
|||
|
|
get { return factory; }
|
|||
|
|
set { factory = value; }
|
|||
|
|
}
|
|||
|
|
Generic.IComponentFactory factory;
|
|||
|
|
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public string ParentName
|
|||
|
|
{
|
|||
|
|
get { return parentName; }
|
|||
|
|
set { parentName = value; }
|
|||
|
|
}
|
|||
|
|
string parentName;
|
|||
|
|
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public int ItemNr
|
|||
|
|
{
|
|||
|
|
get { return itemNr; }
|
|||
|
|
set { itemNr = value; }
|
|||
|
|
}
|
|||
|
|
int itemNr;
|
|||
|
|
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public Entities.DebugMode DebugLevel
|
|||
|
|
{
|
|||
|
|
get { return debugLevel; }
|
|||
|
|
set { debugLevel = value; }
|
|||
|
|
}
|
|||
|
|
Entities.DebugMode debugLevel;
|
|||
|
|
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public Entities.LogLevel LogLevel { get { return logLevel; } }
|
|||
|
|
Entities.LogLevel logLevel;
|
|||
|
|
|
|||
|
|
[XmlIgnore]
|
|||
|
|
public IList<Entities.MeasurementCorrection> Corrections { get { return corrections; } }
|
|||
|
|
IList<Entities.MeasurementCorrection> corrections;
|
|||
|
|
|
|||
|
|
protected ComponentCfgBase()
|
|||
|
|
{
|
|||
|
|
itemNr = 0;
|
|||
|
|
debugLevel = Entities.DebugMode.Normal;
|
|||
|
|
logLevel = Entities.LogLevel.Off;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected ComponentCfgBase(Generic.IComponentFactory factory, string name)
|
|||
|
|
: this()
|
|||
|
|
{
|
|||
|
|
this.factory = factory;
|
|||
|
|
this.name = name;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected ComponentCfgBase(Generic.IComponentFactory factory, string name, string parentName)
|
|||
|
|
: this(factory, name)
|
|||
|
|
{
|
|||
|
|
this.parentName = parentName;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void InitCfgBaseFromEntity(Entities.Component cmpntEntity, Generic.IComponentFactory factory)
|
|||
|
|
{
|
|||
|
|
name = cmpntEntity.Name;
|
|||
|
|
parentName = cmpntEntity.ParentName;
|
|||
|
|
itemNr = cmpntEntity.ItemNr;
|
|||
|
|
debugLevel = cmpntEntity.Mode;
|
|||
|
|
logLevel = cmpntEntity.Logging;
|
|||
|
|
corrections = cmpntEntity.Corrections;
|
|||
|
|
this.factory = factory;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|