ComponentParametersDlg moved from TBF.BenchControl to TBF.UI.Bench.Components.

This commit is contained in:
Milan Hanajik
2021-08-29 12:24:08 +02:00
parent adfb9ae8d5
commit 64a5f7ceb8
49 changed files with 182 additions and 120 deletions
-89
View File
@@ -1,89 +0,0 @@
///
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
///
namespace TBF.BenchControl
{
partial class ComponentParametersDlg
{
/// <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.splitContainer = new System.Windows.Forms.SplitContainer();
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
this.SuspendLayout();
//
// splitContainer
//
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer.Location = new System.Drawing.Point(0, 0);
this.splitContainer.Name = "splitContainer";
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.sharedButtons);
this.splitContainer.Size = new System.Drawing.Size(559, 354);
this.splitContainer.SplitterDistance = 455;
this.splitContainer.TabIndex = 1;
//
// sharedButtons
//
this.sharedButtons.Location = new System.Drawing.Point(0, 0);
this.sharedButtons.Name = "sharedButtons";
this.sharedButtons.Size = new System.Drawing.Size(100, 521);
this.sharedButtons.TabIndex = 0;
//
// ComponentParametersDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(559, 354);
this.Controls.Add(this.splitContainer);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ComponentParametersDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Properties";
this.Load += new System.EventHandler(this.ComponentCfgForm_Load);
this.splitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
this.splitContainer.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer;
private TBF.UI.Shared.SharedButtons sharedButtons;
}
}
-141
View File
@@ -1,141 +0,0 @@
///
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl;
using TBF.BenchControl.Generic;
using TBF.Resources;
using TBF.UI.Shared;
namespace TBF.BenchControl
{
public partial class ComponentParametersDlg : Form
{
public IComponentCfgCtrl ComponentCfgCtrl;
const int ComponentCfgCtrlHeight = 350;
const int ComponentCfgCtrlMoreHeight = 250;
public IComponentCfg Config
{
get
{
if (ComponentCfgCtrl == null) return null;
return ComponentCfgCtrl.Config;
}
}
public CfgUpdateFlags Flags;
public bool UnlockAfterStart;
/// <summary>
/// List of components (=component configuration instances)
/// </summary>
public IList<Config.Entities.Component> TbfComponents;
public ComponentParametersDlg()
{
InitializeComponent();
Flags = CfgUpdateFlags.None;
/// SharedDlgButtons configuration
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { global::Users.Entities.GID.Metrologists };
sharedButtons.MoreButtonTop = ComponentCfgCtrlHeight - 45;
sharedButtons.OptionalButtons = SharedButtons.Buttons.None;
sharedButtons.Unlocked += Unlock;
sharedButtons.OKClicked += okButton_Click;
sharedButtons.CancelClicked += cancelButton_Click;
sharedButtons.MoreClicked += moreButton_Click;
}
private void ComponentCfgForm_Load(object sender, EventArgs e)
{
Text = Strings.Properties;
if (ComponentCfgCtrl != null)
{
splitContainer.Panel1.Controls.Add((UserControl)ComponentCfgCtrl);
}
if ((ComponentCfgCtrl != null) && ComponentCfgCtrl.ShowMore)
{
sharedButtons.OptionalButtons = SharedButtons.Buttons.More;
}
if (UnlockAfterStart)
{
sharedButtons.UnlockButtons();
ComponentCfgCtrl.Unlock();
}
}
/// <summary>
/// Handler of the Unlock button click
/// </summary>
private void Unlock(object sender, EventArgs e)
{
ComponentCfgCtrl.Unlock();
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
if (ComponentCfgCtrl == null) return CfgUpdateFlags.None; /// Nothing to verify -> OK
return ComponentCfgCtrl.VerifyCfg(ref message);
}
private void okButton_Click(object sender, EventArgs e)
{
string message = string.Empty;
CfgUpdateFlags flags = VerifyCfg(ref message);
if ((flags & CfgUpdateFlags.Error) == CfgUpdateFlags.Error)
{
MessageBox.Show(Strings.Please_change_the_following_settings + message,
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (ComponentCfgCtrl != null)
{
flags = ComponentCfgCtrl.UpdateCfg();
if ((flags & CfgUpdateFlags.RestartRqrd) == CfgUpdateFlags.RestartRqrd)
{
MessageBox.Show(Strings.Program_restart_is_required_to_apply_some_settings,
Strings.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
ComponentCfgCtrl.Closing();
}
Flags = flags;
DialogResult = DialogResult.OK;
Close();
return;
}
private void cancelButton_Click(object sender, EventArgs e)
{
if (ComponentCfgCtrl != null) ComponentCfgCtrl.Closing();
DialogResult = DialogResult.Cancel;
Close();
return;
}
private void moreButton_Click(object sender, EventArgs e)
{
ComponentCfgCtrl.Unlock();
if (sharedButtons.MoreActive)
{
Height = Height + ComponentCfgCtrlMoreHeight;
}
else
{
Height = Height - ComponentCfgCtrlMoreHeight;
}
return;
}
}
}
@@ -1,120 +0,0 @@
<?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>
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.Resources;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.DataEntry.S620
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.DataEntry.S620
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Output.DB.ProductionTracing.Factory)
{
@@ -5,7 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Dummy.FlowMeter
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Dummy.RegulValve
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.CoverTest
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.CoverTest
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using log4net;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.Diverter
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.Elde.Diverter
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.FixedStartRegisterReader
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using Config.Entities;
using TBF.BenchControl.Configs;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.FlowMeter
{
@@ -36,9 +37,9 @@ namespace TBF.BenchControl.Elde.FlowMeter
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using Config.Entities;
using TBF.BenchControl.Configs;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.FlowMeterDewa
{
@@ -40,9 +41,9 @@ namespace TBF.BenchControl.Elde.FlowMeterDewa
flowmeterComboBox2.Items.Add("---");
flowmeterComboBox3.Items.Add("---");
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.FlowMeterTriplet
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.FlowMeterTriplet
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.FlowMeterTwins
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
parentDlg = ParentForm as ComponentParametersDlg;
if (parentDlg == null) return;
if (parentDlg.TbfComponents != null)
if (parentDlg.CmpntEntities != null)
{
foreach (var cmpnt in parentDlg.TbfComponents)
foreach (var cmpnt in parentDlg.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.PressureMeter
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.PressureMeter
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
+3 -2
View File
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.Pump
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.Pump
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.PumpTandem
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.PumpTandem
parentDlg = ParentForm as ComponentParametersDlg;
if (parentDlg == null) return;
if (parentDlg.TbfComponents != null)
if (parentDlg.CmpntEntities != null)
{
foreach (var cmpnt in parentDlg.TbfComponents)
foreach (var cmpnt in parentDlg.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.Pump.PumpFactory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.PumpWithFM.PumpFactory ||
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.PumpWithFM
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.PumpWithFM
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using log4net;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.RegulValve
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.Elde.RegulValve
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.RegulValveCoax
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.RegulValveCoax
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using log4net;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.RegulValveMilwaukee
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.Elde.RegulValveMilwaukee
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.RegulValveTandem
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.RegulValve.RegulValveFactory)
{
@@ -6,6 +6,7 @@ using System.IO;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.TempMeter
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.Elde.TempMeter
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.TempMeterInternal
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
+3 -2
View File
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.Valve
{
@@ -40,11 +41,11 @@ namespace TBF.BenchControl.Elde.Valve
categoryComboBox.Items.Add(ValveCategory.Output.ToString());
categoryComboBox.Items.Add(ValveCategory.None.ToString());
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
parentNameComboBox.Items.Add("---");
coupledToComboBox.Items.Add("---");
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Elde.ValveEx
{
@@ -39,13 +40,13 @@ namespace TBF.BenchControl.Elde.ValveEx
logicalOpComboBox.Items.Add("AND");
logicalOpComboBox.Items.Add("OR");
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
AddValvePumpItemsToCombo(input1ComboBox, parent.TbfComponents);
AddValvePumpItemsToCombo(input2ComboBox, parent.TbfComponents);
AddValvePumpItemsToCombo(input3ComboBox, parent.TbfComponents);
AddValvePumpItemsToCombo(input4ComboBox, parent.TbfComponents);
AddValvePumpItemsToCombo(input5ComboBox, parent.TbfComponents);
AddValvePumpItemsToCombo(input1ComboBox, parent.CmpntEntities);
AddValvePumpItemsToCombo(input2ComboBox, parent.CmpntEntities);
AddValvePumpItemsToCombo(input3ComboBox, parent.CmpntEntities);
AddValvePumpItemsToCombo(input4ComboBox, parent.CmpntEntities);
AddValvePumpItemsToCombo(input5ComboBox, parent.CmpntEntities);
}
Redraw();
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.Resources;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Keithley.TempMeter
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.Keithley.TempMeter
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Keithley.Multimeter_2010_RS232.Factory)
{
@@ -7,6 +7,7 @@ using System.Windows.Forms;
using System.IO.Ports;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.MettlerToledo.Multi
{
@@ -97,10 +98,10 @@ namespace TBF.BenchControl.MettlerToledo.Multi
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
drainValveComboBox.Items.Add("---");
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.Valve.ValveFactory)
{
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using System.IO.Ports;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.MettlerToledo.Standard
{
@@ -103,11 +104,11 @@ namespace TBF.BenchControl.MettlerToledo.Standard
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
evaporationComboBox.Items.Add("---");
drainValveComboBox.Items.Add("---");
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.Valve.ValveFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Modbus.CometAmbient
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Modbus.CometAmbient
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.Common.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Modbus.Easytherm
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Modbus.Easytherm
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.Common.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Modbus.Novus
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Modbus.Novus
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.Common.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Modbus.PressureMeter.Meret
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Modbus.PressureMeter.Meret
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.Common.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Modbus.QuidoRS
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.Modbus.QuidoRS
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.Common.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Modbus.TankSelector
{
@@ -39,9 +40,9 @@ namespace TBF.BenchControl.Modbus.TankSelector
warmHeatingComboBox.Items.Add("---");
warmCoolingComboBox.Items.Add("---");
coldCoolingComboBox.Items.Add("---");
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.QuidoRS.Factory)
{
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.Resources;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Network.Camera.CLP1611
{
@@ -38,9 +39,9 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Network.Adapter.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Network.Camera.Display
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Network.Camera.Roi
{
@@ -36,9 +37,9 @@ namespace TBF.BenchControl.Network.Camera.Roi
if (parent == null) return;
previousRoiComboBox.Items.Add("---");
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Network.Camera.CLP1611.Factory)
{
@@ -7,6 +7,7 @@ using log4net;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.Resources;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
{
@@ -39,9 +40,9 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Network.Camera.CLP1611.Factory)
{
@@ -4,6 +4,7 @@
using System;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Output.DB.SaveDiverterCorrections
{
@@ -36,7 +37,7 @@ namespace TBF.BenchControl.Output.DB.SaveDiverterCorrections
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
diverter1ComboBox.Items.Add("---");
diverter2ComboBox.Items.Add("---");
@@ -45,7 +46,7 @@ namespace TBF.BenchControl.Output.DB.SaveDiverterCorrections
diverter5ComboBox.Items.Add("---");
diverter6ComboBox.Items.Add("---");
///
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Elde.Diverter.DiverterFactory)
{
@@ -4,6 +4,7 @@
using System;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
{
@@ -36,7 +37,7 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
flowmeter1ComboBox.Items.Add("---");
flowmeter2ComboBox.Items.Add("---");
@@ -46,7 +47,7 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
flowmeter6ComboBox.Items.Add("---");
flowmeter7ComboBox.Items.Add("---");
///
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Elde.FlowMeter.FlowMeterFactory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.RegisterReaders.KPackE.DataEntryForRadio
{
@@ -37,9 +38,9 @@ namespace TBF.BenchControl.RegisterReaders.KPackE.DataEntryForRadio
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Radio.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.RegisterReaders.KPackE.RegisterReader
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.RegisterReaders.KPackE.RegisterReader
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Radio.Factory)
{
@@ -5,6 +5,7 @@ using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.RegisterReaders.PulsesFromEldeCB
{
@@ -35,9 +36,9 @@ namespace TBF.BenchControl.RegisterReaders.PulsesFromEldeCB
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
@@ -6,6 +6,7 @@ using System.Windows.Forms;
using Config.Entities;
using TBF.BenchControl.Generic;
using TBF.Resources;
using TBF.UI.Bench.Components;
namespace TBF.BenchControl.Various.TankWithLevelMsrmnt
{
@@ -37,13 +38,13 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
if (parent.CmpntEntities != null)
{
drainValveComboBox.Items.Add("---");
drainValve2ComboBox.Items.Add("---");
levelMeasurementComboBox.Items.Add("---");
foreach (var cmpnt in parent.TbfComponents)
foreach (var cmpnt in parent.CmpntEntities)
{
IComponentFactory cmpntFact = TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName);