tbf/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfgCtrl.cs
Milan Hanajik 54ef1e1216 - added BenchControl/Operations/ProcessDataLoggingOp.cs (forgotten in previous commits)
- fixed a bug in displayng results and progress controls when two tests had the same name
- some work on data entry forms for FixedStartMassCollection method - not finished yet
2014-09-16 16:09:07 +02:00

59 lines
1.1 KiB
C#

using System;
using System.Windows.Forms;
using log4net;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.WMStates
{
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
{
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
EntryFormCfg config;
public IComponentCfg Config
{
get { return config as IComponentCfg; }
set
{
config = value as EntryFormCfg;
Redraw();
}
}
public EntryFormCfgCtrl()
{
InitializeComponent();
}
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
{
Redraw();
}
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 CfgVerifyFlags VerifyCfg(ref string message)
{
CfgVerifyFlags flags = CfgVerifyFlags.None;
return flags;
}
public void UpdateCfg()
{
if (config == null) return; /// Control was not loaded, settings were not changed
config.Name = nameTextBox.Text;
}
}
}