diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfg.cs similarity index 85% rename from TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs rename to TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfg.cs index dce6cac91..b94fb43f9 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2016 Sensus Metering Systems +/// Copyright (c) 2016 Sensus Metering Systems /// using System; using System.Collections.Generic; @@ -8,7 +8,7 @@ using System.Xml.Serialization; using Config.Entities; using TBF.BenchControl.Generic; -namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection +namespace TBF.BenchControl.Configs.NameOnly { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.cs similarity index 92% rename from TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.cs rename to TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.cs index 6d529c999..4b5b24f3e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.cs +++ b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.cs @@ -1,12 +1,12 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2016 Sensus Metering Systems /// using System; using System.Windows.Forms; using log4net; using TBF.BenchControl.Generic; -namespace TBF.BenchControl.TestMethods.Adjustment +namespace TBF.BenchControl.Configs.NameOnly { public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl { diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.designer.cs similarity index 96% rename from TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.designer.cs rename to TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.designer.cs index e81165a4f..2ab72a9f2 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.designer.cs +++ b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.designer.cs @@ -1,7 +1,7 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2016 Sensus Metering Systems /// -namespace TBF.BenchControl.TestMethods.Adjustment +namespace TBF.BenchControl.Configs.NameOnly { partial class TestMethodCfgCtrl { diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.resx similarity index 100% rename from TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfgCtrl.resx rename to TestBenchFramework/BenchControl/Configs/NameOnly/TestMethodCfgCtrl.resx diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs deleted file mode 100644 index c9e7c3b7d..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs +++ /dev/null @@ -1,34 +0,0 @@ -/// -/// Copyright (c) 2013-2016 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml.Serialization; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.Adjustment -{ - public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg - { - public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } - - /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "Adjustment"; - ParentName = string.Empty; - } - - public TestMethodCfg(IComponentFactory factory) - : this() - { - this.Factory = factory; - } - - public string ToString(int i) - { - return string.Format("Name={0}", Name); - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs index d7eddf5ce..9d96b4fbd 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.Adjustment { @@ -16,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg("Adjustment", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs deleted file mode 100644 index e4f511b9b..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs +++ /dev/null @@ -1,34 +0,0 @@ -/// -/// Copyright (c) 2015-2016 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml.Serialization; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FixedStartAdvanced -{ - public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg - { - public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } - - /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "FixedStartAdvanced"; - ParentName = string.Empty; - } - - public TestMethodCfg(IComponentFactory factory) - : this() - { - this.Factory = factory; - } - - public string ToString(int i) - { - return string.Format("Name={0}", Name); - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.cs deleted file mode 100644 index 3a32735c3..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2015 Sensus Metering Systems -/// -using System; -using System.Windows.Forms; -using log4net; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FixedStartAdvanced -{ - public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl - { - static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl)); - - public bool ShowMore { get { return false; } } - - TestMethodCfg config; - public IComponentCfg Config - { - get { return config as IComponentCfg; } - set - { - config = value as TestMethodCfg; - Redraw(); - } - } - - public TestMethodCfgCtrl() - { - InitializeComponent(); - } - - private void EntryFormCfgCtrl_Load(object sender, EventArgs e) - { - Redraw(); - } - - public void Closing() - { - } - - void Redraw() - { - if (config == null) return; /// Control was not loaded, settings were not changed - classNameLabel.Text = config.Factory.ClassName; - nameTextBox.Text = config.Name; - } - - public void Unlock() - { - nameTextBox.Enabled = true; - } - - public CfgUpdateFlags VerifyCfg(ref string message) - { - CfgUpdateFlags flags = CfgUpdateFlags.None; - return flags; - } - - public CfgUpdateFlags UpdateCfg() - { - CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd; - - if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed - - config.Name = nameTextBox.Text; - - return flags; - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.designer.cs deleted file mode 100644 index 2bfbc8e29..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// Copyright (c) 2015 Sensus Metering Systems -/// -namespace TBF.BenchControl.TestMethods.FixedStartAdvanced -{ - partial class TestMethodCfgCtrl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(137, 57); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 5; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(27, 60); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 4; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(134, 33); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(83, 13); - this.classNameLabel.TabIndex = 3; - this.classNameLabel.Text = "ComonentName"; - // - // BasicPrinterCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "BasicPrinterCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label classNameLabel; - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfgCtrl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs index 5684dbd43..a09b781c1 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.FixedStartAdvanced { @@ -16,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg("FixedStartAdvanced", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs deleted file mode 100644 index ade19d727..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs +++ /dev/null @@ -1,34 +0,0 @@ -/// -/// Copyright (c) 2013-2016 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml.Serialization; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters -{ - public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg - { - public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } - - /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "FixedStartCombinedMeters"; - ParentName = string.Empty; - } - - public TestMethodCfg(IComponentFactory factory) - : this() - { - this.Factory = factory; - } - - public string ToString(int i) - { - return string.Format("Name={0}", Name); - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.cs deleted file mode 100644 index 8bde5527f..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System; -using System.Windows.Forms; -using log4net; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters -{ - public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl - { - static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl)); - - public bool ShowMore { get { return false; } } - - TestMethodCfg config; - public IComponentCfg Config - { - get { return config as IComponentCfg; } - set - { - config = value as TestMethodCfg; - Redraw(); - } - } - - public TestMethodCfgCtrl() - { - InitializeComponent(); - } - - private void EntryFormCfgCtrl_Load(object sender, EventArgs e) - { - Redraw(); - } - - public void Closing() - { - } - - void Redraw() - { - if (config == null) return; /// Control was not loaded, settings were not changed - classNameLabel.Text = config.Factory.ClassName; - nameTextBox.Text = config.Name; - } - - public void Unlock() - { - nameTextBox.Enabled = true; - } - - public CfgUpdateFlags VerifyCfg(ref string message) - { - CfgUpdateFlags flags = CfgUpdateFlags.None; - return flags; - } - - public CfgUpdateFlags UpdateCfg() - { - CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd; - - if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed - - config.Name = nameTextBox.Text; - - return flags; - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.designer.cs deleted file mode 100644 index 738577fe6..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters -{ - partial class TestMethodCfgCtrl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(137, 57); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 5; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(27, 60); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 4; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(134, 33); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(83, 13); - this.classNameLabel.TabIndex = 3; - this.classNameLabel.Text = "ComonentName"; - // - // BasicPrinterCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "BasicPrinterCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label classNameLabel; - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfgCtrl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs index 2b5270910..035421872 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters { @@ -16,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg("FixedStartCombinedMeters", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs deleted file mode 100644 index 028a52041..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs +++ /dev/null @@ -1,34 +0,0 @@ -/// -/// Copyright (c) 2013-2016 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml.Serialization; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FixedStartMassCollection -{ - public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg - { - public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } - - /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "FixedStartMassCollection"; - ParentName = string.Empty; - } - - public TestMethodCfg(IComponentFactory factory) - : this() - { - this.Factory = factory; - } - - public string ToString(int i) - { - return string.Format("Name={0}", Name); - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs deleted file mode 100644 index e47ce3584..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System; -using System.Windows.Forms; -using log4net; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FixedStartMassCollection -{ - public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl - { - static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl)); - - public bool ShowMore { get { return false; } } - - TestMethodCfg config; - public IComponentCfg Config - { - get { return config as IComponentCfg; } - set - { - config = value as TestMethodCfg; - Redraw(); - } - } - - public TestMethodCfgCtrl() - { - InitializeComponent(); - } - - private void EntryFormCfgCtrl_Load(object sender, EventArgs e) - { - Redraw(); - } - - public void Closing() - { - } - - void Redraw() - { - if (config == null) return; /// Control was not loaded, settings were not changed - classNameLabel.Text = config.Factory.ClassName; - nameTextBox.Text = config.Name; - } - - public void Unlock() - { - nameTextBox.Enabled = true; - } - - public CfgUpdateFlags VerifyCfg(ref string message) - { - CfgUpdateFlags flags = CfgUpdateFlags.None; - return flags; - } - - public CfgUpdateFlags UpdateCfg() - { - CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd; - - if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed - - config.Name = nameTextBox.Text; - - return flags; - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.designer.cs deleted file mode 100644 index 0cdfa5308..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -namespace TBF.BenchControl.TestMethods.FixedStartMassCollection -{ - partial class TestMethodCfgCtrl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(137, 57); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 5; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(27, 60); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 4; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(134, 33); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(83, 13); - this.classNameLabel.TabIndex = 3; - this.classNameLabel.Text = "ComonentName"; - // - // BasicPrinterCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "BasicPrinterCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label classNameLabel; - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfgCtrl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs index 69367980d..2f207c743 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.FixedStartMassCollection { @@ -16,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg("FixedStartMassCollection", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs deleted file mode 100644 index e8944faeb..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs +++ /dev/null @@ -1,34 +0,0 @@ -/// -/// Copyright (c) 2013-2016 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml.Serialization; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FlyingStart -{ - public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg - { - public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } - - /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "FlyingStart"; - ParentName = string.Empty; - } - - public TestMethodCfg(IComponentFactory factory) - : this() - { - this.Factory = factory; - } - - public string ToString(int i) - { - return string.Format("Name={0}", Name); - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs deleted file mode 100644 index a2477e6bd..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System; -using System.Windows.Forms; -using log4net; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FlyingStart -{ - public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl - { - static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl)); - - public bool ShowMore { get { return false; } } - - TestMethodCfg config; - public IComponentCfg Config - { - get { return config as IComponentCfg; } - set - { - config = value as TestMethodCfg; - Redraw(); - } - } - - public TestMethodCfgCtrl() - { - InitializeComponent(); - } - - private void EntryFormCfgCtrl_Load(object sender, EventArgs e) - { - Redraw(); - } - - public void Closing() - { - } - - void Redraw() - { - if (config == null) return; /// Control was not loaded, settings were not changed - classNameLabel.Text = config.Factory.ClassName; - nameTextBox.Text = config.Name; - } - - public void Unlock() - { - nameTextBox.Enabled = true; - } - - public CfgUpdateFlags VerifyCfg(ref string message) - { - CfgUpdateFlags flags = CfgUpdateFlags.None; - return flags; - } - - public CfgUpdateFlags UpdateCfg() - { - CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd; - - if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed - - config.Name = nameTextBox.Text; - - return flags; - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.designer.cs deleted file mode 100644 index 4d04ca3ec..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -namespace TBF.BenchControl.TestMethods.FlyingStart -{ - partial class TestMethodCfgCtrl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(137, 57); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 5; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(27, 60); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 4; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(134, 33); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(83, 13); - this.classNameLabel.TabIndex = 3; - this.classNameLabel.Text = "ComonentName"; - // - // BasicPrinterCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "BasicPrinterCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label classNameLabel; - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfgCtrl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs index b3df97914..91b87527c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.FlyingStart { @@ -16,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg("FlyingStart", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.cs deleted file mode 100644 index d1b89cc0c..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System; -using System.Windows.Forms; -using log4net; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection -{ - public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl - { - static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl)); - - public bool ShowMore { get { return false; } } - - TestMethodCfg config; - public IComponentCfg Config - { - get { return config as IComponentCfg; } - set - { - config = value as TestMethodCfg; - Redraw(); - } - } - - public TestMethodCfgCtrl() - { - InitializeComponent(); - } - - private void EntryFormCfgCtrl_Load(object sender, EventArgs e) - { - Redraw(); - } - - public void Closing() - { - } - - void Redraw() - { - if (config == null) return; /// Control was not loaded, settings were not changed - classNameLabel.Text = config.Factory.ClassName; - nameTextBox.Text = config.Name; - } - - public void Unlock() - { - nameTextBox.Enabled = true; - } - - public CfgUpdateFlags VerifyCfg(ref string message) - { - CfgUpdateFlags flags = CfgUpdateFlags.None; - return flags; - } - - public CfgUpdateFlags UpdateCfg() - { - CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd; - - if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed - - config.Name = nameTextBox.Text; - - return flags; - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.designer.cs deleted file mode 100644 index 5e96e6693..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection -{ - partial class TestMethodCfgCtrl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(137, 57); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 5; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(27, 60); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 4; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(134, 33); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(83, 13); - this.classNameLabel.TabIndex = 3; - this.classNameLabel.Text = "ComonentName"; - // - // BasicPrinterCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "BasicPrinterCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label classNameLabel; - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfgCtrl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs index 468eb0218..66ec254e8 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection { diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs deleted file mode 100644 index df4104f47..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs +++ /dev/null @@ -1,34 +0,0 @@ -/// -/// Copyright (c) 2013-2016 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.IO; -using System.Xml.Serialization; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration -{ - public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg - { - public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } - - /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "ReferenceFlowmeterCalibration"; - ParentName = string.Empty; - } - - public TestMethodCfg(IComponentFactory factory) - : this() - { - this.Factory = factory; - } - - public string ToString(int i) - { - return string.Format("Name={0}", Name); - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs deleted file mode 100644 index a9d3f6653..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System; -using System.Windows.Forms; -using log4net; -using TBF.BenchControl.Generic; - -namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration -{ - public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl - { - static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl)); - - public bool ShowMore { get { return false; } } - - TestMethodCfg config; - public IComponentCfg Config - { - get { return config as IComponentCfg; } - set - { - config = value as TestMethodCfg; - Redraw(); - } - } - - public TestMethodCfgCtrl() - { - InitializeComponent(); - } - - private void EntryFormCfgCtrl_Load(object sender, EventArgs e) - { - Redraw(); - } - - public void Closing() - { - } - - void Redraw() - { - if (config == null) return; /// Control was not loaded, settings were not changed - classNameLabel.Text = config.Factory.ClassName; - nameTextBox.Text = config.Name; - } - - public void Unlock() - { - nameTextBox.Enabled = true; - } - - public CfgUpdateFlags VerifyCfg(ref string message) - { - CfgUpdateFlags flags = CfgUpdateFlags.None; - return flags; - } - - public CfgUpdateFlags UpdateCfg() - { - CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd; - - if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed - - config.Name = nameTextBox.Text; - - return flags; - } - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.designer.cs deleted file mode 100644 index 285f72e86..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration -{ - partial class TestMethodCfgCtrl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(137, 57); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 5; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(27, 60); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 4; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(134, 33); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(83, 13); - this.classNameLabel.TabIndex = 3; - this.classNameLabel.Text = "ComonentName"; - // - // BasicPrinterCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "BasicPrinterCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label classNameLabel; - } -} diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.resx b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfgCtrl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs index ba73a866b..13b2cc50a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs @@ -3,6 +3,7 @@ /// using System.Collections.Generic; using TBF.BenchControl.Generic; +using TBF.BenchControl.Configs.NameOnly; namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration { @@ -16,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg("ReferenceFlowmeterCalibration", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index b270cd7e3..7b3d0427a 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -171,6 +171,13 @@ ComponentCfgCtrl.cs + + + UserControl + + + TestMethodCfgCtrl.cs + Form @@ -498,23 +505,9 @@ - - - UserControl - - - TestMethodCfgCtrl.cs - - - - UserControl - - - TestMethodCfgCtrl.cs - @@ -952,13 +945,6 @@ - - - UserControl - - - TestMethodCfgCtrl.cs - Form @@ -997,34 +983,13 @@ - - - UserControl - - - TestMethodCfgCtrl.cs - - - - UserControl - - - TestMethodCfgCtrl.cs - - - - UserControl - - - TestMethodCfgCtrl.cs - @@ -1050,13 +1015,6 @@ - - - UserControl - - - TestMethodCfgCtrl.cs - @@ -1501,6 +1459,9 @@ IdcCameraCfgCtrl.cs + + TestMethodCfgCtrl.cs + PumpCfgCtrl.cs @@ -1708,9 +1669,6 @@ WriterCfgCtrl.cs - - TestMethodCfgCtrl.cs - WMErrorsForm.cs @@ -1729,21 +1687,6 @@ TestMethodCfgCtrl.cs - - TestMethodCfgCtrl.cs - - - TestMethodCfgCtrl.cs - - - TestMethodCfgCtrl.cs - - - TestMethodCfgCtrl.cs - - - TestMethodCfgCtrl.cs - TestMethodCfgCtrl.cs @@ -1759,9 +1702,6 @@ TestMethodCfgCtrl.cs - - TestMethodCfgCtrl.cs - WaterMeterCfgCtrl.cs