tbf/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs

51 lines
1.4 KiB
C#

///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using Config.Entities;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.ResultsPrinters.Munich
{
public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PrinterCfg) })[0];
protected override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); }
///
/// Serialized parameters
///
public string Version;
public PageOrientation PageOrientation;
public bool SupressPrinting; /// Bypass printing when true
/// Private parameterless constructor invoked by all other (public) constructors
PrinterCfg()
{
Name = "PrintedProtocol";
ParentName = string.Empty;
PageOrientation = PageOrientation.Portrait;
SupressPrinting = false;
}
public PrinterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Orientation={1}, SupressPrinting={2}",
Name,
PageOrientation,
SupressPrinting ? "yes" : "no");
}
}
}