60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 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 IComponent GetComponent(IList<IComponent> components) { return new Printer(this); }
|
|
public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public PageOrientation PageOrientation;
|
|
public bool SupressPrinting; /// Bypass printing when true
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcParams ProcParams;
|
|
public override IParamsProvider GetProcedureParams() { return ProcParams; }
|
|
public override IParamsProvider CreateProcedureParams(Procedure procedure)
|
|
{
|
|
ProcParams procParams = new ProcParams();
|
|
procParams.UpdateProcedureParams(Name, procedure);
|
|
return procParams;
|
|
}
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
PrinterCfg()
|
|
{
|
|
Name = "PrintedProtocol";
|
|
ParentName = string.Empty;
|
|
PageOrientation = PageOrientation.Portrait;
|
|
SupressPrinting = false;
|
|
ProcParams = new ProcParams();
|
|
}
|
|
|
|
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");
|
|
}
|
|
}
|
|
}
|