DataEntry.StandardCamera, Camera.RoiForFixedStart and FixedStartMassCollectionSeq changes, etc, ver. 2.15.632
This commit is contained in:
parent
17940d453c
commit
527da6bcc5
@ -625,7 +625,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.Controls.Add(this.checkBox24);
|
||||
this.Controls.Add(this.comboBox24);
|
||||
this.Controls.Add(this.label24);
|
||||
|
||||
@ -248,7 +248,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.ClientSize = new System.Drawing.Size(559, 566);
|
||||
this.Controls.Add(this.groupBox6);
|
||||
this.Controls.Add(this.groupBox5);
|
||||
|
||||
@ -1,20 +1,296 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntryForCamera, IHasWMStatesForm, IHasCycleBeginForm, IHasCycleEndForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
|
||||
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
|
||||
|
||||
public string[] StartImages
|
||||
{
|
||||
get { return startImages; }
|
||||
set { startImages = value; }
|
||||
}
|
||||
string[] startImages;
|
||||
|
||||
public string[] EndImages
|
||||
{
|
||||
get { return endImages; }
|
||||
set { endImages = value; }
|
||||
}
|
||||
string[] endImages;
|
||||
|
||||
public bool SaveImages
|
||||
{
|
||||
get { return entryFormCfg.SaveImages; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
/// </summary>
|
||||
string purchaseOrder;
|
||||
public string PurchaseOrder { get { return purchaseOrder; } }
|
||||
|
||||
bool[] disabled; /// This array is shared between forms
|
||||
|
||||
string[] wmCycleEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
||||
|
||||
double[] wmStartState;
|
||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||
|
||||
double[] wmEndState;
|
||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||
|
||||
string[] wmStartStateStr;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
EnterTestStartStates,
|
||||
EnterTestEndStates,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryForm myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, startImages, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, startImages, endImages, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
if (entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestEndStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
|
||||
if (!resultSaved) /// This is to save the result only once
|
||||
{
|
||||
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
|
||||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
waterMeters[i].SerialNr = dlg.SNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
resultSaved = true;
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
return Event.ModelessFormClosed; /// Form closed
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (modelessDlg is IHasCompleted)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
modelessDlg = null;
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,16 +21,16 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
///
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
public bool SensusExtensions;
|
||||
public bool SaveImages;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
Name = "DataEntry-Standard-24";
|
||||
Name = "DataEntry-for-Camera";
|
||||
ParentName = string.Empty;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
SensusExtensions = false;
|
||||
SaveImages = false;
|
||||
}
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
@ -41,7 +41,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}, SensusExt={3}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm, SensusExtensions);
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}, SensusExt={3}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm, SaveImages);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
enterSNsAtTheEndCheckBox.Text = Strings.Enter_SNs_at_the_end;
|
||||
showEndStateFormCheckBox.Text = Strings.Show_cycle_end_form;
|
||||
sensusExtensionsCheckBox.Text = Strings.Sensus_extensions;
|
||||
saveImagesCheckBox.Text = "Save images";
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
@ -55,7 +55,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
nameTextBox.Text = config.Name;
|
||||
enterSNsAtTheEndCheckBox.Checked = config.EnterSerialNrsAtTheEnd;
|
||||
showEndStateFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
sensusExtensionsCheckBox.Checked = config.SensusExtensions;
|
||||
saveImagesCheckBox.Checked = config.SaveImages;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
@ -63,7 +63,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
nameTextBox.Enabled = true;
|
||||
enterSNsAtTheEndCheckBox.Enabled = true;
|
||||
showEndStateFormCheckBox.Enabled = true;
|
||||
sensusExtensionsCheckBox.Enabled = true;
|
||||
saveImagesCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
@ -81,7 +81,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
config.Name = nameTextBox.Text;
|
||||
config.EnterSerialNrsAtTheEnd = enterSNsAtTheEndCheckBox.Checked;
|
||||
config.ShowCycleEndForm = showEndStateFormCheckBox.Checked;
|
||||
config.SensusExtensions = sensusExtensionsCheckBox.Checked;
|
||||
config.SaveImages = saveImagesCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@ -31,88 +31,88 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
/// </summary>
|
||||
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.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.sensusExtensionsCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(35, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(96, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(99, 112);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(99, 89);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// sensusExtensionsCheckBox
|
||||
//
|
||||
this.sensusExtensionsCheckBox.AutoSize = true;
|
||||
this.sensusExtensionsCheckBox.Enabled = false;
|
||||
this.sensusExtensionsCheckBox.Location = new System.Drawing.Point(99, 135);
|
||||
this.sensusExtensionsCheckBox.Name = "sensusExtensionsCheckBox";
|
||||
this.sensusExtensionsCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.sensusExtensionsCheckBox.TabIndex = 5;
|
||||
this.sensusExtensionsCheckBox.Text = "Sensus production extensions";
|
||||
this.sensusExtensionsCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.sensusExtensionsCheckBox);
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.saveImagesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(35, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(96, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(99, 112);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(99, 89);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// saveImagesCheckBox
|
||||
//
|
||||
this.saveImagesCheckBox.AutoSize = true;
|
||||
this.saveImagesCheckBox.Enabled = false;
|
||||
this.saveImagesCheckBox.Location = new System.Drawing.Point(99, 135);
|
||||
this.saveImagesCheckBox.Name = "saveImagesCheckBox";
|
||||
this.saveImagesCheckBox.Size = new System.Drawing.Size(87, 17);
|
||||
this.saveImagesCheckBox.TabIndex = 5;
|
||||
this.saveImagesCheckBox.Text = "Save images";
|
||||
this.saveImagesCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.saveImagesCheckBox);
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@ -123,6 +123,6 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox showEndStateFormCheckBox;
|
||||
private System.Windows.Forms.CheckBox enterSNsAtTheEndCheckBox;
|
||||
private System.Windows.Forms.CheckBox sensusExtensionsCheckBox;
|
||||
private System.Windows.Forms.CheckBox saveImagesCheckBox;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,276 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return true; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
/// </summary>
|
||||
string purchaseOrder;
|
||||
public string PurchaseOrder { get { return purchaseOrder; } }
|
||||
|
||||
bool[] disabled; /// This array is shared between forms
|
||||
|
||||
string[] wmCycleEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
||||
|
||||
double[] wmStartState;
|
||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||
|
||||
double[] wmEndState;
|
||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||
|
||||
string[] wmStartStateStr;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
EnterTestStartStates,
|
||||
EnterTestEndStates,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryFormNoStartEnd myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
if (entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestEndStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
|
||||
if (!resultSaved) /// This is to save the result only once
|
||||
{
|
||||
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
|
||||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
waterMeters[i].SerialNr = dlg.SNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
resultSaved = true;
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
return Event.ModelessFormClosed; /// Form closed
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (modelessDlg is IHasCompleted)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
modelessDlg = null;
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,11 +8,11 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry-Standard-Camera"; } }
|
||||
public string ClassName { get { return "DataEntry-Camera"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
|
||||
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
public class FactoryNoStartEnd : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry-Standard-Camera-NoStartEnd"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(EntryFormCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
@ -22,6 +23,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
|
||||
readonly bool[] disabled;
|
||||
|
||||
readonly string[] startImages;
|
||||
readonly string[] endImages;
|
||||
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
|
||||
@ -95,14 +100,21 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(int waterMetersCount, string[] startImages, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.startImages = startImages;
|
||||
this.disabled = disabled;
|
||||
|
||||
if (startImages == null || startImages.Length != waterMetersCount)
|
||||
{
|
||||
throw (new Exception("Invalid 'startImages' argument"));
|
||||
}
|
||||
|
||||
this.endImages = new string[waterMetersCount];
|
||||
int lineSize = (WaterMetersCount <= 6) ? WaterMetersCount : Config.Data.LineSize;
|
||||
DeterminePhysPosWMPos(TextBoxesCount, WaterMetersCount, lineSize, out phys2wm, out wm2phys);
|
||||
|
||||
@ -119,15 +131,24 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
public TestStartEndForm(int waterMetersCount, string[] startImages, string[] endImages, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.startImages = startImages;
|
||||
this.endImages = endImages;
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
|
||||
if (startImages == null || startImages.Length != waterMetersCount ||
|
||||
endImages == null || endImages.Length != waterMetersCount ||
|
||||
wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
{
|
||||
throw (new Exception("Invalid argument(s)"));
|
||||
}
|
||||
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
this.disabled = disabled;
|
||||
this.refVolume = refVolume;
|
||||
@ -342,36 +363,6 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, TextBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledTextBoxes.Count; i++)
|
||||
{
|
||||
if (enabledTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledTextBoxes[(i + 1) % enabledTextBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox1); }
|
||||
private void startTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox2); }
|
||||
private void startTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox3); }
|
||||
@ -421,5 +412,160 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
private void endTextBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox22); }
|
||||
private void endTextBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox23); }
|
||||
private void endTextBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox24); }
|
||||
///
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, TextBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledTextBoxes.Count; i++)
|
||||
{
|
||||
if (enabledTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledTextBoxes[(i + 1) % enabledTextBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void startTextBox1_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(0); }
|
||||
private void startTextBox2_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(1); }
|
||||
private void startTextBox3_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(2); }
|
||||
private void startTextBox4_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(3); }
|
||||
private void startTextBox5_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(4); }
|
||||
private void startTextBox6_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(5); }
|
||||
private void startTextBox7_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(6); }
|
||||
private void startTextBox8_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(7); }
|
||||
private void startTextBox9_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(8); }
|
||||
private void startTextBox10_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(9); }
|
||||
private void startTextBox11_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(10); }
|
||||
private void startTextBox12_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(11); }
|
||||
private void startTextBox13_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(12); }
|
||||
private void startTextBox14_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(13); }
|
||||
private void startTextBox15_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(14); }
|
||||
private void startTextBox16_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(15); }
|
||||
private void startTextBox17_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(16); }
|
||||
private void startTextBox18_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(17); }
|
||||
private void startTextBox19_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(18); }
|
||||
private void startTextBox20_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(19); }
|
||||
private void startTextBox21_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(20); }
|
||||
private void startTextBox22_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(21); }
|
||||
private void startTextBox23_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(22); }
|
||||
private void startTextBox24_AcceptsTabChanged(object sender, EventArgs e) { LoadStartImage(23); }
|
||||
private void startTextBox1_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(0); }
|
||||
private void startTextBox2_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(1); }
|
||||
private void startTextBox3_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(2); }
|
||||
private void startTextBox4_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(3); }
|
||||
private void startTextBox5_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(4); }
|
||||
private void startTextBox6_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(5); }
|
||||
private void startTextBox7_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(6); }
|
||||
private void startTextBox8_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(7); }
|
||||
private void startTextBox9_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(8); }
|
||||
private void startTextBox10_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(9); }
|
||||
private void startTextBox11_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(10); }
|
||||
private void startTextBox12_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(11); }
|
||||
private void startTextBox13_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(12); }
|
||||
private void startTextBox14_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(13); }
|
||||
private void startTextBox15_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(14); }
|
||||
private void startTextBox16_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(15); }
|
||||
private void startTextBox17_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(16); }
|
||||
private void startTextBox18_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(17); }
|
||||
private void startTextBox19_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(18); }
|
||||
private void startTextBox20_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(19); }
|
||||
private void startTextBox21_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(20); }
|
||||
private void startTextBox22_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(21); }
|
||||
private void startTextBox23_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(22); }
|
||||
private void startTextBox24_MouseDown(object sender, MouseEventArgs e) { LoadStartImage(23); }
|
||||
///
|
||||
void LoadStartImage(int physPos)
|
||||
{
|
||||
int wmNr = phys2wm[physPos];
|
||||
if (wmNr > 0 && startImages[wmNr - 1] != null)
|
||||
{
|
||||
pictureBox1.Image = Image.FromFile(startImages[wmNr - 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox1.Image = new Bitmap(TBF.Properties.Resources.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private void endTextBox1_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(0); }
|
||||
private void endTextBox2_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(1); }
|
||||
private void endTextBox3_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(2); }
|
||||
private void endTextBox4_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(3); }
|
||||
private void endTextBox5_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(4); }
|
||||
private void endTextBox6_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(5); }
|
||||
private void endTextBox7_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(6); }
|
||||
private void endTextBox8_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(7); }
|
||||
private void endTextBox9_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(8); }
|
||||
private void endTextBox10_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(9); }
|
||||
private void endTextBox11_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(10); }
|
||||
private void endTextBox12_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(11); }
|
||||
private void endTextBox13_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(12); }
|
||||
private void endTextBox14_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(13); }
|
||||
private void endTextBox15_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(14); }
|
||||
private void endTextBox16_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(15); }
|
||||
private void endTextBox17_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(16); }
|
||||
private void endTextBox18_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(17); }
|
||||
private void endTextBox19_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(18); }
|
||||
private void endTextBox20_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(19); }
|
||||
private void endTextBox21_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(20); }
|
||||
private void endTextBox22_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(21); }
|
||||
private void endTextBox24_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(22); }
|
||||
private void endTextBox23_AcceptsTabChanged(object sender, EventArgs e) { LoadEndImage(23); }
|
||||
private void endTextBox1_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(0); }
|
||||
private void endTextBox2_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(1); }
|
||||
private void endTextBox3_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(2); }
|
||||
private void endTextBox4_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(3); }
|
||||
private void endTextBox5_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(4); }
|
||||
private void endTextBox6_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(5); }
|
||||
private void endTextBox7_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(6); }
|
||||
private void endTextBox8_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(7); }
|
||||
private void endTextBox9_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(8); }
|
||||
private void endTextBox10_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(9); }
|
||||
private void endTextBox11_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(10); }
|
||||
private void endTextBox12_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(11); }
|
||||
private void endTextBox13_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(12); }
|
||||
private void endTextBox14_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(13); }
|
||||
private void endTextBox15_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(14); }
|
||||
private void endTextBox16_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(15); }
|
||||
private void endTextBox17_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(16); }
|
||||
private void endTextBox18_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(17); }
|
||||
private void endTextBox19_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(18); }
|
||||
private void endTextBox20_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(19); }
|
||||
private void endTextBox21_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(20); }
|
||||
private void endTextBox22_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(21); }
|
||||
private void endTextBox23_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(22); }
|
||||
private void endTextBox24_MouseDown(object sender, MouseEventArgs e) { LoadEndImage(22); }
|
||||
///
|
||||
void LoadEndImage(int physPos)
|
||||
{
|
||||
int wmNr = phys2wm[physPos];
|
||||
if (wmNr > 0 && endImages[wmNr - 1] != null)
|
||||
{
|
||||
pictureBox1.Image = Image.FromFile(endImages[wmNr - 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox1.Image = new Bitmap(TBF.Properties.Resources.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox1.TabIndex = 3;
|
||||
this.startTextBox1.Visible = false;
|
||||
this.startTextBox1.AcceptsTabChanged += new System.EventHandler(this.startTextBox1_AcceptsTabChanged);
|
||||
this.startTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox1_KeyPress);
|
||||
this.startTextBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox1_MouseDown);
|
||||
//
|
||||
// endTextBox1
|
||||
//
|
||||
@ -170,8 +172,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox1.TabIndex = 4;
|
||||
this.endTextBox1.Visible = false;
|
||||
this.endTextBox1.AcceptsTabChanged += new System.EventHandler(this.endTextBox1_AcceptsTabChanged);
|
||||
this.endTextBox1.TextChanged += new System.EventHandler(this.endTextBox1_TextChanged);
|
||||
this.endTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox1_KeyPress);
|
||||
this.endTextBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox1_MouseDown);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@ -217,7 +221,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox3.TabIndex = 11;
|
||||
this.startTextBox3.Visible = false;
|
||||
this.startTextBox3.AcceptsTabChanged += new System.EventHandler(this.startTextBox3_AcceptsTabChanged);
|
||||
this.startTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox3_KeyPress);
|
||||
this.startTextBox3.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox3_MouseDown);
|
||||
//
|
||||
// endTextBox3
|
||||
//
|
||||
@ -228,8 +234,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox3.TabIndex = 12;
|
||||
this.endTextBox3.Visible = false;
|
||||
this.endTextBox3.AcceptsTabChanged += new System.EventHandler(this.endTextBox3_AcceptsTabChanged);
|
||||
this.endTextBox3.TextChanged += new System.EventHandler(this.endTextBox3_TextChanged);
|
||||
this.endTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox3_KeyPress);
|
||||
this.endTextBox3.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox3_MouseDown);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
@ -263,7 +271,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox4.TabIndex = 15;
|
||||
this.startTextBox4.Visible = false;
|
||||
this.startTextBox4.AcceptsTabChanged += new System.EventHandler(this.startTextBox4_AcceptsTabChanged);
|
||||
this.startTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox4_KeyPress);
|
||||
this.startTextBox4.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox4_MouseDown);
|
||||
//
|
||||
// endTextBox4
|
||||
//
|
||||
@ -274,8 +284,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox4.TabIndex = 16;
|
||||
this.endTextBox4.Visible = false;
|
||||
this.endTextBox4.AcceptsTabChanged += new System.EventHandler(this.endTextBox4_AcceptsTabChanged);
|
||||
this.endTextBox4.TextChanged += new System.EventHandler(this.endTextBox4_TextChanged);
|
||||
this.endTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox4_KeyPress);
|
||||
this.endTextBox4.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox4_MouseDown);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
@ -309,7 +321,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox5.TabIndex = 19;
|
||||
this.startTextBox5.Visible = false;
|
||||
this.startTextBox5.AcceptsTabChanged += new System.EventHandler(this.startTextBox5_AcceptsTabChanged);
|
||||
this.startTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox5_KeyPress);
|
||||
this.startTextBox5.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox5_MouseDown);
|
||||
//
|
||||
// endTextBox5
|
||||
//
|
||||
@ -320,8 +334,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox5.TabIndex = 20;
|
||||
this.endTextBox5.Visible = false;
|
||||
this.endTextBox5.AcceptsTabChanged += new System.EventHandler(this.endTextBox5_AcceptsTabChanged);
|
||||
this.endTextBox5.TextChanged += new System.EventHandler(this.endTextBox5_TextChanged);
|
||||
this.endTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox5_KeyPress);
|
||||
this.endTextBox5.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox5_MouseDown);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
@ -355,7 +371,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox6.TabIndex = 23;
|
||||
this.startTextBox6.Visible = false;
|
||||
this.startTextBox6.AcceptsTabChanged += new System.EventHandler(this.startTextBox6_AcceptsTabChanged);
|
||||
this.startTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox6_KeyPress);
|
||||
this.startTextBox6.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox6_MouseDown);
|
||||
//
|
||||
// endTextBox6
|
||||
//
|
||||
@ -366,8 +384,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox6.TabIndex = 24;
|
||||
this.endTextBox6.Visible = false;
|
||||
this.endTextBox6.AcceptsTabChanged += new System.EventHandler(this.endTextBox6_AcceptsTabChanged);
|
||||
this.endTextBox6.TextChanged += new System.EventHandler(this.endTextBox6_TextChanged);
|
||||
this.endTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox6_KeyPress);
|
||||
this.endTextBox6.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox6_MouseDown);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
@ -420,8 +440,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox2.TabIndex = 8;
|
||||
this.endTextBox2.Visible = false;
|
||||
this.endTextBox2.AcceptsTabChanged += new System.EventHandler(this.endTextBox2_AcceptsTabChanged);
|
||||
this.endTextBox2.TextChanged += new System.EventHandler(this.endTextBox2_TextChanged);
|
||||
this.endTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox2_KeyPress);
|
||||
this.endTextBox2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox2_MouseDown);
|
||||
//
|
||||
// startTextBox2
|
||||
//
|
||||
@ -432,7 +454,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox2.TabIndex = 7;
|
||||
this.startTextBox2.Visible = false;
|
||||
this.startTextBox2.AcceptsTabChanged += new System.EventHandler(this.startTextBox2_AcceptsTabChanged);
|
||||
this.startTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox2_KeyPress);
|
||||
this.startTextBox2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox2_MouseDown);
|
||||
//
|
||||
// exclamation2
|
||||
//
|
||||
@ -467,7 +491,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox7.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox7.TabIndex = 27;
|
||||
this.startTextBox7.Visible = false;
|
||||
this.startTextBox7.AcceptsTabChanged += new System.EventHandler(this.startTextBox7_AcceptsTabChanged);
|
||||
this.startTextBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox7_KeyPress);
|
||||
this.startTextBox7.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox7_MouseDown);
|
||||
//
|
||||
// endTextBox7
|
||||
//
|
||||
@ -478,8 +504,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox7.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox7.TabIndex = 28;
|
||||
this.endTextBox7.Visible = false;
|
||||
this.endTextBox7.AcceptsTabChanged += new System.EventHandler(this.endTextBox7_AcceptsTabChanged);
|
||||
this.endTextBox7.TextChanged += new System.EventHandler(this.endTextBox7_TextChanged);
|
||||
this.endTextBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox7_KeyPress);
|
||||
this.endTextBox7.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox7_MouseDown);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
@ -513,7 +541,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox8.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox8.TabIndex = 31;
|
||||
this.startTextBox8.Visible = false;
|
||||
this.startTextBox8.AcceptsTabChanged += new System.EventHandler(this.startTextBox8_AcceptsTabChanged);
|
||||
this.startTextBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox8_KeyPress);
|
||||
this.startTextBox8.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox8_MouseDown);
|
||||
//
|
||||
// endTextBox8
|
||||
//
|
||||
@ -524,8 +554,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox8.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox8.TabIndex = 32;
|
||||
this.endTextBox8.Visible = false;
|
||||
this.endTextBox8.AcceptsTabChanged += new System.EventHandler(this.endTextBox8_AcceptsTabChanged);
|
||||
this.endTextBox8.TextChanged += new System.EventHandler(this.endTextBox8_TextChanged);
|
||||
this.endTextBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox8_KeyPress);
|
||||
this.endTextBox8.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox8_MouseDown);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
@ -559,7 +591,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox9.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox9.TabIndex = 35;
|
||||
this.startTextBox9.Visible = false;
|
||||
this.startTextBox9.AcceptsTabChanged += new System.EventHandler(this.startTextBox9_AcceptsTabChanged);
|
||||
this.startTextBox9.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox9_KeyPress);
|
||||
this.startTextBox9.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox9_MouseDown);
|
||||
//
|
||||
// endTextBox9
|
||||
//
|
||||
@ -570,8 +604,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox9.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox9.TabIndex = 36;
|
||||
this.endTextBox9.Visible = false;
|
||||
this.endTextBox9.AcceptsTabChanged += new System.EventHandler(this.endTextBox9_AcceptsTabChanged);
|
||||
this.endTextBox9.TextChanged += new System.EventHandler(this.endTextBox9_TextChanged);
|
||||
this.endTextBox9.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox9_KeyPress);
|
||||
this.endTextBox9.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox9_MouseDown);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
@ -605,7 +641,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox10.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox10.TabIndex = 39;
|
||||
this.startTextBox10.Visible = false;
|
||||
this.startTextBox10.AcceptsTabChanged += new System.EventHandler(this.startTextBox10_AcceptsTabChanged);
|
||||
this.startTextBox10.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox10_KeyPress);
|
||||
this.startTextBox10.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox10_MouseDown);
|
||||
//
|
||||
// endTextBox10
|
||||
//
|
||||
@ -616,8 +654,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox10.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox10.TabIndex = 40;
|
||||
this.endTextBox10.Visible = false;
|
||||
this.endTextBox10.AcceptsTabChanged += new System.EventHandler(this.endTextBox10_AcceptsTabChanged);
|
||||
this.endTextBox10.TextChanged += new System.EventHandler(this.endTextBox10_TextChanged);
|
||||
this.endTextBox10.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox10_KeyPress);
|
||||
this.endTextBox10.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox10_MouseDown);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
@ -651,7 +691,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox11.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox11.TabIndex = 43;
|
||||
this.startTextBox11.Visible = false;
|
||||
this.startTextBox11.AcceptsTabChanged += new System.EventHandler(this.startTextBox11_AcceptsTabChanged);
|
||||
this.startTextBox11.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox11_KeyPress);
|
||||
this.startTextBox11.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox11_MouseDown);
|
||||
//
|
||||
// endTextBox11
|
||||
//
|
||||
@ -662,8 +704,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox11.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox11.TabIndex = 44;
|
||||
this.endTextBox11.Visible = false;
|
||||
this.endTextBox11.AcceptsTabChanged += new System.EventHandler(this.endTextBox11_AcceptsTabChanged);
|
||||
this.endTextBox11.TextChanged += new System.EventHandler(this.endTextBox11_TextChanged);
|
||||
this.endTextBox11.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox11_KeyPress);
|
||||
this.endTextBox11.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox11_MouseDown);
|
||||
//
|
||||
// label11
|
||||
//
|
||||
@ -697,7 +741,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox12.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox12.TabIndex = 47;
|
||||
this.startTextBox12.Visible = false;
|
||||
this.startTextBox12.AcceptsTabChanged += new System.EventHandler(this.startTextBox12_AcceptsTabChanged);
|
||||
this.startTextBox12.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox12_KeyPress);
|
||||
this.startTextBox12.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox12_MouseDown);
|
||||
//
|
||||
// endTextBox12
|
||||
//
|
||||
@ -708,8 +754,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox12.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox12.TabIndex = 48;
|
||||
this.endTextBox12.Visible = false;
|
||||
this.endTextBox12.AcceptsTabChanged += new System.EventHandler(this.endTextBox12_AcceptsTabChanged);
|
||||
this.endTextBox12.TextChanged += new System.EventHandler(this.endTextBox12_TextChanged);
|
||||
this.endTextBox12.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox12_KeyPress);
|
||||
this.endTextBox12.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox12_MouseDown);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
@ -743,7 +791,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox24.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox24.TabIndex = 97;
|
||||
this.startTextBox24.Visible = false;
|
||||
this.startTextBox24.AcceptsTabChanged += new System.EventHandler(this.startTextBox24_AcceptsTabChanged);
|
||||
this.startTextBox24.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox24_KeyPress);
|
||||
this.startTextBox24.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox24_MouseDown);
|
||||
//
|
||||
// endTextBox24
|
||||
//
|
||||
@ -754,8 +804,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox24.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox24.TabIndex = 98;
|
||||
this.endTextBox24.Visible = false;
|
||||
this.endTextBox24.AcceptsTabChanged += new System.EventHandler(this.endTextBox24_AcceptsTabChanged);
|
||||
this.endTextBox24.TextChanged += new System.EventHandler(this.endTextBox24_TextChanged);
|
||||
this.endTextBox24.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox24_KeyPress);
|
||||
this.endTextBox24.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox24_MouseDown);
|
||||
//
|
||||
// label24
|
||||
//
|
||||
@ -789,7 +841,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox23.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox23.TabIndex = 93;
|
||||
this.startTextBox23.Visible = false;
|
||||
this.startTextBox23.AcceptsTabChanged += new System.EventHandler(this.startTextBox23_AcceptsTabChanged);
|
||||
this.startTextBox23.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox23_KeyPress);
|
||||
this.startTextBox23.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox23_MouseDown);
|
||||
//
|
||||
// endTextBox23
|
||||
//
|
||||
@ -800,8 +854,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox23.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox23.TabIndex = 94;
|
||||
this.endTextBox23.Visible = false;
|
||||
this.endTextBox23.AcceptsTabChanged += new System.EventHandler(this.endTextBox23_AcceptsTabChanged);
|
||||
this.endTextBox23.TextChanged += new System.EventHandler(this.endTextBox23_TextChanged);
|
||||
this.endTextBox23.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox23_KeyPress);
|
||||
this.endTextBox23.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox23_MouseDown);
|
||||
//
|
||||
// label23
|
||||
//
|
||||
@ -835,7 +891,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox22.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox22.TabIndex = 89;
|
||||
this.startTextBox22.Visible = false;
|
||||
this.startTextBox22.AcceptsTabChanged += new System.EventHandler(this.startTextBox22_AcceptsTabChanged);
|
||||
this.startTextBox22.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox22_KeyPress);
|
||||
this.startTextBox22.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox22_MouseDown);
|
||||
//
|
||||
// endTextBox22
|
||||
//
|
||||
@ -846,8 +904,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox22.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox22.TabIndex = 90;
|
||||
this.endTextBox22.Visible = false;
|
||||
this.endTextBox22.AcceptsTabChanged += new System.EventHandler(this.endTextBox22_AcceptsTabChanged);
|
||||
this.endTextBox22.TextChanged += new System.EventHandler(this.endTextBox22_TextChanged);
|
||||
this.endTextBox22.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox22_KeyPress);
|
||||
this.endTextBox22.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox22_MouseDown);
|
||||
//
|
||||
// label22
|
||||
//
|
||||
@ -881,7 +941,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox21.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox21.TabIndex = 85;
|
||||
this.startTextBox21.Visible = false;
|
||||
this.startTextBox21.AcceptsTabChanged += new System.EventHandler(this.startTextBox21_AcceptsTabChanged);
|
||||
this.startTextBox21.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox21_KeyPress);
|
||||
this.startTextBox21.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox21_MouseDown);
|
||||
//
|
||||
// endTextBox21
|
||||
//
|
||||
@ -892,8 +954,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox21.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox21.TabIndex = 86;
|
||||
this.endTextBox21.Visible = false;
|
||||
this.endTextBox21.AcceptsTabChanged += new System.EventHandler(this.endTextBox21_AcceptsTabChanged);
|
||||
this.endTextBox21.TextChanged += new System.EventHandler(this.endTextBox21_TextChanged);
|
||||
this.endTextBox21.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox21_KeyPress);
|
||||
this.endTextBox21.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox21_MouseDown);
|
||||
//
|
||||
// label21
|
||||
//
|
||||
@ -927,7 +991,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox20.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox20.TabIndex = 81;
|
||||
this.startTextBox20.Visible = false;
|
||||
this.startTextBox20.AcceptsTabChanged += new System.EventHandler(this.startTextBox20_AcceptsTabChanged);
|
||||
this.startTextBox20.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox20_KeyPress);
|
||||
this.startTextBox20.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox20_MouseDown);
|
||||
//
|
||||
// endTextBox20
|
||||
//
|
||||
@ -938,8 +1004,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox20.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox20.TabIndex = 82;
|
||||
this.endTextBox20.Visible = false;
|
||||
this.endTextBox20.AcceptsTabChanged += new System.EventHandler(this.endTextBox20_AcceptsTabChanged);
|
||||
this.endTextBox20.TextChanged += new System.EventHandler(this.endTextBox20_TextChanged);
|
||||
this.endTextBox20.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox20_KeyPress);
|
||||
this.endTextBox20.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox20_MouseDown);
|
||||
//
|
||||
// label20
|
||||
//
|
||||
@ -973,7 +1041,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox19.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox19.TabIndex = 77;
|
||||
this.startTextBox19.Visible = false;
|
||||
this.startTextBox19.AcceptsTabChanged += new System.EventHandler(this.startTextBox19_AcceptsTabChanged);
|
||||
this.startTextBox19.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox19_KeyPress);
|
||||
this.startTextBox19.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox19_MouseDown);
|
||||
//
|
||||
// endTextBox19
|
||||
//
|
||||
@ -984,8 +1054,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox19.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox19.TabIndex = 78;
|
||||
this.endTextBox19.Visible = false;
|
||||
this.endTextBox19.AcceptsTabChanged += new System.EventHandler(this.endTextBox19_AcceptsTabChanged);
|
||||
this.endTextBox19.TextChanged += new System.EventHandler(this.endTextBox19_TextChanged);
|
||||
this.endTextBox19.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox19_KeyPress);
|
||||
this.endTextBox19.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox19_MouseDown);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
@ -1031,7 +1103,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox18.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox18.TabIndex = 73;
|
||||
this.startTextBox18.Visible = false;
|
||||
this.startTextBox18.AcceptsTabChanged += new System.EventHandler(this.startTextBox18_AcceptsTabChanged);
|
||||
this.startTextBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox18_KeyPress);
|
||||
this.startTextBox18.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox18_MouseDown);
|
||||
//
|
||||
// exclamation16
|
||||
//
|
||||
@ -1054,8 +1128,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox18.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox18.TabIndex = 74;
|
||||
this.endTextBox18.Visible = false;
|
||||
this.endTextBox18.AcceptsTabChanged += new System.EventHandler(this.endTextBox18_AcceptsTabChanged);
|
||||
this.endTextBox18.TextChanged += new System.EventHandler(this.endTextBox18_TextChanged);
|
||||
this.endTextBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox18_KeyPress);
|
||||
this.endTextBox18.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox18_MouseDown);
|
||||
//
|
||||
// label18
|
||||
//
|
||||
@ -1077,7 +1153,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox17.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox17.TabIndex = 69;
|
||||
this.startTextBox17.Visible = false;
|
||||
this.startTextBox17.AcceptsTabChanged += new System.EventHandler(this.startTextBox17_AcceptsTabChanged);
|
||||
this.startTextBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox17_KeyPress);
|
||||
this.startTextBox17.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox17_MouseDown);
|
||||
//
|
||||
// exclamation15
|
||||
//
|
||||
@ -1100,8 +1178,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox17.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox17.TabIndex = 70;
|
||||
this.endTextBox17.Visible = false;
|
||||
this.endTextBox17.AcceptsTabChanged += new System.EventHandler(this.endTextBox17_AcceptsTabChanged);
|
||||
this.endTextBox17.TextChanged += new System.EventHandler(this.endTextBox17_TextChanged);
|
||||
this.endTextBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox17_KeyPress);
|
||||
this.endTextBox17.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox17_MouseDown);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
@ -1123,7 +1203,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox16.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox16.TabIndex = 65;
|
||||
this.startTextBox16.Visible = false;
|
||||
this.startTextBox16.AcceptsTabChanged += new System.EventHandler(this.startTextBox16_AcceptsTabChanged);
|
||||
this.startTextBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox16_KeyPress);
|
||||
this.startTextBox16.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox16_MouseDown);
|
||||
//
|
||||
// exclamation14
|
||||
//
|
||||
@ -1146,8 +1228,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox16.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox16.TabIndex = 66;
|
||||
this.endTextBox16.Visible = false;
|
||||
this.endTextBox16.AcceptsTabChanged += new System.EventHandler(this.endTextBox16_AcceptsTabChanged);
|
||||
this.endTextBox16.TextChanged += new System.EventHandler(this.endTextBox16_TextChanged);
|
||||
this.endTextBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox16_KeyPress);
|
||||
this.endTextBox16.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox16_MouseDown);
|
||||
//
|
||||
// label16
|
||||
//
|
||||
@ -1169,7 +1253,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox15.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox15.TabIndex = 61;
|
||||
this.startTextBox15.Visible = false;
|
||||
this.startTextBox15.AcceptsTabChanged += new System.EventHandler(this.startTextBox15_AcceptsTabChanged);
|
||||
this.startTextBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox15_KeyPress);
|
||||
this.startTextBox15.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox15_MouseDown);
|
||||
//
|
||||
// exclamation13
|
||||
//
|
||||
@ -1192,8 +1278,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox15.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox15.TabIndex = 62;
|
||||
this.endTextBox15.Visible = false;
|
||||
this.endTextBox15.AcceptsTabChanged += new System.EventHandler(this.endTextBox15_AcceptsTabChanged);
|
||||
this.endTextBox15.TextChanged += new System.EventHandler(this.endTextBox15_TextChanged);
|
||||
this.endTextBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox15_KeyPress);
|
||||
this.endTextBox15.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox15_MouseDown);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
@ -1215,7 +1303,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox14.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox14.TabIndex = 57;
|
||||
this.startTextBox14.Visible = false;
|
||||
this.startTextBox14.AcceptsTabChanged += new System.EventHandler(this.startTextBox14_AcceptsTabChanged);
|
||||
this.startTextBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox14_KeyPress);
|
||||
this.startTextBox14.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox14_MouseDown);
|
||||
//
|
||||
// endLabel2
|
||||
//
|
||||
@ -1236,8 +1326,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox14.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox14.TabIndex = 58;
|
||||
this.endTextBox14.Visible = false;
|
||||
this.endTextBox14.AcceptsTabChanged += new System.EventHandler(this.endTextBox14_AcceptsTabChanged);
|
||||
this.endTextBox14.TextChanged += new System.EventHandler(this.endTextBox14_TextChanged);
|
||||
this.endTextBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox14_KeyPress);
|
||||
this.endTextBox14.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox14_MouseDown);
|
||||
//
|
||||
// label14
|
||||
//
|
||||
@ -1259,7 +1351,9 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.startTextBox13.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox13.TabIndex = 53;
|
||||
this.startTextBox13.Visible = false;
|
||||
this.startTextBox13.AcceptsTabChanged += new System.EventHandler(this.startTextBox13_AcceptsTabChanged);
|
||||
this.startTextBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox13_KeyPress);
|
||||
this.startTextBox13.MouseDown += new System.Windows.Forms.MouseEventHandler(this.startTextBox13_MouseDown);
|
||||
//
|
||||
// startLabel2
|
||||
//
|
||||
@ -1280,8 +1374,10 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
this.endTextBox13.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox13.TabIndex = 54;
|
||||
this.endTextBox13.Visible = false;
|
||||
this.endTextBox13.AcceptsTabChanged += new System.EventHandler(this.endTextBox13_AcceptsTabChanged);
|
||||
this.endTextBox13.TextChanged += new System.EventHandler(this.endTextBox13_TextChanged);
|
||||
this.endTextBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox13_KeyPress);
|
||||
this.endTextBox13.MouseDown += new System.Windows.Forms.MouseEventHandler(this.endTextBox13_MouseDown);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
@ -1326,7 +1422,7 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.ClientSize = new System.Drawing.Size(1274, 876);
|
||||
this.Controls.Add(this.nextButton);
|
||||
this.Controls.Add(this.previousButton);
|
||||
|
||||
@ -9,11 +9,6 @@ namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IDataEntry : IComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true when this component uses cameras - displays images
|
||||
/// </summary>
|
||||
bool UsesCameras();
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IDataEntryForCamera : IDataEntry
|
||||
{
|
||||
string[] StartImages { get; set; }
|
||||
|
||||
string[] EndImages { get; set; }
|
||||
|
||||
bool SaveImages { get; }
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,12 @@ namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
GenericDevices.ICamera Camera { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Watermeter wheel/arrow detection process.
|
||||
/// </summary>
|
||||
/// <returns>Reference to operation object instance</returns>
|
||||
IOperation GrabImageOp(string imageFileName);
|
||||
|
||||
/// <summary>
|
||||
/// Watermeter wheel/arrow detection process.
|
||||
/// </summary>
|
||||
|
||||
@ -91,11 +91,12 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
else if (imageRotation == ImageRotation.Deg270)
|
||||
rotation = 270;
|
||||
|
||||
command = string.Format("clp/GrabImage {0} -r {1} {2} -n 1 {3}",
|
||||
blackAndWhite ? "-jpg -q 95" : "-bmp -rgb",
|
||||
rotation.ToString(),
|
||||
lowResolution ? "-lr" : "-hr",
|
||||
blackAndWhite ? "grabbed.jpg" : "grabbed.bmp");
|
||||
command = string.Format("clp/GrabImage {0} {1} -r {2} {3} -n 1 {4}",
|
||||
blackAndWhite ? "-bmp" : "-bmp", /// 0 ... file format and quality
|
||||
blackAndWhite ? "-y8" : "-rgb", /// 1 ... B&W / color
|
||||
rotation.ToString(), /// 2 ... roration
|
||||
lowResolution ? "-lr" : "-hr", /// 4 ... resolution
|
||||
"grabbed.bmp"); /// 5 ... filename
|
||||
|
||||
//
|
||||
// Send (or enqueue) command
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
@ -170,7 +171,7 @@ namespace TBF.BenchControl.Network.Camera.Roi
|
||||
{
|
||||
if (NetCamera != null && NetCamera.Telnet != null)
|
||||
{
|
||||
detectedImageName = string.Format("{0}{1}-det-{2}.jpg", Program.ImagesDir, RoiCfg.Name, StateMachine.Time);
|
||||
detectedImageName = Path.Combine(Program.TempImagesDir, string.Format("{0}-det-{1}.jpg", RoiCfg.Name, StateMachine.Time));
|
||||
return new RoiDetectionOp(this, NetCamera, detectedImageName, RoiX, RoiY, RoiWid, RoiHgh);
|
||||
}
|
||||
else
|
||||
@ -190,6 +191,18 @@ namespace TBF.BenchControl.Network.Camera.Roi
|
||||
}
|
||||
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName)
|
||||
{
|
||||
if (NetCamera != null && NetCamera.Telnet != null)
|
||||
{
|
||||
/// TODO: Implement support for sharing one camera by multiple ROI-s
|
||||
return NetCamera.GrabImagesOp(new string[] { imageFileName }, false, true, ImageRotation.None);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Updates wmPulses, caled from 'Start' and 'Run' functions of 'ReadRegisterOp'
|
||||
/// </summary>
|
||||
|
||||
@ -94,7 +94,9 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
roiCfg.SaveImages = tmpcfg.SaveImages;
|
||||
roiCfg.BlackAndWhite = tmpcfg.BlackAndWhite;
|
||||
roiCfg.LowResolution = tmpcfg.LowResolution;
|
||||
roiCfg.ImageRotation = tmpcfg.ImageRotation;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -122,7 +124,19 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
}
|
||||
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName, bool blackAndWhite, bool lowResolution, ImageRotation imageRotation)
|
||||
public IOperation GrabImageOp(string imageFileName)
|
||||
{
|
||||
if (NetCamera != null && NetCamera.Telnet != null)
|
||||
{
|
||||
/// TODO: Implement support for sharing one camera by multiple ROI-s
|
||||
return NetCamera.GrabImagesOp(new string[] { imageFileName }, roiCfg.BlackAndWhite, roiCfg.LowResolution, roiCfg.ImageRotation);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName, bool blackAndWhite,
|
||||
bool lowResolution, Config.Entities.ImageRotation imageRotation)
|
||||
{
|
||||
if (NetCamera != null && NetCamera.Telnet != null)
|
||||
{
|
||||
|
||||
@ -17,7 +17,9 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public bool SaveImages;
|
||||
public bool BlackAndWhite;
|
||||
public bool LowResolution;
|
||||
public ImageRotation ImageRotation;
|
||||
|
||||
/// <summary> Procedure parameters </summary>
|
||||
[XmlIgnore]
|
||||
@ -42,11 +44,15 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = "Camera";
|
||||
BlackAndWhite = false;
|
||||
LowResolution = true;
|
||||
ImageRotation = ImageRotation.None;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("{0} ({1}) {2}", Name, ParentName, (SaveImages ? " save images" : ""));
|
||||
return string.Format("{0} Camera={1} B&W={2}, LowRes={3}, Rotation={4}",
|
||||
Name, ParentName, BlackAndWhite, LowResolution, ImageRotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
{
|
||||
@ -48,6 +50,11 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
}
|
||||
}
|
||||
|
||||
for (ImageRotation ir = 0; ir < ImageRotation.Count; ir++)
|
||||
{
|
||||
imageRotationComboBox.Items.Add(ir.ToDescription());
|
||||
}
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
@ -62,14 +69,18 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
||||
saveImagesCheckBox.Checked = config.SaveImages;
|
||||
blackAndWhiteCheckBox.Checked = config.BlackAndWhite;
|
||||
loResolutionCheckBox.Checked = config.LowResolution;
|
||||
imageRotationComboBox.Text = config.ImageRotation.ToDescription();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
parentNameComboBox.Enabled = true;
|
||||
saveImagesCheckBox.Enabled = true;
|
||||
blackAndWhiteCheckBox.Enabled = true;
|
||||
loResolutionCheckBox.Enabled = true;
|
||||
imageRotationComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
@ -79,7 +90,13 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid 'Parent Name'";
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, parentNameLabel.Text);
|
||||
}
|
||||
|
||||
if (!imageRotationComboBox.Items.Contains(imageRotationComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, imageRotationLabel.Text);
|
||||
}
|
||||
|
||||
return flags;
|
||||
@ -104,10 +121,29 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
if (config.SaveImages != saveImagesCheckBox.Checked)
|
||||
if (config.BlackAndWhite != blackAndWhiteCheckBox.Checked)
|
||||
{
|
||||
config.SaveImages = saveImagesCheckBox.Checked;
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
config.BlackAndWhite = blackAndWhiteCheckBox.Checked;
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
}
|
||||
|
||||
if (config.LowResolution != loResolutionCheckBox.Checked)
|
||||
{
|
||||
config.LowResolution = loResolutionCheckBox.Checked;
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
}
|
||||
|
||||
for (ImageRotation ir = 0; ir < ImageRotation.Count; ir++)
|
||||
{
|
||||
if (imageRotationComboBox.Text == ir.ToDescription())
|
||||
{
|
||||
if (config.ImageRotation != ir)
|
||||
{
|
||||
config.ImageRotation = ir;
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
|
||||
@ -38,22 +38,25 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.saveImagesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.imageRotationComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.imageRotationLabel = new System.Windows.Forms.Label();
|
||||
this.blackAndWhiteCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.loResolutionCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// parentNameLabel
|
||||
//
|
||||
this.parentNameLabel.AutoSize = true;
|
||||
this.parentNameLabel.Location = new System.Drawing.Point(13, 62);
|
||||
this.parentNameLabel.Location = new System.Drawing.Point(20, 77);
|
||||
this.parentNameLabel.Name = "parentNameLabel";
|
||||
this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
|
||||
this.parentNameLabel.Size = new System.Drawing.Size(43, 13);
|
||||
this.parentNameLabel.TabIndex = 3;
|
||||
this.parentNameLabel.Text = "Parent Name";
|
||||
this.parentNameLabel.Text = "Camera";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 34);
|
||||
this.nameTextBox.Location = new System.Drawing.Point(139, 49);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(174, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
@ -61,7 +64,7 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(13, 37);
|
||||
this.nameLabel.Location = new System.Drawing.Point(20, 52);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
@ -70,7 +73,7 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(96, 11);
|
||||
this.classNameLabel.Location = new System.Drawing.Point(136, 26);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(114, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
@ -80,7 +83,7 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
//
|
||||
this.parentNameComboBox.Enabled = false;
|
||||
this.parentNameComboBox.FormattingEnabled = true;
|
||||
this.parentNameComboBox.Location = new System.Drawing.Point(99, 59);
|
||||
this.parentNameComboBox.Location = new System.Drawing.Point(139, 74);
|
||||
this.parentNameComboBox.Name = "parentNameComboBox";
|
||||
this.parentNameComboBox.Size = new System.Drawing.Size(174, 21);
|
||||
this.parentNameComboBox.TabIndex = 4;
|
||||
@ -102,22 +105,54 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
this.textBox1.Size = new System.Drawing.Size(372, 20);
|
||||
this.textBox1.TabIndex = 6;
|
||||
//
|
||||
// saveImagesCheckBox
|
||||
// imageRotationComboBox
|
||||
//
|
||||
this.saveImagesCheckBox.AutoSize = true;
|
||||
this.saveImagesCheckBox.Enabled = false;
|
||||
this.saveImagesCheckBox.Location = new System.Drawing.Point(99, 90);
|
||||
this.saveImagesCheckBox.Name = "saveImagesCheckBox";
|
||||
this.saveImagesCheckBox.Size = new System.Drawing.Size(131, 17);
|
||||
this.saveImagesCheckBox.TabIndex = 7;
|
||||
this.saveImagesCheckBox.Text = "Save images (archive)";
|
||||
this.saveImagesCheckBox.UseVisualStyleBackColor = true;
|
||||
this.imageRotationComboBox.Enabled = false;
|
||||
this.imageRotationComboBox.FormattingEnabled = true;
|
||||
this.imageRotationComboBox.Location = new System.Drawing.Point(139, 154);
|
||||
this.imageRotationComboBox.Name = "imageRotationComboBox";
|
||||
this.imageRotationComboBox.Size = new System.Drawing.Size(93, 21);
|
||||
this.imageRotationComboBox.TabIndex = 8;
|
||||
//
|
||||
// imageRotationLabel
|
||||
//
|
||||
this.imageRotationLabel.AutoSize = true;
|
||||
this.imageRotationLabel.Location = new System.Drawing.Point(20, 157);
|
||||
this.imageRotationLabel.Name = "imageRotationLabel";
|
||||
this.imageRotationLabel.Size = new System.Drawing.Size(103, 13);
|
||||
this.imageRotationLabel.TabIndex = 7;
|
||||
this.imageRotationLabel.Text = "Image rotation (ccw)";
|
||||
//
|
||||
// blackAndWhiteCheckBox
|
||||
//
|
||||
this.blackAndWhiteCheckBox.AutoSize = true;
|
||||
this.blackAndWhiteCheckBox.Enabled = false;
|
||||
this.blackAndWhiteCheckBox.Location = new System.Drawing.Point(139, 108);
|
||||
this.blackAndWhiteCheckBox.Name = "blackAndWhiteCheckBox";
|
||||
this.blackAndWhiteCheckBox.Size = new System.Drawing.Size(93, 17);
|
||||
this.blackAndWhiteCheckBox.TabIndex = 5;
|
||||
this.blackAndWhiteCheckBox.Text = "Black && White";
|
||||
this.blackAndWhiteCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// loResolutionCheckBox
|
||||
//
|
||||
this.loResolutionCheckBox.AutoSize = true;
|
||||
this.loResolutionCheckBox.Enabled = false;
|
||||
this.loResolutionCheckBox.Location = new System.Drawing.Point(139, 131);
|
||||
this.loResolutionCheckBox.Name = "loResolutionCheckBox";
|
||||
this.loResolutionCheckBox.Size = new System.Drawing.Size(94, 17);
|
||||
this.loResolutionCheckBox.TabIndex = 6;
|
||||
this.loResolutionCheckBox.Text = "Low resolution";
|
||||
this.loResolutionCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// RoiCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.saveImagesCheckBox);
|
||||
this.Controls.Add(this.imageRotationComboBox);
|
||||
this.Controls.Add(this.imageRotationLabel);
|
||||
this.Controls.Add(this.blackAndWhiteCheckBox);
|
||||
this.Controls.Add(this.loResolutionCheckBox);
|
||||
this.Controls.Add(this.parentNameComboBox);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
@ -142,6 +177,9 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
private System.Windows.Forms.ComboBox parentNameComboBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.CheckBox saveImagesCheckBox;
|
||||
private System.Windows.Forms.ComboBox imageRotationComboBox;
|
||||
private System.Windows.Forms.Label imageRotationLabel;
|
||||
private System.Windows.Forms.CheckBox blackAndWhiteCheckBox;
|
||||
private System.Windows.Forms.CheckBox loResolutionCheckBox;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,6 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new DataEntry.Standard48.Factory());
|
||||
Factories.Add(new DataEntry.Standard48.FactoryNoStartEnd());
|
||||
Factories.Add(new DataEntry.StandardCamera.Factory());
|
||||
Factories.Add(new DataEntry.StandardCamera.FactoryNoStartEnd());
|
||||
Factories.Add(new Dummy.Balance.Factory());
|
||||
Factories.Add(new Dummy.Diverter.Factory());
|
||||
Factories.Add(new Dummy.FlowMeter.Factory());
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using TBF.BenchControl;
|
||||
@ -334,52 +335,45 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
double currentFlow = RefFlow.Val;
|
||||
|
||||
|
||||
///
|
||||
/// Prepare cameras, ROI-s and measurementOperations
|
||||
///
|
||||
|
||||
/// Find ROI-s
|
||||
IList<GenericDevices.IRoi> rois = new List<GenericDevices.IRoi>();
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
GenericDevices.IRoi roi = rr as GenericDevices.IRoi;
|
||||
if (roi != null && roi.Detected)
|
||||
{
|
||||
rois.Add(roi);
|
||||
}
|
||||
}
|
||||
|
||||
/// Find cameras
|
||||
IList<GenericDevices.ICamera> cameras = new List<GenericDevices.ICamera>();
|
||||
foreach (var roi in rois)
|
||||
{
|
||||
if (roi.Camera != null && !cameras.Contains(roi.Camera))
|
||||
{
|
||||
roi.Camera.ClearRoiParams();
|
||||
cameras.Add(roi.Camera);
|
||||
}
|
||||
}
|
||||
|
||||
/// Register ROI-parameters to cameras
|
||||
foreach (var roi in rois) roi.RegisterRoiToCamera();
|
||||
|
||||
/// Prepare measurementOperations
|
||||
IList<IOperation> measureOperations = new List<IOperation>();
|
||||
foreach (var camera in cameras) measureOperations.Add(camera.MeasurementOp());
|
||||
|
||||
|
||||
|
||||
///
|
||||
/// Enter watermeter begin states here
|
||||
///
|
||||
GenericDevices.IHasWMStatesForm dataEntryCmpnt =
|
||||
TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IHasWMStatesForm;
|
||||
GenericDevices.IHasWMStatesForm dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IHasWMStatesForm;
|
||||
|
||||
if (dataEntryCmpnt != null)
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
if (dataEntryCmpnt is GenericDevices.IDataEntry && (dataEntryCmpnt as GenericDevices.IDataEntry).UsesCameras())
|
||||
{
|
||||
string fileName = string.Format("{0}-start.bmp", test.Name);
|
||||
|
||||
if (dataEntryCmpnt is GenericDevices.IDataEntryForCamera)
|
||||
{
|
||||
string[] startImages = new string[sensPath.RegisterReaders.Length];
|
||||
|
||||
State state2 = State.Create(string.Format("{0}({1}) : Grabbing images", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp);
|
||||
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
||||
{
|
||||
GenericDevices.IRoiForFixedStart roi = sensPath.RegisterReaders[i] as GenericDevices.IRoiForFixedStart;
|
||||
if (roi != null)
|
||||
{
|
||||
string directory = Path.Combine(Program.TempImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i + 1).ToString());
|
||||
Directory.CreateDirectory(directory);
|
||||
startImages[i] = Path.Combine(directory, fileName);
|
||||
state2.AddOperation(roi.GrabImageOp(startImages[i]));
|
||||
}
|
||||
}
|
||||
state2.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
|
||||
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; break; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
|
||||
}
|
||||
while (e.Contains(Event.CameraBusy));
|
||||
|
||||
(dataEntryCmpnt as GenericDevices.IDataEntryForCamera).StartImages = startImages;
|
||||
}
|
||||
|
||||
Bridge.OnActivity(this, Strings.Enter_water_meter_data);
|
||||
@ -425,6 +419,25 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
if (registerReader != null) registerReader.BeginWMState = dataEntryCmpnt.WMStartState(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (dataEntryCmpnt is GenericDevices.IDataEntryForCamera && (dataEntryCmpnt as GenericDevices.IDataEntryForCamera).SaveImages)
|
||||
{
|
||||
/// SaveImages==true ... copy images to the directory that will be archived at the end of the cycle
|
||||
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
||||
{
|
||||
GenericDevices.IRoiForFixedStart roi = sensPath.RegisterReaders[i] as GenericDevices.IRoiForFixedStart;
|
||||
if (roi != null)
|
||||
{
|
||||
string srcDir = Path.Combine(Program.TempImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i + 1).ToString());
|
||||
string destDir = Path.Combine(Program.ImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i + 1).ToString());
|
||||
if (File.Exists(Path.Combine(srcDir, fileName)))
|
||||
{
|
||||
Directory.CreateDirectory(destDir);
|
||||
File.Copy(Path.Combine(srcDir, fileName), Path.Combine(destDir, fileName), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -440,7 +453,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
.AddOperation(outPath.TempDiv == null ? null : outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
@ -476,7 +488,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
//------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
.AddOperation(outPath.TempDiv == null ? null : outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
@ -535,7 +546,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
do
|
||||
{
|
||||
//--------------------------------
|
||||
switch (ReadRegistersTempPressAmbient(measureOperations, true))
|
||||
switch (ReadRegistersTempPressAmbient(null, true))
|
||||
{
|
||||
case Event.Error:
|
||||
retVal = Event.Error;
|
||||
@ -718,7 +729,41 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
///
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
Bridge.OnActivity(this, Strings.Enter_water_meter_data);
|
||||
string fileName = string.Format("{0}-end.bmp", test.Name);
|
||||
|
||||
if (dataEntryCmpnt is GenericDevices.IDataEntryForCamera)
|
||||
{
|
||||
string[] endImages = new string[sensPath.RegisterReaders.Length];
|
||||
|
||||
State state2 = State.Create(string.Format("{0}({1}) : Grabbing images", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp);
|
||||
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
||||
{
|
||||
GenericDevices.IRoiForFixedStart roi = sensPath.RegisterReaders[i] as GenericDevices.IRoiForFixedStart;
|
||||
if (roi != null)
|
||||
{
|
||||
string directory = Path.Combine(Program.TempImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i + 1).ToString());
|
||||
Directory.CreateDirectory(directory);
|
||||
endImages[i] = Path.Combine(directory, fileName);
|
||||
state2.AddOperation(roi.GrabImageOp(endImages[i]));
|
||||
}
|
||||
}
|
||||
state2.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
|
||||
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; break; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
|
||||
}
|
||||
while (e.Contains(Event.CameraBusy));
|
||||
|
||||
(dataEntryCmpnt as GenericDevices.IDataEntryForCamera).EndImages = endImages;
|
||||
}
|
||||
|
||||
Bridge.OnActivity(this, Strings.Enter_water_meter_data);
|
||||
State state = State.Create(string.Format("{0}({1}) : Entering the end-state", test.Method, test.Name));
|
||||
if (heatMetersTestParams != null && dataEntryCmpnt is GenericDevices.IHasHeatMtrStatesForm)
|
||||
{
|
||||
@ -768,7 +813,26 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
if (registerReader != null) registerReader.EndWMState = dataEntryCmpnt.WMEndState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dataEntryCmpnt is GenericDevices.IDataEntryForCamera && (dataEntryCmpnt as GenericDevices.IDataEntryForCamera).SaveImages)
|
||||
{
|
||||
/// SaveImages==true ... copy images to the directory that will be archived at the end of the cycle
|
||||
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
||||
{
|
||||
GenericDevices.IRoiForFixedStart roi = sensPath.RegisterReaders[i] as GenericDevices.IRoiForFixedStart;
|
||||
if (roi != null)
|
||||
{
|
||||
string srcDir = Path.Combine(Program.TempImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i + 1).ToString());
|
||||
string destDir = Path.Combine(Program.ImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i + 1).ToString());
|
||||
if (File.Exists(Path.Combine(srcDir, fileName)))
|
||||
{
|
||||
Directory.CreateDirectory(destDir);
|
||||
File.Copy(Path.Combine(srcDir, fileName), Path.Combine(destDir, fileName), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
|
||||
@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.GrabImage
|
||||
Name = name;
|
||||
ParentName = string.Empty;
|
||||
BlackAndWhite = false;
|
||||
LowResolution = false;
|
||||
LowResolution = true;
|
||||
ImageRotation = ImageRotation.None;
|
||||
}
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ namespace TBF.BenchControl.TestMethods.GrabImage
|
||||
this.imageRotationComboBox.FormattingEnabled = true;
|
||||
this.imageRotationComboBox.Location = new System.Drawing.Point(149, 172);
|
||||
this.imageRotationComboBox.Name = "imageRotationComboBox";
|
||||
this.imageRotationComboBox.Size = new System.Drawing.Size(171, 21);
|
||||
this.imageRotationComboBox.Size = new System.Drawing.Size(93, 21);
|
||||
this.imageRotationComboBox.TabIndex = 8;
|
||||
//
|
||||
// GrabImageCfgCtrl
|
||||
|
||||
@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.GrabImage
|
||||
.AddOperation(checkUiOp);
|
||||
for (int i = 0; i < sensPath.RegisterReaders.Length; i++)
|
||||
{
|
||||
GenericDevices.IRoi roi = sensPath.RegisterReaders[i] as GenericDevices.IRoi;
|
||||
GenericDevices.IRoiForFixedStart roi = sensPath.RegisterReaders[i] as GenericDevices.IRoiForFixedStart;
|
||||
if (roi != null)
|
||||
{
|
||||
string directory = Path.Combine(Program.ImagesDir, BatchRslts.Batch.BatchNr.ToString(), (i+1).ToString());
|
||||
|
||||
@ -17,6 +17,7 @@ namespace TBF
|
||||
{
|
||||
public const string HomeDir = "C:\\Tbf\\"; /// Contains subdirectories Results, Logs, Images, ...
|
||||
public const string ImagesDir = "C:\\Tbf\\Images\\";
|
||||
public const string TempImagesDir = "C:\\Tbf\\Images\\Temp\\";
|
||||
|
||||
/// log4net
|
||||
static ILog log;
|
||||
@ -95,7 +96,9 @@ namespace TBF
|
||||
}
|
||||
|
||||
if (!Directory.Exists(ImagesDir)) Directory.CreateDirectory(ImagesDir);
|
||||
IEnumerable<string> files = Directory.EnumerateFiles(ImagesDir);
|
||||
if (!Directory.Exists(TempImagesDir)) Directory.CreateDirectory(TempImagesDir);
|
||||
|
||||
IEnumerable<string> files = Directory.EnumerateFiles(TempImagesDir); /// TODO: Implement recursive directory delete
|
||||
foreach (var file in files) File.Delete(file);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.15.631.1")]
|
||||
[assembly: AssemblyFileVersion("2.15.631.1")]
|
||||
[assembly: AssemblyVersion("2.15.632.1")]
|
||||
[assembly: AssemblyFileVersion("2.15.632.1")]
|
||||
|
||||
10
TestBenchFramework/Properties/Resources.Designer.cs
generated
10
TestBenchFramework/Properties/Resources.Designer.cs
generated
@ -60,6 +60,16 @@ namespace TBF.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Empty {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Empty", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@ -145,4 +145,7 @@
|
||||
<data name="RoiStyle3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\RoiStyle3.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Empty" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\empty.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
TestBenchFramework/Resources/empty.png
Normal file
BIN
TestBenchFramework/Resources/empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@ -388,7 +388,6 @@
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\CycleEndForm.designer.cs">
|
||||
<DependentUpon>CycleEndForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\EntryForm.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\EntryFormCfg.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\EntryFormCfgCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
@ -396,9 +395,8 @@
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\EntryFormCfgCtrl.designer.cs">
|
||||
<DependentUpon>EntryFormCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\EntryFormNoStartEnd.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\EntryForm.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\Factory.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\FactoryNoStartEnd.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\StandardCamera\TestStartEndForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -502,6 +500,7 @@
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Elde\ValveEx\ValveFactory.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ICameraDisplay.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IDataEntryForCamera.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IRoiForFixedStart.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\IScaleCfg.cs" />
|
||||
<Compile Include="BenchControl\GenericDevices\ICalibInfoCfg.cs" />
|
||||
@ -2538,6 +2537,7 @@
|
||||
<None Include="Resources\RoiStyle1.bmp" />
|
||||
<None Include="Resources\RoiStyle2.bmp" />
|
||||
<None Include="Resources\RoiStyle3.bmp" />
|
||||
<Content Include="Resources\empty.png" />
|
||||
<Content Include="SampleConfig\config.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user