55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
///
|
|
/// Copyright (c) 2017 Sensus Metering Systems
|
|
///
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
|
{
|
|
public class RoiCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(RoiCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new RoiCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public bool BlackAndWhite;
|
|
public bool LowResolution;
|
|
public ImageRotation ImageRotation;
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcedureParams ProcParams;
|
|
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
|
|
public override IParamsProvider CreateProcParamsProvider() { return new ProcedureParams(true); }
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
RoiCfg()
|
|
{
|
|
ProcParams = new ProcedureParams(true);
|
|
}
|
|
|
|
public RoiCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
Factory = factory;
|
|
ParentName = "Camera";
|
|
BlackAndWhite = false;
|
|
LowResolution = true;
|
|
ImageRotation = ImageRotation.None;
|
|
DebugLevel = DebugMode.Inherit;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("{0} Camera={1} B&W={2}, LowRes={3}, Rotation={4}",
|
|
Name, ParentName, BlackAndWhite, LowResolution, ImageRotation);
|
|
}
|
|
}
|
|
}
|