49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
///
|
|
/// Copyright (c) 2017 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.Generic;
|
|
using TBF.Resources;
|
|
|
|
namespace TBF.BenchControl.TestMethods.GrabImage
|
|
{
|
|
public class GrabImageCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(GrabImageCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new GrabImageCfgCtrl(); }
|
|
|
|
|
|
public string ImageFileName;
|
|
public bool BlackAndWhite;
|
|
public bool LowResolution;
|
|
public ImageRotation ImageRotation;
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
GrabImageCfg() {}
|
|
|
|
public GrabImageCfg(IComponentFactory factory, string name)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
Name = name;
|
|
ParentName = string.Empty;
|
|
BlackAndWhite = false;
|
|
LowResolution = true;
|
|
ImageRotation = ImageRotation.None;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Img={1}, B&W={2}, LowRes={3}, Rotation={4}",
|
|
Name, ImageFileName, BlackAndWhite, LowResolution, ImageRotation);
|
|
}
|
|
}
|
|
}
|