Initial commit almost identical to SVN-repo rev.340
This commit is contained in:
+193
@@ -0,0 +1,193 @@
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
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()
|
||||
{
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.mainStateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.mainSnTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.auxStateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.auxSnTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// 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(439, 27);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(98, 63);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.mainStateTextBox);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.mainSnTextBox);
|
||||
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(28, 18);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(376, 92);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Hauptzähler";
|
||||
//
|
||||
// mainStateTextBox
|
||||
//
|
||||
this.mainStateTextBox.Location = new System.Drawing.Point(183, 56);
|
||||
this.mainStateTextBox.Name = "mainStateTextBox";
|
||||
this.mainStateTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.mainStateTextBox.TabIndex = 3;
|
||||
this.mainStateTextBox.Visible = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(18, 59);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(74, 23);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Stand:";
|
||||
this.label2.Visible = false;
|
||||
//
|
||||
// mainSnTextBox
|
||||
//
|
||||
this.mainSnTextBox.Location = new System.Drawing.Point(183, 37);
|
||||
this.mainSnTextBox.Name = "mainSnTextBox";
|
||||
this.mainSnTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.mainSnTextBox.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 40);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(159, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Seriennummer:";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.auxStateTextBox);
|
||||
this.groupBox2.Controls.Add(this.label3);
|
||||
this.groupBox2.Controls.Add(this.auxSnTextBox);
|
||||
this.groupBox2.Controls.Add(this.label4);
|
||||
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(28, 135);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(376, 92);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Nebenzähler";
|
||||
//
|
||||
// auxStateTextBox
|
||||
//
|
||||
this.auxStateTextBox.Location = new System.Drawing.Point(183, 54);
|
||||
this.auxStateTextBox.Name = "auxStateTextBox";
|
||||
this.auxStateTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.auxStateTextBox.TabIndex = 3;
|
||||
this.auxStateTextBox.Visible = false;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(18, 57);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(74, 23);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Stand:";
|
||||
this.label3.Visible = false;
|
||||
//
|
||||
// auxSnTextBox
|
||||
//
|
||||
this.auxSnTextBox.Location = new System.Drawing.Point(183, 37);
|
||||
this.auxSnTextBox.Name = "auxSnTextBox";
|
||||
this.auxSnTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.auxSnTextBox.TabIndex = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 40);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(159, 23);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Seriennummer:";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(569, 255);
|
||||
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.Text = "Daten";
|
||||
this.TopMost = true;
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.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 mainStateTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox mainSnTextBox;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox auxStateTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox auxSnTextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
// To be retrieved after the form closes
|
||||
public string MainSNText;
|
||||
public string AuxSNText;
|
||||
public string MainStateText;
|
||||
public string AuxStateText;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
completed = false;
|
||||
// TODO: localize strings
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainSNText = mainSnTextBox.Text;
|
||||
AuxSNText = auxSnTextBox.Text;
|
||||
MainStateText = mainStateTextBox.Text;
|
||||
AuxStateText = auxStateTextBox.Text;
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,264 @@
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
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.auxStateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.mainStateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.radioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.qFallTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.qRiseTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.auxStateTextBox);
|
||||
this.groupBox2.Controls.Add(this.label3);
|
||||
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, 123);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox2.TabIndex = 4;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Nebenzähler";
|
||||
//
|
||||
// auxStateTextBox
|
||||
//
|
||||
this.auxStateTextBox.Location = new System.Drawing.Point(183, 31);
|
||||
this.auxStateTextBox.Name = "auxStateTextBox";
|
||||
this.auxStateTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.auxStateTextBox.TabIndex = 3;
|
||||
//
|
||||
// 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 = 2;
|
||||
this.label3.Text = "Stand:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.mainStateTextBox);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
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, 23);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox1.TabIndex = 3;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Hauptzähler";
|
||||
//
|
||||
// mainStateTextBox
|
||||
//
|
||||
this.mainStateTextBox.Location = new System.Drawing.Point(183, 31);
|
||||
this.mainStateTextBox.Name = "mainStateTextBox";
|
||||
this.mainStateTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.mainStateTextBox.TabIndex = 3;
|
||||
//
|
||||
// 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 = 2;
|
||||
this.label2.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, 33);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(98, 63);
|
||||
this.okButton.TabIndex = 5;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.radioButton3);
|
||||
this.groupBox3.Controls.Add(this.radioButton2);
|
||||
this.groupBox3.Controls.Add(this.radioButton1);
|
||||
this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox3.Location = new System.Drawing.Point(25, 223);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(362, 142);
|
||||
this.groupBox3.TabIndex = 6;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Protokoll";
|
||||
//
|
||||
// radioButton3
|
||||
//
|
||||
this.radioButton3.AutoSize = true;
|
||||
this.radioButton3.Location = new System.Drawing.Point(34, 100);
|
||||
this.radioButton3.Name = "radioButton3";
|
||||
this.radioButton3.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton3.TabIndex = 2;
|
||||
this.radioButton3.TabStop = true;
|
||||
this.radioButton3.Text = "radioButton3";
|
||||
this.radioButton3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(34, 67);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton2.TabIndex = 1;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "radioButton2";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(34, 34);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton1.TabIndex = 0;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "radioButton1";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.label4);
|
||||
this.groupBox4.Controls.Add(this.qFallTextBox);
|
||||
this.groupBox4.Controls.Add(this.label1);
|
||||
this.groupBox4.Controls.Add(this.qRiseTextBox);
|
||||
this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox4.Location = new System.Drawing.Point(25, 383);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(361, 125);
|
||||
this.groupBox4.TabIndex = 7;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Umschaltpunkte";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 79);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(64, 23);
|
||||
this.label4.TabIndex = 7;
|
||||
this.label4.Text = "Qfall:";
|
||||
//
|
||||
// qFallTextBox
|
||||
//
|
||||
this.qFallTextBox.Location = new System.Drawing.Point(183, 77);
|
||||
this.qFallTextBox.Name = "qFallTextBox";
|
||||
this.qFallTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.qFallTextBox.TabIndex = 6;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 37);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(80, 23);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "Qsteig:";
|
||||
//
|
||||
// qRiseTextBox
|
||||
//
|
||||
this.qRiseTextBox.Location = new System.Drawing.Point(183, 34);
|
||||
this.qRiseTextBox.Name = "qRiseTextBox";
|
||||
this.qRiseTextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.qRiseTextBox.TabIndex = 4;
|
||||
//
|
||||
// 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, 530);
|
||||
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.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox auxStateTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox mainStateTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.RadioButton radioButton3;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox qFallTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox qRiseTextBox;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
// To be set before the form opens
|
||||
public string ProtocolName1;
|
||||
public string ProtocolName2;
|
||||
public string ProtocolName3;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string MainStateText;
|
||||
public string AuxStateText;
|
||||
public string ProtocolTitle;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
public CycleEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
completed = false;
|
||||
// TODO: localize strings
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
radioButton1.Text = ProtocolName1;
|
||||
radioButton2.Text = ProtocolName2;
|
||||
radioButton3.Text = ProtocolName3;
|
||||
qRiseTextBox.Text = Sequences.SequenceBase.Qrise.ToString("F3");
|
||||
qFallTextBox.Text = Sequences.SequenceBase.Qfall.ToString("F3");
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainStateText = mainStateTextBox.Text;
|
||||
AuxStateText = auxStateTextBox.Text;
|
||||
|
||||
float umsch;
|
||||
if (Utils.TryParseUFloat(qRiseTextBox.Text, out umsch)) Sequences.SequenceBase.Qrise = umsch;
|
||||
if (Utils.TryParseUFloat(qFallTextBox.Text, out umsch)) Sequences.SequenceBase.Qfall = umsch;
|
||||
|
||||
if (radioButton1.Checked) ProtocolTitle = ProtocolName1;
|
||||
else if (radioButton2.Checked) ProtocolTitle = ProtocolName2;
|
||||
else if (radioButton3.Checked) ProtocolTitle = ProtocolName3;
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,140 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryForm : Generic.IComponent, IOperation, GenericDevices.IDataEntry, GenericDevices.IHasProtocolTitle
|
||||
{
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
public Generic.IComponentCfg Cfg { get { return entryFormCfg; } }
|
||||
|
||||
public static void ResetStaticProperties() { }
|
||||
|
||||
public string Name { get { return entryFormCfg.Name; } }
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin and the End form
|
||||
/// </summary>
|
||||
public string MainBeginStateText { get { return mainBeginStateText; } }
|
||||
string mainBeginStateText;
|
||||
|
||||
public string AuxBegintateText { get { return auxBeginStateText; } }
|
||||
string auxBeginStateText;
|
||||
|
||||
public string ProtocolTitle { get { return protocolTitle; } }
|
||||
string protocolTitle;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
IList<GenericDevices.IWaterMeter> waterMeters;
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
{
|
||||
if (cfg == null) throw new ArgumentNullException("cfg");
|
||||
this.entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowFormAtCycleBeginningOp(IList<GenericDevices.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 ShowFormAtCycleEndOp(IList<GenericDevices.IWaterMeter> waterMeters)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryForm myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm();
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryForm myRef)
|
||||
{
|
||||
CycleEndForm endForm = new CycleEndForm();
|
||||
endForm.ProtocolName1 = entryFormCfg.ProtocolTitle1;
|
||||
endForm.ProtocolName2 = entryFormCfg.ProtocolTitle2;
|
||||
endForm.ProtocolName3 = entryFormCfg.ProtocolTitle3;
|
||||
myRef.modelessDlg = endForm;
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
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 as GenericDevices.IHasCompleted).Completed) return Event.None;
|
||||
|
||||
if (modelessDlg is CycleBeginningForm)
|
||||
{
|
||||
if (waterMeters.Count >= 1 && waterMeters[0] != null)
|
||||
{
|
||||
mainBeginStateText = (modelessDlg as CycleBeginningForm).MainStateText;
|
||||
waterMeters[0].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText;
|
||||
}
|
||||
if (waterMeters.Count >= 2 && waterMeters[1] != null)
|
||||
{
|
||||
auxBeginStateText = (modelessDlg as CycleBeginningForm).AuxStateText;
|
||||
waterMeters[1].SerialNr = (modelessDlg as CycleBeginningForm).AuxSNText;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (waterMeters.Count >= 1 && waterMeters[0] != null)
|
||||
{
|
||||
waterMeters[0].State = (modelessDlg as CycleEndForm).MainStateText;
|
||||
}
|
||||
if (waterMeters.Count >= 2 && waterMeters[1] != null)
|
||||
{
|
||||
waterMeters[1].State = (modelessDlg as CycleEndForm).AuxStateText;
|
||||
}
|
||||
protocolTitle = (modelessDlg as CycleEndForm).ProtocolTitle;
|
||||
}
|
||||
return Event.Done;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
modelessDlg = null;
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public string ProtocolTitle1;
|
||||
public string ProtocolTitle2;
|
||||
public string ProtocolTitle3;
|
||||
|
||||
/// Parameterless constructor
|
||||
public EntryFormCfg()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data entry form configuration parameters
|
||||
/// </summary>
|
||||
/// <param name="factory">Data entry form factory</param>
|
||||
/// <param name="name">Component name</param>
|
||||
public EntryFormCfg(IComponentFactory factory, string name,
|
||||
string protocolTitle1, string protocolTitle2, string protocolTitle3)
|
||||
: base(factory, name)
|
||||
{
|
||||
this.ProtocolTitle1 = protocolTitle1;
|
||||
this.ProtocolTitle2 = protocolTitle2;
|
||||
this.ProtocolTitle3 = protocolTitle3;
|
||||
}
|
||||
|
||||
public IComponentCfg Clone()
|
||||
{
|
||||
return new EntryFormCfg(Factory, Name, ProtocolTitle1, ProtocolTitle2, ProtocolTitle3);
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public TBF.Entities.Component CreateDbEntity()
|
||||
{
|
||||
using (var writer = new StringWriter())
|
||||
{
|
||||
(new XmlSerializer(GetType())).Serialize(writer, this);
|
||||
return Entities.Component.CreateFromCfg(Name, Factory.ClassName, ParentName, ItemNr, DebugLevel, LogLevel, writer.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static IComponentCfg CreateFromDbEntity(Entities.Component component, IComponentFactory factory)
|
||||
{
|
||||
using (var reader = new StringReader(component.Parameters))
|
||||
{
|
||||
EntryFormCfg config = (EntryFormCfg)(new XmlSerializer(typeof(EntryFormCfg))).Deserialize(reader);
|
||||
config.InitCfgBaseFromEntity(component, factory);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
EntryFormCfg config;
|
||||
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EntryFormCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EntryFormCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
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 CfgVerifyFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgVerifyFlags flags = CfgVerifyFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public void UpdateCfg()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ProtocolTitle1 = protocolTitle1TextBox.Text;
|
||||
config.ProtocolTitle2 = protocolTitle2TextBox.Text;
|
||||
config.ProtocolTitle3 = protocolTitle3TextBox.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
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,40 @@
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryFormFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntryForm-Munich"; } }
|
||||
public bool HasProcedureParams { get { return false; } }
|
||||
public bool HasTestParams { get { return false; } }
|
||||
public IParamsProvider GetTestParams(Entities.ComponentTest testParams) { return null; }
|
||||
public IParamsProvider GetProcedureParams(Entities.ComponentProcedure procedureParams) { return null; }
|
||||
|
||||
/// <summary>Max. number of components of this class in the system</summary>
|
||||
public int MaxCount { get { return 1; } }
|
||||
|
||||
|
||||
public IComponentCfg DefaultConfig(IList<Entities.Component> components)
|
||||
{
|
||||
return new EntryFormCfg(this, "DataEntryForm-Munich", "Protokoll Werkprüfung", "Protokoll 2", "Protokoll 3");
|
||||
}
|
||||
|
||||
public IComponentCfgCtrl CreateCfgCtrl()
|
||||
{
|
||||
return new EntryFormCfgCtrl();
|
||||
}
|
||||
|
||||
public IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components)
|
||||
{
|
||||
return new EntryForm((EntryFormCfg)config);
|
||||
}
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
|
||||
{
|
||||
return EntryFormCfg.CreateFromDbEntity(component, this);
|
||||
}
|
||||
|
||||
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user