/// /// Copyright (c) 2013-2015 Sensus Metering Systems /// using System; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; using TBF.BenchControl.Generic; namespace TBF.BenchControl.ResultsPrinters.Basic { public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg { public IComponent GetComponent(IList components) { return new Printer(this); } public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); } /// /// Serialized parameters /// public Entities.PageOrientation PageOrientation; public int TopMargin; public bool SupressPrinting; /// Bypass printing when true /// Private parameterless constructor invoked by all other (public) constructors PrinterCfg() { Name = "BasicResultsPrinter"; ParentName = string.Empty; PageOrientation = Entities.PageOrientation.Portrait; TopMargin = 100; SupressPrinting = false; } public PrinterCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("Name={0}, Orientation={1}, TopMargin={2}, SupressPrinting={3}", Name, PageOrientation, TopMargin, SupressPrinting ? "yes" : "no" ); } } }