Everything works OK after serious changes:
- all components, componentCfg-s and parameter providers use base classes - less boilerplate code, simpler access to test/procedure parameters from code - CreateTestParams(test), CreateProcedureParams(procedure) methods added - TestBenchSim class is made static, it is not inheritted by any device anymore
This commit is contained in:
@@ -6,22 +6,12 @@ using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.WMStates
|
||||
{
|
||||
public class EntryForm : Generic.IComponent, IOperation, IDataEntry, IHasWMStatesForm
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasWMStatesForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Name={0}", Name);
|
||||
}
|
||||
|
||||
public override string ToString() { return string.Format("DataEntry.WMStates({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
public Generic.IComponentCfg Cfg { get { return entryFormCfg; } }
|
||||
|
||||
public static void ResetStaticProperties() { }
|
||||
|
||||
public string Name { get { return entryFormCfg.Name; } }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Water meter serial numbers set by forms
|
||||
@@ -64,14 +54,14 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
if (cfg == null) throw new ArgumentNullException("cfg");
|
||||
this.entryFormCfg = cfg;
|
||||
entryFormCfg = cfg;
|
||||
serialNr = new string[Program.WMsCount];
|
||||
wmState = new float[Program.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user