From 03a992d480453634ff06fa85f99368804244868a Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 20 May 2016 12:27:49 +0200 Subject: [PATCH] Munich printer process parameters removed, ver.2.7.290 --- .../ResultsPrinters/Munich/PrinterCfg.cs | 12 -- .../ResultsPrinters/Munich/ProcParams.cs | 125 ------------------ TestBenchFramework/Properties/AssemblyInfo.cs | 4 +- TestBenchFramework/TBF.csproj | 1 - 4 files changed, 2 insertions(+), 140 deletions(-) delete mode 100644 TestBenchFramework/BenchControl/ResultsPrinters/Munich/ProcParams.cs diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs index cf205c0b9..81ab12b3d 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs @@ -22,17 +22,6 @@ namespace TBF.BenchControl.ResultsPrinters.Munich public PageOrientation PageOrientation; public bool SupressPrinting; /// Bypass printing when true - /// Procedure parameters - [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() { @@ -40,7 +29,6 @@ namespace TBF.BenchControl.ResultsPrinters.Munich ParentName = string.Empty; PageOrientation = PageOrientation.Portrait; SupressPrinting = false; - ProcParams = new ProcParams(); } public PrinterCfg(IComponentFactory factory) diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/ProcParams.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/ProcParams.cs deleted file mode 100644 index 810c1931a..000000000 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/ProcParams.cs +++ /dev/null @@ -1,125 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System.IO; -using System.Text; -using System.Xml.Serialization; -using Config.Entities; -using TBF.BenchControl.Generic; -using TBF.Resources; - -namespace TBF.BenchControl.ResultsPrinters.Munich -{ - public class ProcParams : ProcedureParamsBase, IParamsProvider, IProcedureParams - { - public string Version; - public string Zaehlertyp; - public string Pruefvorlage; - public string Eichjahr; - - public override void InitializeAll() - { - Version = "4/13"; - Zaehlertyp = ""; - Pruefvorlage = ""; - Eichjahr = "2014"; - } - - string[] paramNames = new string[] - { - Strings.Version, - "Zählertyp", - "Prüfvorlage", - "Eichjahr", - }; - public override string ParamName(int i) { return paramNames[i]; } - public override int ParamsCount() { return paramNames.Length; } - - public override string ToString(int i) - { - switch (i) - { - case 0: return Version; - case 1: return Zaehlertyp; - case 2: return Pruefvorlage; - case 3: return Eichjahr; - default: return string.Empty; - } - } - - public void UpdateParam(int i, string strValue) - { - switch (i) - { - case 0: Version = strValue; return; - case 1: Zaehlertyp = strValue; return; - case 2: Pruefvorlage = strValue; return; - case 3: Eichjahr = strValue; return; - default: return; - } - } - - public bool ValidateParam(int i, string strValue, out string message) - { - message = string.Empty; - - switch (i) - { - case 0: - case 1: - case 2: - case 3: - return true; - default: - message = "Invalid index"; - return false; - } - } - - void CopyContentTo(ProcParams prms) - { - prms.Version = this.Version; - prms.Zaehlertyp = this.Zaehlertyp; - prms.Pruefvorlage = this.Pruefvorlage; - prms.Eichjahr = this.Eichjahr; - } - - public IParamsProvider Clone() - { - ProcParams pars = new ProcParams(); - CopyContentTo(pars); - return pars; - } - - public override void UpdateProcedureParams(ComponentProcedure dbEntity) - { - if (dbEntity == null) return; - try - { - ProcParams tmp = (ProcParams)(new XmlSerializer(typeof(ProcParams))) - .Deserialize(new StringReader(dbEntity.Parameters)); - - procedureParamsEntity = dbEntity; - componentName = dbEntity.CmpntName; - procedure = dbEntity.Procedure; - - tmp.CopyContentTo(this); - } - catch - { - } - } - - - public ProcParams() - { - } - - public ProcParams(ComponentProcedure procParamsEntity, string componentName, Procedure procedure) - { - this.procedureParamsEntity = procParamsEntity; - this.componentName = componentName; - this.procedure = procedure; - } - } -} diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 582a30c8d..c5f1d4052 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.7.289.1")] -[assembly: AssemblyFileVersion("2.7.289.1")] +[assembly: AssemblyVersion("2.7.290.1")] +[assembly: AssemblyFileVersion("2.7.290.1")] diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index ece856c4d..94ecf6527 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -911,7 +911,6 @@ PrinterCfgCtrl.cs -