54 lines
1.3 KiB
C#
54 lines
1.3 KiB
C#
///
|
|
/// Copyright (c) 2017 Sensus Metering Systems
|
|
///
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Network.Camera.Roi
|
|
{
|
|
public class RoiCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public IComponentCfgCtrl GetControl() { return new RoiCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public string PreviousRoi;
|
|
public string RoiParams;
|
|
public bool UseTestImages;
|
|
public int TestImagesCount;
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcedureParams ProcParams;
|
|
public override IParamsProvider GetProcedureParams() { return ProcParams; }
|
|
public override IParamsProvider CreateProcedureParams(Procedure procedure)
|
|
{
|
|
ProcedureParams procParams = new ProcedureParams();
|
|
procParams.UpdateProcedureParams(Name, procedure);
|
|
return procParams;
|
|
}
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
RoiCfg()
|
|
{
|
|
ProcParams = new ProcedureParams();
|
|
}
|
|
|
|
public RoiCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
Factory = factory;
|
|
ParentName = "Camera";
|
|
RoiParams = string.Empty;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Parent={1}, Params={2}", Name, ParentName, RoiParams);
|
|
}
|
|
}
|
|
}
|