Cleanup in new forms - protocols deleted.

This commit is contained in:
Milan Hanajik
2015-03-26 17:19:54 +01:00
parent 8b77f4ce68
commit 1c69e3e0b1
6 changed files with 3 additions and 179 deletions
@@ -14,18 +14,12 @@ namespace TBF.BenchControl.DataEntry.Combined
///
/// Serialized parameters
///
public string ProtocolTitle1;
public string ProtocolTitle2;
public string ProtocolTitle3;
/// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg()
{
Name = "DataEntryForm-Munich";
ParentName = string.Empty;
ProtocolTitle1 = "Protokoll Werkprüfung";
ProtocolTitle2 = "Protokoll 2";
ProtocolTitle3 = "Protokoll 3";
}
public EntryFormCfg(IComponentFactory factory)
@@ -36,11 +30,7 @@ namespace TBF.BenchControl.DataEntry.Combined
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));
return string.Format("Name={0}", Name);
}
}
}
@@ -41,17 +41,11 @@ namespace TBF.BenchControl.DataEntry.Combined
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)
@@ -67,9 +61,6 @@ namespace TBF.BenchControl.DataEntry.Combined
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;
}
@@ -31,12 +31,6 @@
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
@@ -65,67 +59,10 @@
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);
@@ -142,11 +79,5 @@
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;
}
}
@@ -14,18 +14,12 @@ namespace TBF.BenchControl.DataEntry.Standard
///
/// Serialized parameters
///
public string ProtocolTitle1;
public string ProtocolTitle2;
public string ProtocolTitle3;
/// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg()
{
Name = "DataEntryForm-3";
Name = "DataEntry-Standard";
ParentName = string.Empty;
ProtocolTitle1 = "Protokoll Werkprüfung";
ProtocolTitle2 = "Protokoll 2";
ProtocolTitle3 = "Protokoll 3";
}
public EntryFormCfg(IComponentFactory factory)
@@ -36,11 +30,7 @@ namespace TBF.BenchControl.DataEntry.Standard
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));
return string.Format("Name={0}", Name);
}
}
}
@@ -41,17 +41,11 @@ namespace TBF.BenchControl.DataEntry.Standard
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)
@@ -67,9 +61,6 @@ namespace TBF.BenchControl.DataEntry.Standard
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;
}
@@ -31,12 +31,6 @@
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
@@ -65,67 +59,10 @@
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);
@@ -142,11 +79,5 @@
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;
}
}