Components Initialize() rewritten, double StartChangeHandler() calls avoided, ToString() methods are equl, use ClassName.
This commit is contained in:
@@ -13,7 +13,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString() { return string.Format("DataEntry.Combined({0})", Cfg.ToString(1)); }
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.CompoundWMsCount];
|
||||
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
|
||||
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.CompoundWMsCount];
|
||||
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
|
||||
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
|
||||
currentOp = CurrentOp.None;
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user