DataEntry.Standard (with checkBoxes) and DataEntry.Combined entry forms added.

IWaterMeter.Disabled supported.
This commit is contained in:
Milan Hanajik
2015-03-24 10:09:47 +01:00
parent 2902f36332
commit d1e9537610
27 changed files with 4572 additions and 0 deletions
@@ -0,0 +1,305 @@
namespace TBF.BenchControl.DataEntry.Standard
{
partial class CycleBeginningForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
this.okButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.checkBox7 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.ForeColor = System.Drawing.Color.Black;
this.okButton.Name = "okButton";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.ForeColor = System.Drawing.Color.Black;
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// checkBox1
//
resources.ApplyResources(this.checkBox1, "checkBox1");
this.checkBox1.Name = "checkBox1";
this.checkBox1.UseVisualStyleBackColor = true;
//
// textBox1
//
resources.ApplyResources(this.textBox1, "textBox1");
this.textBox1.Name = "textBox1";
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.checkBox2);
this.groupBox2.Controls.Add(this.textBox2);
this.groupBox2.Controls.Add(this.label2);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.ForeColor = System.Drawing.Color.Black;
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// checkBox2
//
resources.ApplyResources(this.checkBox2, "checkBox2");
this.checkBox2.Name = "checkBox2";
this.checkBox2.UseVisualStyleBackColor = true;
//
// textBox2
//
resources.ApplyResources(this.textBox2, "textBox2");
this.textBox2.Name = "textBox2";
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.checkBox7);
this.groupBox3.Controls.Add(this.checkBox3);
this.groupBox3.Controls.Add(this.textBox3);
this.groupBox3.Controls.Add(this.label3);
resources.ApplyResources(this.groupBox3, "groupBox3");
this.groupBox3.ForeColor = System.Drawing.Color.Black;
this.groupBox3.Name = "groupBox3";
this.groupBox3.TabStop = false;
//
// checkBox7
//
resources.ApplyResources(this.checkBox7, "checkBox7");
this.checkBox7.Name = "checkBox7";
this.checkBox7.UseVisualStyleBackColor = true;
//
// checkBox3
//
resources.ApplyResources(this.checkBox3, "checkBox3");
this.checkBox3.Name = "checkBox3";
this.checkBox3.UseVisualStyleBackColor = true;
//
// textBox3
//
resources.ApplyResources(this.textBox3, "textBox3");
this.textBox3.Name = "textBox3";
this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.checkBox4);
this.groupBox4.Controls.Add(this.textBox4);
this.groupBox4.Controls.Add(this.label4);
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.ForeColor = System.Drawing.Color.Black;
this.groupBox4.Name = "groupBox4";
this.groupBox4.TabStop = false;
//
// checkBox4
//
resources.ApplyResources(this.checkBox4, "checkBox4");
this.checkBox4.Name = "checkBox4";
this.checkBox4.UseVisualStyleBackColor = true;
//
// textBox4
//
resources.ApplyResources(this.textBox4, "textBox4");
this.textBox4.Name = "textBox4";
this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged);
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.checkBox5);
this.groupBox5.Controls.Add(this.textBox5);
this.groupBox5.Controls.Add(this.label5);
resources.ApplyResources(this.groupBox5, "groupBox5");
this.groupBox5.ForeColor = System.Drawing.Color.Black;
this.groupBox5.Name = "groupBox5";
this.groupBox5.TabStop = false;
//
// checkBox5
//
resources.ApplyResources(this.checkBox5, "checkBox5");
this.checkBox5.Name = "checkBox5";
this.checkBox5.UseVisualStyleBackColor = true;
//
// textBox5
//
resources.ApplyResources(this.textBox5, "textBox5");
this.textBox5.Name = "textBox5";
this.textBox5.TextChanged += new System.EventHandler(this.textBox5_TextChanged);
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.checkBox6);
this.groupBox6.Controls.Add(this.textBox6);
this.groupBox6.Controls.Add(this.label6);
resources.ApplyResources(this.groupBox6, "groupBox6");
this.groupBox6.ForeColor = System.Drawing.Color.Black;
this.groupBox6.Name = "groupBox6";
this.groupBox6.TabStop = false;
//
// checkBox6
//
resources.ApplyResources(this.checkBox6, "checkBox6");
this.checkBox6.Name = "checkBox6";
this.checkBox6.UseVisualStyleBackColor = true;
//
// textBox6
//
resources.ApplyResources(this.textBox6, "textBox6");
this.textBox6.Name = "textBox6";
this.textBox6.TextChanged += new System.EventHandler(this.textBox6_TextChanged);
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// CycleBeginningForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DarkGoldenrod;
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.okButton);
this.ForeColor = System.Drawing.Color.Black;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "CycleBeginningForm";
this.TopMost = true;
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.CheckBox checkBox6;
}
}
@@ -0,0 +1,137 @@
using System;
using System.Windows.Forms;
using log4net;
using TBF.Resources;
namespace TBF.BenchControl.DataEntry.Standard
{
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
{
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
/// <summary> Number of text boxes for serial numbers </summary>
public readonly int WaterMetersCount;
/// To be retrieved after the form is closed
public string[] SNText;
public bool[] Disabled;
/// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
bool completed;
/// <summary>
/// Constructor
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public CycleBeginningForm(int waterMetersCount)
{
this.WaterMetersCount = waterMetersCount;
InitializeComponent();
SNText = new string[WaterMetersCount];
Disabled = new bool[WaterMetersCount];
completed = false;
StartForceCloseHandler();
//Height = 55 + WaterMetersCount * 105;
}
/// <summary> Parameterless constructor for 3 watermeters </summary>
public CycleBeginningForm()
: this(3)
{
}
private void CycleBeginningForm_Load(object sender, EventArgs e)
{
Localize();
if (WaterMetersCount < 1) groupBox1.Visible = false;
if (WaterMetersCount < 2) groupBox2.Visible = false;
if (WaterMetersCount < 3) groupBox3.Visible = false;
if (WaterMetersCount < 4) groupBox4.Visible = false;
if (WaterMetersCount < 5) groupBox5.Visible = false;
if (WaterMetersCount < 6) groupBox6.Visible = false;
}
void Localize()
{
Text = Strings.Data;
groupBox1.Text = Strings.Water_Meter + " 1";
groupBox2.Text = Strings.Water_Meter + " 2";
groupBox3.Text = Strings.Water_Meter + " 3";
groupBox4.Text = Strings.Water_Meter + " 4";
groupBox5.Text = Strings.Water_Meter + " 5";
groupBox6.Text = Strings.Water_Meter + " 6";
label1.Text = Strings.Serial_Number;
label2.Text = Strings.Serial_Number;
label3.Text = Strings.Serial_Number;
label4.Text = Strings.Serial_Number;
label5.Text = Strings.Serial_Number;
label6.Text = Strings.Serial_Number;
okButton.Text = Strings.OkBtnText;
}
private void okButton_Click(object sender, EventArgs e)
{
if (WaterMetersCount >= 1) { SNText[0] = textBox1.Text; Disabled[0] = !checkBox1.Checked; }
if (WaterMetersCount >= 2) { SNText[1] = textBox2.Text; Disabled[1] = !checkBox2.Checked; }
if (WaterMetersCount >= 3) { SNText[2] = textBox3.Text; Disabled[2] = !checkBox3.Checked; }
if (WaterMetersCount >= 4) { SNText[3] = textBox4.Text; Disabled[3] = !checkBox4.Checked; }
if (WaterMetersCount >= 5) { SNText[4] = textBox5.Text; Disabled[4] = !checkBox5.Checked; }
if (WaterMetersCount >= 6) { SNText[5] = textBox6.Text; Disabled[5] = !checkBox6.Checked; }
completed = true;
Close();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
checkBox1.Checked = true;
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
checkBox2.Checked = true;
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
checkBox3.Checked = true;
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
checkBox4.Checked = true;
}
private void textBox5_TextChanged(object sender, EventArgs e)
{
checkBox5.Checked = true;
}
private void textBox6_TextChanged(object sender, EventArgs e)
{
checkBox6.Checked = true;
}
#region Forced close handling
public void StartForceCloseHandler()
{
UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnForceClose), sender, args); }
else OnForceClose(sender, args);
};
}
private void OnForceClose(object sender, EventArgs args)
{
DialogResult = DialogResult.Cancel;
Close();
}
#endregion
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,302 @@
namespace TBF.BenchControl.DataEntry.Standard
{
partial class CycleEndForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Controls.Add(this.textBox2);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox2.ForeColor = System.Drawing.Color.Black;
this.groupBox2.Location = new System.Drawing.Point(25, 104);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(362, 81);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Wasserzähler 2";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(183, 31);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(163, 31);
this.textBox2.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(18, 34);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 23);
this.label2.TabIndex = 0;
this.label2.Text = "Stand:";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox1.ForeColor = System.Drawing.Color.Black;
this.groupBox1.Location = new System.Drawing.Point(25, 14);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(362, 81);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Wasserzähler 1";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(183, 31);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(163, 31);
this.textBox1.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 34);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 23);
this.label1.TabIndex = 0;
this.label1.Text = "Stand:";
//
// okButton
//
this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.okButton.ForeColor = System.Drawing.Color.Black;
this.okButton.Location = new System.Drawing.Point(425, 23);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(98, 63);
this.okButton.TabIndex = 7;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.textBox3);
this.groupBox3.Controls.Add(this.label3);
this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox3.ForeColor = System.Drawing.Color.Black;
this.groupBox3.Location = new System.Drawing.Point(25, 194);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(362, 81);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Wasserzähler 3";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(183, 31);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(163, 31);
this.textBox3.TabIndex = 1;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 34);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(74, 23);
this.label3.TabIndex = 0;
this.label3.Text = "Stand:";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.textBox4);
this.groupBox4.Controls.Add(this.label4);
this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox4.ForeColor = System.Drawing.Color.Black;
this.groupBox4.Location = new System.Drawing.Point(25, 284);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(362, 81);
this.groupBox4.TabIndex = 4;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Wasserzähler 4";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(183, 31);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(163, 31);
this.textBox4.TabIndex = 1;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(18, 34);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(74, 23);
this.label4.TabIndex = 0;
this.label4.Text = "Stand:";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.textBox5);
this.groupBox5.Controls.Add(this.label5);
this.groupBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox5.ForeColor = System.Drawing.Color.Black;
this.groupBox5.Location = new System.Drawing.Point(25, 374);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(362, 81);
this.groupBox5.TabIndex = 5;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Wasserzähler 5";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(183, 31);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(163, 31);
this.textBox5.TabIndex = 1;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(18, 34);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(74, 23);
this.label5.TabIndex = 0;
this.label5.Text = "Stand:";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.textBox6);
this.groupBox6.Controls.Add(this.label6);
this.groupBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.groupBox6.ForeColor = System.Drawing.Color.Black;
this.groupBox6.Location = new System.Drawing.Point(25, 464);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(362, 81);
this.groupBox6.TabIndex = 6;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Wasserzähler 6";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(183, 31);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(163, 31);
this.textBox6.TabIndex = 1;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(18, 34);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(74, 23);
this.label6.TabIndex = 0;
this.label6.Text = "Stand:";
//
// CycleEndForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DarkGoldenrod;
this.ClientSize = new System.Drawing.Size(559, 566);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.okButton);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "CycleEndForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Daten";
this.TopMost = true;
this.Load += new System.EventHandler(this.CycleEndForm_Load);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label6;
}
}
@@ -0,0 +1,105 @@
using System;
using System.Windows.Forms;
using log4net;
using TBF.Resources;
namespace TBF.BenchControl.DataEntry.Standard
{
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
{
private static readonly ILog log = LogManager.GetLogger(typeof(CycleEndForm));
/// <summary> Number of text boxes for serial numbers </summary>
public readonly int WaterMetersCount;
// To be retrieved after the form closes
public string[] EndStateText;
// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
bool completed;
/// <summary>
/// Constructor
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public CycleEndForm(int waterMetersCount)
{
this.WaterMetersCount = waterMetersCount;
InitializeComponent();
EndStateText = new string[WaterMetersCount];
completed = false;
StartForceCloseHandler();
}
/// <summary> Parameterless constructor for 3 watermeters </summary>
public CycleEndForm()
: this(3)
{
}
private void CycleEndForm_Load(object sender, EventArgs e)
{
Localize();
Height = 50 + 90 * WaterMetersCount;
if (WaterMetersCount < 1) groupBox1.Visible = false;
if (WaterMetersCount < 2) groupBox2.Visible = false;
if (WaterMetersCount < 3) groupBox3.Visible = false;
if (WaterMetersCount < 4) groupBox4.Visible = false;
if (WaterMetersCount < 5) groupBox5.Visible = false;
if (WaterMetersCount < 6) groupBox6.Visible = false;
}
void Localize()
{
Text = Strings.Data;
groupBox1.Text = Strings.Water_Meter + " 1";
groupBox2.Text = Strings.Water_Meter + " 2";
groupBox3.Text = Strings.Water_Meter + " 3";
groupBox4.Text = Strings.Water_Meter + " 4";
groupBox5.Text = Strings.Water_Meter + " 5";
groupBox6.Text = Strings.Water_Meter + " 6";
label1.Text = Strings.State;
label2.Text = Strings.State;
label3.Text = Strings.State;
label4.Text = Strings.State;
label5.Text = Strings.State;
label6.Text = Strings.State;
okButton.Text = Strings.OkBtnText;
}
private void okButton_Click(object sender, EventArgs e)
{
if (WaterMetersCount >= 1) EndStateText[0] = textBox1.Text;
if (WaterMetersCount >= 2) EndStateText[1] = textBox3.Text;
if (WaterMetersCount >= 3) EndStateText[2] = textBox4.Text;
if (WaterMetersCount >= 4) EndStateText[3] = textBox5.Text;
if (WaterMetersCount >= 5) EndStateText[4] = textBox6.Text;
if (WaterMetersCount >= 6) EndStateText[5] = textBox6.Text;
completed = true;
Close();
}
#region Forced close handling
public void StartForceCloseHandler()
{
UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnForceClose), sender, args); }
else OnForceClose(sender, args);
};
}
void OnForceClose(object sender, EventArgs args)
{
DialogResult = DialogResult.Cancel;
Close();
}
#endregion
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,179 @@
using System;
using System.Collections.Generic;
using log4net;
using TBF.BenchControl;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.DataEntry.Standard
{
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Standard({0})", Cfg.ToString(1)); }
readonly EntryFormCfg entryFormCfg;
/// <summary>
/// Properties set by the Begin and the End form
/// </summary>
public string SerialNr(int wmNr) { return string.Empty; }
public float WMState(int wmNr) { return 0; }
System.Windows.Forms.Form modelessDlg;
bool resultSaved; /// Set in Run() when results are saved
IList<IWaterMeter> waterMeters; /// Passesd as an argument of ShowCycleBeginFormOp/ShowCycleEndFormOp constructor
public enum CurrentOp
{
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
}
CurrentOp currentOp;
public EntryForm(EntryFormCfg cfg)
: base(cfg)
{
entryFormCfg = cfg;
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = waterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleEnd;
this.waterMeters = waterMeters;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowWMSNsAndStatesFormOp()
{
return null;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowWMStatesFormOp()
{
return null;
}
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleBeginningForm(Program.WMsCount);
modelessDlg.Show();
}
///
void OpenEndDlg(EntryForm myRef)
{
myRef.modelessDlg = new CycleEndForm(Program.WMsCount);
modelessDlg.Show();
}
/// <summary>Start this operation</summary>
public void Start()
{
resultSaved = false;
switch (currentOp)
{
case CurrentOp.ShowFormAtCycleBeginning:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
break;
case CurrentOp.ShowFormAtCycleEnd:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), 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 (modelessDlg is CycleBeginningForm)
{
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
int count = Math.Min(dlg.WaterMetersCount, waterMeters.Count);
if (count > 0 && waterMeters[0] != null) { waterMeters[0].SerialNr = dlg.SNText[0]; waterMeters[0].Disabled = dlg.Disabled[0]; }
if (count > 1 && waterMeters[1] != null) { waterMeters[1].SerialNr = dlg.SNText[1]; waterMeters[1].Disabled = dlg.Disabled[1]; }
if (count > 2 && waterMeters[2] != null) { waterMeters[2].SerialNr = dlg.SNText[2]; waterMeters[2].Disabled = dlg.Disabled[2]; }
if (count > 3 && waterMeters[3] != null) { waterMeters[3].SerialNr = dlg.SNText[3]; waterMeters[3].Disabled = dlg.Disabled[3]; }
if (count > 4 && waterMeters[4] != null) { waterMeters[4].SerialNr = dlg.SNText[4]; waterMeters[4].Disabled = dlg.Disabled[4]; }
if (count > 5 && waterMeters[5] != null) { waterMeters[5].SerialNr = dlg.SNText[5]; waterMeters[5].Disabled = dlg.Disabled[5]; }
}
else if (modelessDlg is CycleEndForm)
{
CycleEndForm dlg = (modelessDlg as CycleEndForm);
int count = Math.Min(dlg.WaterMetersCount, waterMeters.Count);
if (count > 0 && waterMeters[0] != null) waterMeters[0].EndState = dlg.EndStateText[0];
if (count > 1 && waterMeters[1] != null) waterMeters[1].EndState = dlg.EndStateText[1];
if (count > 2 && waterMeters[2] != null) waterMeters[2].EndState = dlg.EndStateText[2];
if (count > 3 && waterMeters[3] != null) waterMeters[3].EndState = dlg.EndStateText[3];
if (count > 4 && waterMeters[4] != null) waterMeters[4].EndState = dlg.EndStateText[4];
if (count > 5 && waterMeters[5] != null) waterMeters[5].EndState = dlg.EndStateText[5];
}
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="waterMeters">Watermetes with information entered in the forms</param>
/// <param name="results">Test results to be updated with the information</param>
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<Entities.TestResult> results)
{
foreach (var test in results)
{
if (test.MetersKind != Entities.MetersKind.Single) continue;
int nrMtrsToUpdate = Math.Max(waterMeters.Count, test.Meters.Count);
for (int i = 0; i < nrMtrsToUpdate; i++)
{
test.Meters[i].SerialNr = waterMeters[i].SerialNr;
test.Meters[i].EndState = waterMeters[i].EndState;
}
}
}
}
}
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard
{
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
{
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
///
/// Serialized parameters
///
public string ProtocolTitle1;
public string ProtocolTitle2;
public string ProtocolTitle3;
/// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg()
{
Name = "DataEntryForm-3";
ParentName = string.Empty;
ProtocolTitle1 = "Protokoll Werkprüfung";
ProtocolTitle2 = "Protokoll 2";
ProtocolTitle3 = "Protokoll 3";
}
public EntryFormCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Protocol1={1}, Protocol2={2}, Protocol3={3}",
Name,
(string.IsNullOrEmpty(ProtocolTitle1) ? "-" : ProtocolTitle1),
(string.IsNullOrEmpty(ProtocolTitle2) ? "-" : ProtocolTitle2),
(string.IsNullOrEmpty(ProtocolTitle3) ? "-" : ProtocolTitle3));
}
}
}
@@ -0,0 +1,77 @@
using System;
using System.Windows.Forms;
using log4net;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard
{
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
{
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
public bool ShowMore { get { return false; } }
EntryFormCfg config;
public IComponentCfg Config
{
get { return config as IComponentCfg; }
set
{
config = value as EntryFormCfg;
Redraw();
}
}
public EntryFormCfgCtrl()
{
InitializeComponent();
}
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
{
Redraw();
}
public void Closing()
{
}
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
protocolTitle1TextBox.Text = config.ProtocolTitle1;
protocolTitle2TextBox.Text = config.ProtocolTitle2;
protocolTitle3TextBox.Text = config.ProtocolTitle3;
}
public void Unlock()
{
nameTextBox.Enabled = true;
protocolTitle1TextBox.Enabled = true;
protocolTitle2TextBox.Enabled = true;
protocolTitle3TextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
config.Name = nameTextBox.Text;
config.ProtocolTitle1 = protocolTitle1TextBox.Text;
config.ProtocolTitle2 = protocolTitle2TextBox.Text;
config.ProtocolTitle3 = protocolTitle3TextBox.Text;
return flags;
}
}
}
@@ -0,0 +1,152 @@
namespace TBF.BenchControl.DataEntry.Standard
{
partial class EntryFormCfgCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.protocolTitle1TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle2TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle3TextBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.TabIndex = 5;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(27, 60);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 4;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 3;
this.classNameLabel.Text = "ComonentName";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(27, 86);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 13);
this.label1.TabIndex = 6;
this.label1.Text = "Protocol title 1";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(27, 112);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 13);
this.label2.TabIndex = 7;
this.label2.Text = "Protocol title 2";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(27, 138);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(74, 13);
this.label3.TabIndex = 8;
this.label3.Text = "Protocol title 3";
//
// protocolTitle1TextBox
//
this.protocolTitle1TextBox.Enabled = false;
this.protocolTitle1TextBox.Location = new System.Drawing.Point(137, 83);
this.protocolTitle1TextBox.Name = "protocolTitle1TextBox";
this.protocolTitle1TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle1TextBox.TabIndex = 9;
//
// protocolTitle2TextBox
//
this.protocolTitle2TextBox.Enabled = false;
this.protocolTitle2TextBox.Location = new System.Drawing.Point(137, 109);
this.protocolTitle2TextBox.Name = "protocolTitle2TextBox";
this.protocolTitle2TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle2TextBox.TabIndex = 10;
//
// protocolTitle3TextBox
//
this.protocolTitle3TextBox.Enabled = false;
this.protocolTitle3TextBox.Location = new System.Drawing.Point(137, 135);
this.protocolTitle3TextBox.Name = "protocolTitle3TextBox";
this.protocolTitle3TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle3TextBox.TabIndex = 11;
//
// EntryFormCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.protocolTitle3TextBox);
this.Controls.Add(this.protocolTitle2TextBox);
this.Controls.Add(this.protocolTitle1TextBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
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();
}
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox protocolTitle1TextBox;
private System.Windows.Forms.TextBox protocolTitle2TextBox;
private System.Windows.Forms.TextBox protocolTitle3TextBox;
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,18 @@
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.Standard
{
public class EntryFormFactory : IComponentFactory
{
public string ClassName { get { return "DataEntry-Standard"; } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(EntryFormCfg), component, this);
}
}
}