diff --git a/TestBenchFramework/BenchControl/Modbus/TankSelector/ProcParams.cs b/TestBenchFramework/BenchControl/Modbus/TankSelector/ProcParams.cs new file mode 100644 index 000000000..0e1700519 --- /dev/null +++ b/TestBenchFramework/BenchControl/Modbus/TankSelector/ProcParams.cs @@ -0,0 +1,141 @@ +/// +/// Copyright (c) 2017 Sensus Metering Systems +/// +using System; +using System.IO; +using System.Text; +using System.Xml.Serialization; +using Config.Entities; +using TBF.BenchControl.Generic; +using TBF.Resources; + +namespace TBF.BenchControl.Modbus.TankSelector +{ + public class ProcParams : ProcedureParamsBase, IParamsProvider, IProcedureParams + { + public float TempHotHeating; /// [°C] target temperature for hot water heating + public float TempHotCooling; /// [°C] target temperature for hot water cooling + public float TempWarmHeating; /// [°C] target temperature for warm water heating + public float TempWarmCooling; /// [°C] target temperature for warm water cooling + public float TempColdCooling; /// [°C] target temperature for cold water cooling + + + public override void InitializeAll() + { + TempHotHeating = 20.0f; + TempHotCooling = 20.0f; + TempWarmHeating = 20.0f; + TempWarmCooling = 20.0f; + TempColdCooling = 20.0f; + } + + string[] paramNames = new string[] + { + Strings.T_hot_heating, + Strings.T_hot_cooling, + Strings.T_warm_heating, + Strings.T_warm_cooling, + Strings.T_cold_cooling, + }; + public override string ParamName(int i) { return paramNames[i]; } + public override int ParamsCount() { return paramNames.Length; } + + public override string ToString(int i) + { + switch (i) + { + case 0: return TempHotHeating.ToString(); + case 1: return TempHotCooling.ToString(); + case 2: return TempWarmHeating.ToString(); + case 3: return TempWarmCooling.ToString(); + case 4: return TempColdCooling.ToString(); + default: return string.Empty; + } + } + + public void UpdateParam(int i, string strValue) + { + switch (i) + { + case 0: TempHotHeating = Utils.ParseUFloat(strValue); return; + case 1: TempHotCooling = Utils.ParseUFloat(strValue); return; + case 2: TempWarmHeating = Utils.ParseUFloat(strValue); return; + case 3: TempWarmCooling = Utils.ParseUFloat(strValue); return; + case 4: TempColdCooling = Utils.ParseUFloat(strValue); return; + default: return; + } + } + + public bool ValidateParam(int i, string strValue, out string message) + { + message = string.Empty; + + float dummy; + switch (i) + { + case 0: /// T_hot_heating + case 1: /// T_hot_cooling + case 2: /// T_warm_heating + case 3: /// T_warm_cooling + case 4: /// T_cold_cooling + if (Utils.TryParseUFloat(strValue, out dummy)) return true; + break; + default: + message = "Invalid index"; + return false; + } + + message = ParamName(i) + " is invalid"; + return false; + } + + void CopyContentTo(ProcParams prms) + { + prms.TempHotHeating = this.TempHotHeating; + prms.TempHotCooling = this.TempHotCooling; + prms.TempWarmHeating = this.TempWarmHeating; + prms.TempWarmCooling = this.TempWarmCooling; + prms.TempColdCooling = this.TempColdCooling; + } + + public IParamsProvider Clone() + { + ProcParams pars = new ProcParams(); + CopyContentTo(pars); + return pars; + } + + public override void UpdateProcedureParams(ComponentProcedure dbEntity) + { + if (dbEntity == null) return; + try + { + ProcParams tmp = (ProcParams)(new XmlSerializer(typeof(ProcParams))) + .Deserialize(new StringReader(dbEntity.Parameters)); + + procedureParamsEntity = dbEntity; + componentName = dbEntity.CmpntName; + procedure = dbEntity.Procedure; + + tmp.CopyContentTo(this); + } + catch + { + } + } + + /// + /// Parameterless constructor initializes the parameters + /// + public ProcParams() + { + } + + public ProcParams(ComponentProcedure procParamsEntity, string componentName, Procedure procedure) + { + this.procedureParamsEntity = procParamsEntity; + this.componentName = componentName; + this.procedure = procedure; + } + } +} diff --git a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelector.cs b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelector.cs index 46a6b2e96..0a0936315 100644 --- a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelector.cs +++ b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelector.cs @@ -17,9 +17,14 @@ namespace TBF.BenchControl.Modbus.TankSelector public override string ToString() { return string.Format("TankSelector({0})", Cfg.ToString(1)); } readonly TankSelectorCfg tankSelectorCfg; + readonly TBF.BenchControl.Modbus.QuidoRS.QuidoRS quidoRS; - readonly TBF.BenchControl.Modbus.Easytherm.Easytherm easytherm; - readonly Elde.ControlBoardDev controlBoard; + + readonly TBF.BenchControl.Modbus.Easytherm.Easytherm hotHeating; + readonly TBF.BenchControl.Modbus.Easytherm.Easytherm hotCooling; + readonly TBF.BenchControl.Modbus.Easytherm.Easytherm warmHeating; + readonly TBF.BenchControl.Modbus.Easytherm.Easytherm warmCooling; + readonly TBF.BenchControl.Modbus.Easytherm.Easytherm coldCooling; IList sequenceConditionNames; @@ -29,7 +34,7 @@ namespace TBF.BenchControl.Modbus.TankSelector /// /// Quido digital out board outputs assignment /// - private enum QuidoInputs + private enum QuidoOutputs { None = 0, SelectColdTank = 0x0001, @@ -60,8 +65,16 @@ namespace TBF.BenchControl.Modbus.TankSelector quidoRS = (TBF.BenchControl.Modbus.QuidoRS.QuidoRS)TbfComponents.FindComponent(cfg.ParentName, components); if (quidoRS == null) throw new Exception(string.Format("Cannot find parent '{0}' of the component {1}", cfg.ParentName, Name)); - controlBoard = (Elde.ControlBoardDev)TbfComponents.FindComponent(tankSelectorCfg.ControlBoard, components); - if (controlBoard == null) throw new Exception(string.Format("Cannot find control board '{0}' for the component {1}", tankSelectorCfg.ControlBoard, Name)); + hotHeating = (TBF.BenchControl.Modbus.Easytherm.Easytherm)TbfComponents.FindComponent(tankSelectorCfg.HotWaterHeating, components); + hotCooling = (TBF.BenchControl.Modbus.Easytherm.Easytherm)TbfComponents.FindComponent(tankSelectorCfg.HotWaterCooling, components); + warmHeating = (TBF.BenchControl.Modbus.Easytherm.Easytherm)TbfComponents.FindComponent(tankSelectorCfg.WarmWaterHeating, components); + warmCooling = (TBF.BenchControl.Modbus.Easytherm.Easytherm)TbfComponents.FindComponent(tankSelectorCfg.WarmWaterCooling, components); + coldCooling = (TBF.BenchControl.Modbus.Easytherm.Easytherm)TbfComponents.FindComponent(tankSelectorCfg.ColdWaterCooling, components); + if (hotHeating == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.HotWaterHeating)); + if (hotCooling == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.HotWaterCooling)); + if (warmHeating == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.WarmWaterHeating)); + if (warmCooling == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.WarmWaterCooling)); + if (coldCooling == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.ColdWaterCooling)); CreateConditions(true); diff --git a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfg.cs b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfg.cs index b7ac54acd..b45cd4b78 100644 --- a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfg.cs +++ b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfg.cs @@ -2,9 +2,8 @@ /// Copyright (c) 2017 Sensus Metering Systems /// using System; -using System.Collections.Generic; -using System.IO; using System.Xml.Serialization; +using Config.Entities; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Modbus.TankSelector @@ -16,14 +15,32 @@ namespace TBF.BenchControl.Modbus.TankSelector /// /// Serialized parameters /// - public string ControlBoard; + public string HotWaterHeating; /// Name of the component communicating with the temperature controller + public string HotWaterCooling; /// Name of the component communicating with the temperature controller + public string WarmWaterHeating; /// Name of the component communicating with the temperature controller + public string WarmWaterCooling; /// Name of the component communicating with the temperature controller + public string ColdWaterCooling; /// Name of the component communicating with the temperature controller + + + /// Procedure parameters + [XmlIgnore] + public ProcParams ProcParams; + public override IParamsProvider GetProcedureParams() { return ProcParams; } + public override IParamsProvider CreateProcedureParams(Procedure procedure) + { + ProcParams procParams = new ProcParams(); + procParams.UpdateProcedureParams(Name, procedure); + return procParams; + } + /// Private parameterless constructor invoked by all other (public) constructors TankSelectorCfg() { Name = "TankSelector"; ParentName = "QuidoRS"; - } + ProcParams = new ProcParams(); + } public TankSelectorCfg(IComponentFactory factory) : this() @@ -33,10 +50,14 @@ namespace TBF.BenchControl.Modbus.TankSelector public string ToString(int i) { - return string.Format("Name={0}, Parent={1}, CtrlBrd={2}", + return string.Format("Name={0}, DigOut={1}, Hot heating={2}, Hot cooling={3}, Warm heating={4}, Warm cooling={5}, Cold cooling={6}", Name, (string.IsNullOrEmpty(ParentName) ? "-" : ParentName), - (string.IsNullOrEmpty(ControlBoard) ? "-" : ControlBoard)); + (string.IsNullOrEmpty(HotWaterHeating) ? "-" : HotWaterHeating), + (string.IsNullOrEmpty(HotWaterCooling) ? "-" : HotWaterCooling), + (string.IsNullOrEmpty(WarmWaterHeating) ? "-" : WarmWaterHeating), + (string.IsNullOrEmpty(WarmWaterCooling) ? "-" : WarmWaterCooling), + (string.IsNullOrEmpty(ColdWaterCooling) ? "-" : ColdWaterCooling)); } } } diff --git a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.cs b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.cs index 94eca154e..0418b8d21 100644 --- a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.cs +++ b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.cs @@ -36,8 +36,12 @@ namespace TBF.BenchControl.Modbus.TankSelector { parent = ParentForm as ComponentParametersDlg; if (parent == null) return; - controlBoardComboBox.Items.Add("---"); - if (parent.TbfComponents != null) + hotHeatingComboBox.Items.Add("---"); + hotCoolingComboBox.Items.Add("---"); + warmHeatingComboBox.Items.Add("---"); + warmCoolingComboBox.Items.Add("---"); + coldCoolingComboBox.Items.Add("---"); + if (parent.TbfComponents != null) { foreach (var cmpnt in parent.TbfComponents) { @@ -45,10 +49,14 @@ namespace TBF.BenchControl.Modbus.TankSelector { parentNameComboBox.Items.Add(cmpnt.Name); } - if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory) + if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.Easytherm.Factory) { - controlBoardComboBox.Items.Add(cmpnt.Name); - } + hotHeatingComboBox.Items.Add(cmpnt.Name); + hotCoolingComboBox.Items.Add(cmpnt.Name); + warmHeatingComboBox.Items.Add(cmpnt.Name); + warmCoolingComboBox.Items.Add(cmpnt.Name); + coldCoolingComboBox.Items.Add(cmpnt.Name); + } } } @@ -66,39 +74,35 @@ namespace TBF.BenchControl.Modbus.TankSelector componentNameLabel.Text = config.Factory.ClassName; nameTextBox.Text = config.Name; parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName; - controlBoardComboBox.Text = string.IsNullOrEmpty(config.ControlBoard) ? "---" : config.ControlBoard; - modbusAddressTextBox.Text = "1"; - } + hotHeatingComboBox.Text = string.IsNullOrEmpty(config.HotWaterHeating) ? "---" : config.HotWaterHeating; + hotCoolingComboBox.Text = string.IsNullOrEmpty(config.HotWaterCooling) ? "---" : config.HotWaterCooling; + warmHeatingComboBox.Text = string.IsNullOrEmpty(config.WarmWaterHeating) ? "---" : config.WarmWaterHeating; + warmCoolingComboBox.Text = string.IsNullOrEmpty(config.WarmWaterCooling) ? "---" : config.WarmWaterCooling; + coldCoolingComboBox.Text = string.IsNullOrEmpty(config.ColdWaterCooling) ? "---" : config.ColdWaterCooling; + } public void Unlock() { nameTextBox.Enabled = true; parentNameComboBox.Enabled = true; - controlBoardComboBox.Enabled = true; - modbusAddressTextBox.Enabled = true; - } + hotHeatingComboBox.Enabled = true; + hotCoolingComboBox.Enabled = true; + warmHeatingComboBox.Enabled = true; + warmCoolingComboBox.Enabled = true; + coldCoolingComboBox.Enabled = true; + } public CfgUpdateFlags VerifyCfg(ref string message) { CfgUpdateFlags flags = CfgUpdateFlags.None; - int dummy; - if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text)) - { - flags |= CfgUpdateFlags.Error; - message += Environment.NewLine + "Invalid 'Parent name'"; - } - if (!controlBoardComboBox.Items.Contains(controlBoardComboBox.Text)) - { - flags |= CfgUpdateFlags.Error; - message += Environment.NewLine + "Invalid 'Control board'"; - } - if (!int.TryParse(modbusAddressTextBox.Text, out dummy) || dummy < 0 || dummy > 255) - { - flags |= CfgUpdateFlags.Error; - message += Environment.NewLine + "'Modbus Address' should be between 0 and 255"; - } - return flags; + if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text)) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "Invalid 'Parent name'"; } + if (!hotHeatingComboBox.Items.Contains(hotHeatingComboBox.Text)) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "Invalid 'Hot water heating'"; } + if (!hotCoolingComboBox.Items.Contains(hotCoolingComboBox.Text)) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "Invalid 'Hot water cooling'"; } + if (!warmHeatingComboBox.Items.Contains(warmHeatingComboBox.Text)) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "Invalid 'Warm water heating'"; } + if (!warmCoolingComboBox.Items.Contains(warmCoolingComboBox.Text)) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "Invalid 'Warm water cooling'"; } + if (!coldCoolingComboBox.Items.Contains(coldCoolingComboBox.Text)) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "Invalid 'Cold water cooling'"; } + return flags; } public CfgUpdateFlags UpdateCfg() @@ -109,19 +113,13 @@ namespace TBF.BenchControl.Modbus.TankSelector config.Name = nameTextBox.Text; config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text; - config.ControlBoard = controlBoardComboBox.Text.Equals("---") ? string.Empty : controlBoardComboBox.Text; + config.HotWaterHeating = hotHeatingComboBox.Text.Equals("---") ? string.Empty : hotHeatingComboBox.Text; + config.HotWaterCooling = hotCoolingComboBox.Text.Equals("---") ? string.Empty : hotCoolingComboBox.Text; + config.WarmWaterHeating = warmHeatingComboBox.Text.Equals("---") ? string.Empty : warmHeatingComboBox.Text; + config.WarmWaterCooling = warmCoolingComboBox.Text.Equals("---") ? string.Empty : warmCoolingComboBox.Text; + config.ColdWaterCooling = coldCoolingComboBox.Text.Equals("---") ? string.Empty : coldCoolingComboBox.Text; return flags; } - - private void modbusAddressLabel_Click(object sender, EventArgs e) - { - - } - - private void modbusAddressTextBox_TextChanged(object sender, EventArgs e) - { - - } } } diff --git a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.designer.cs b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.designer.cs index 007fc3c60..127c4e75c 100644 --- a/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.designer.cs +++ b/TestBenchFramework/BenchControl/Modbus/TankSelector/TankSelectorCfgCtrl.designer.cs @@ -31,116 +31,181 @@ namespace TBF.BenchControl.Modbus.TankSelector /// private void InitializeComponent() { - this.parentNameLabel = new System.Windows.Forms.Label(); - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.componentNameLabel = new System.Windows.Forms.Label(); - this.modbusAddressLabel = new System.Windows.Forms.Label(); - this.modbusAddressTextBox = new System.Windows.Forms.TextBox(); - this.parentNameComboBox = new System.Windows.Forms.ComboBox(); - this.controlBoardComboBox = new System.Windows.Forms.ComboBox(); - this.controlBoardLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // parentNameLabel - // - this.parentNameLabel.AutoSize = true; - this.parentNameLabel.Location = new System.Drawing.Point(28, 81); - this.parentNameLabel.Name = "parentNameLabel"; - this.parentNameLabel.Size = new System.Drawing.Size(67, 13); - this.parentNameLabel.TabIndex = 3; - this.parentNameLabel.Text = "Parent name"; - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(138, 52); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(130, 20); - this.nameTextBox.TabIndex = 2; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(28, 55); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 1; - this.nameLabel.Text = "Name"; - // - // componentNameLabel - // - this.componentNameLabel.AutoSize = true; - this.componentNameLabel.Location = new System.Drawing.Point(135, 28); - this.componentNameLabel.Name = "componentNameLabel"; - this.componentNameLabel.Size = new System.Drawing.Size(83, 13); - this.componentNameLabel.TabIndex = 0; - this.componentNameLabel.Text = "ComonentName"; - // - // modbusAddressLabel - // - this.modbusAddressLabel.AutoSize = true; - this.modbusAddressLabel.Location = new System.Drawing.Point(28, 135); - this.modbusAddressLabel.Name = "modbusAddressLabel"; - this.modbusAddressLabel.Size = new System.Drawing.Size(38, 13); - this.modbusAddressLabel.TabIndex = 7; - this.modbusAddressLabel.Text = "TODO"; - this.modbusAddressLabel.Click += new System.EventHandler(this.modbusAddressLabel_Click); - // - // modbusAddressTextBox - // - this.modbusAddressTextBox.Enabled = false; - this.modbusAddressTextBox.Location = new System.Drawing.Point(138, 132); - this.modbusAddressTextBox.Name = "modbusAddressTextBox"; - this.modbusAddressTextBox.Size = new System.Drawing.Size(46, 20); - this.modbusAddressTextBox.TabIndex = 8; - this.modbusAddressTextBox.TextChanged += new System.EventHandler(this.modbusAddressTextBox_TextChanged); - // - // parentNameComboBox - // - this.parentNameComboBox.Enabled = false; - this.parentNameComboBox.FormattingEnabled = true; - this.parentNameComboBox.Location = new System.Drawing.Point(138, 78); - this.parentNameComboBox.Name = "parentNameComboBox"; - this.parentNameComboBox.Size = new System.Drawing.Size(130, 21); - this.parentNameComboBox.TabIndex = 4; - // - // controlBoardComboBox - // - this.controlBoardComboBox.Enabled = false; - this.controlBoardComboBox.FormattingEnabled = true; - this.controlBoardComboBox.Location = new System.Drawing.Point(138, 105); - this.controlBoardComboBox.Name = "controlBoardComboBox"; - this.controlBoardComboBox.Size = new System.Drawing.Size(130, 21); - this.controlBoardComboBox.TabIndex = 6; - // - // controlBoardLabel - // - this.controlBoardLabel.AutoSize = true; - this.controlBoardLabel.Location = new System.Drawing.Point(28, 108); - this.controlBoardLabel.Name = "controlBoardLabel"; - this.controlBoardLabel.Size = new System.Drawing.Size(70, 13); - this.controlBoardLabel.TabIndex = 5; - this.controlBoardLabel.Text = "Control board"; - // - // TankSelectorCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.controlBoardComboBox); - this.Controls.Add(this.controlBoardLabel); - this.Controls.Add(this.parentNameComboBox); - this.Controls.Add(this.modbusAddressTextBox); - this.Controls.Add(this.modbusAddressLabel); - this.Controls.Add(this.parentNameLabel); - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.componentNameLabel); - this.Name = "TankSelectorCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); - this.Load += new System.EventHandler(this.TankSelectorCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); + this.parentNameLabel = new System.Windows.Forms.Label(); + this.nameTextBox = new System.Windows.Forms.TextBox(); + this.nameLabel = new System.Windows.Forms.Label(); + this.componentNameLabel = new System.Windows.Forms.Label(); + this.parentNameComboBox = new System.Windows.Forms.ComboBox(); + this.hotHeatingComboBox = new System.Windows.Forms.ComboBox(); + this.hotHeatingLabel = new System.Windows.Forms.Label(); + this.hotCoolingComboBox = new System.Windows.Forms.ComboBox(); + this.hotCoolingLabel = new System.Windows.Forms.Label(); + this.warmHeatingComboBox = new System.Windows.Forms.ComboBox(); + this.warmHeatingLabel = new System.Windows.Forms.Label(); + this.warmCoolingComboBox = new System.Windows.Forms.ComboBox(); + this.warmCoolingLabel = new System.Windows.Forms.Label(); + this.coldCoolingComboBox = new System.Windows.Forms.ComboBox(); + this.coldCoolingabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // parentNameLabel + // + this.parentNameLabel.AutoSize = true; + this.parentNameLabel.Location = new System.Drawing.Point(28, 81); + this.parentNameLabel.Name = "parentNameLabel"; + this.parentNameLabel.Size = new System.Drawing.Size(67, 13); + this.parentNameLabel.TabIndex = 3; + this.parentNameLabel.Text = "Parent name"; + // + // nameTextBox + // + this.nameTextBox.Enabled = false; + this.nameTextBox.Location = new System.Drawing.Point(138, 52); + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.Size = new System.Drawing.Size(173, 20); + this.nameTextBox.TabIndex = 2; + // + // nameLabel + // + this.nameLabel.AutoSize = true; + this.nameLabel.Location = new System.Drawing.Point(28, 55); + this.nameLabel.Name = "nameLabel"; + this.nameLabel.Size = new System.Drawing.Size(35, 13); + this.nameLabel.TabIndex = 1; + this.nameLabel.Text = "Name"; + // + // componentNameLabel + // + this.componentNameLabel.AutoSize = true; + this.componentNameLabel.Location = new System.Drawing.Point(135, 28); + this.componentNameLabel.Name = "componentNameLabel"; + this.componentNameLabel.Size = new System.Drawing.Size(83, 13); + this.componentNameLabel.TabIndex = 0; + this.componentNameLabel.Text = "ComonentName"; + // + // parentNameComboBox + // + this.parentNameComboBox.Enabled = false; + this.parentNameComboBox.FormattingEnabled = true; + this.parentNameComboBox.Location = new System.Drawing.Point(138, 78); + this.parentNameComboBox.Name = "parentNameComboBox"; + this.parentNameComboBox.Size = new System.Drawing.Size(173, 21); + this.parentNameComboBox.TabIndex = 4; + // + // controlBoardComboBox + // + this.hotHeatingComboBox.Enabled = false; + this.hotHeatingComboBox.FormattingEnabled = true; + this.hotHeatingComboBox.Location = new System.Drawing.Point(138, 105); + this.hotHeatingComboBox.Name = "controlBoardComboBox"; + this.hotHeatingComboBox.Size = new System.Drawing.Size(173, 21); + this.hotHeatingComboBox.TabIndex = 6; + // + // hotHeatingLabel + // + this.hotHeatingLabel.AutoSize = true; + this.hotHeatingLabel.Location = new System.Drawing.Point(28, 108); + this.hotHeatingLabel.Name = "hotHeatingLabel"; + this.hotHeatingLabel.Size = new System.Drawing.Size(91, 13); + this.hotHeatingLabel.TabIndex = 5; + this.hotHeatingLabel.Text = "Hot water heating"; + // + // comboBox1 + // + this.hotCoolingComboBox.Enabled = false; + this.hotCoolingComboBox.FormattingEnabled = true; + this.hotCoolingComboBox.Location = new System.Drawing.Point(138, 132); + this.hotCoolingComboBox.Name = "comboBox1"; + this.hotCoolingComboBox.Size = new System.Drawing.Size(173, 21); + this.hotCoolingComboBox.TabIndex = 8; + // + // hotCoolingLabel + // + this.hotCoolingLabel.AutoSize = true; + this.hotCoolingLabel.Location = new System.Drawing.Point(28, 135); + this.hotCoolingLabel.Name = "hotCoolingLabel"; + this.hotCoolingLabel.Size = new System.Drawing.Size(90, 13); + this.hotCoolingLabel.TabIndex = 7; + this.hotCoolingLabel.Text = "Hot water cooling"; + // + // comboBox2 + // + this.warmHeatingComboBox.Enabled = false; + this.warmHeatingComboBox.FormattingEnabled = true; + this.warmHeatingComboBox.Location = new System.Drawing.Point(138, 159); + this.warmHeatingComboBox.Name = "comboBox2"; + this.warmHeatingComboBox.Size = new System.Drawing.Size(173, 21); + this.warmHeatingComboBox.TabIndex = 10; + // + // warmHeatingLabel + // + this.warmHeatingLabel.AutoSize = true; + this.warmHeatingLabel.Location = new System.Drawing.Point(28, 162); + this.warmHeatingLabel.Name = "warmHeatingLabel"; + this.warmHeatingLabel.Size = new System.Drawing.Size(102, 13); + this.warmHeatingLabel.TabIndex = 9; + this.warmHeatingLabel.Text = "Warm water heating"; + // + // comboBox3 + // + this.warmCoolingComboBox.Enabled = false; + this.warmCoolingComboBox.FormattingEnabled = true; + this.warmCoolingComboBox.Location = new System.Drawing.Point(138, 186); + this.warmCoolingComboBox.Name = "comboBox3"; + this.warmCoolingComboBox.Size = new System.Drawing.Size(173, 21); + this.warmCoolingComboBox.TabIndex = 12; + // + // warmCoolingLabel + // + this.warmCoolingLabel.AutoSize = true; + this.warmCoolingLabel.Location = new System.Drawing.Point(28, 189); + this.warmCoolingLabel.Name = "warmCoolingLabel"; + this.warmCoolingLabel.Size = new System.Drawing.Size(101, 13); + this.warmCoolingLabel.TabIndex = 11; + this.warmCoolingLabel.Text = "Warm water cooling"; + // + // comboBox4 + // + this.coldCoolingComboBox.Enabled = false; + this.coldCoolingComboBox.FormattingEnabled = true; + this.coldCoolingComboBox.Location = new System.Drawing.Point(138, 213); + this.coldCoolingComboBox.Name = "comboBox4"; + this.coldCoolingComboBox.Size = new System.Drawing.Size(173, 21); + this.coldCoolingComboBox.TabIndex = 14; + // + // coldCoolingabel + // + this.coldCoolingabel.AutoSize = true; + this.coldCoolingabel.Location = new System.Drawing.Point(28, 216); + this.coldCoolingabel.Name = "coldCoolingabel"; + this.coldCoolingabel.Size = new System.Drawing.Size(94, 13); + this.coldCoolingabel.TabIndex = 13; + this.coldCoolingabel.Text = "Cold water cooling"; + // + // TankSelectorCfgCtrl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.coldCoolingComboBox); + this.Controls.Add(this.coldCoolingabel); + this.Controls.Add(this.warmCoolingComboBox); + this.Controls.Add(this.warmCoolingLabel); + this.Controls.Add(this.warmHeatingComboBox); + this.Controls.Add(this.warmHeatingLabel); + this.Controls.Add(this.hotCoolingComboBox); + this.Controls.Add(this.hotCoolingLabel); + this.Controls.Add(this.hotHeatingComboBox); + this.Controls.Add(this.hotHeatingLabel); + this.Controls.Add(this.parentNameComboBox); + this.Controls.Add(this.parentNameLabel); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(this.nameLabel); + this.Controls.Add(this.componentNameLabel); + this.Name = "TankSelectorCfgCtrl"; + this.Size = new System.Drawing.Size(368, 259); + this.Load += new System.EventHandler(this.TankSelectorCfgCtrl_Load); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -149,11 +214,17 @@ namespace TBF.BenchControl.Modbus.TankSelector private System.Windows.Forms.Label parentNameLabel; private System.Windows.Forms.TextBox nameTextBox; private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label componentNameLabel; - private System.Windows.Forms.Label modbusAddressLabel; - private System.Windows.Forms.TextBox modbusAddressTextBox; + private System.Windows.Forms.Label componentNameLabel; private System.Windows.Forms.ComboBox parentNameComboBox; - private System.Windows.Forms.ComboBox controlBoardComboBox; - private System.Windows.Forms.Label controlBoardLabel; + private System.Windows.Forms.ComboBox hotHeatingComboBox; + private System.Windows.Forms.Label hotHeatingLabel; + private System.Windows.Forms.ComboBox hotCoolingComboBox; + private System.Windows.Forms.Label hotCoolingLabel; + private System.Windows.Forms.ComboBox warmHeatingComboBox; + private System.Windows.Forms.Label warmHeatingLabel; + private System.Windows.Forms.ComboBox warmCoolingComboBox; + private System.Windows.Forms.Label warmCoolingLabel; + private System.Windows.Forms.ComboBox coldCoolingComboBox; + private System.Windows.Forms.Label coldCoolingabel; } } diff --git a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs index 982fcec47..d0de765e8 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs @@ -2,12 +2,9 @@ /// Copyright (c) 2013-2016 Sensus Metering Systems /// using System; -using System.Collections.Generic; -using System.IO; using System.Xml.Serialization; using Config.Entities; using TBF.BenchControl.Generic; -using TBF.Resources; namespace TBF.BenchControl.WaterMeters.WaterMeter { diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 20360018f..703b60c45 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.12.487.1")] -[assembly: AssemblyFileVersion("2.12.487.1")] +[assembly: AssemblyVersion("2.12.489.1")] +[assembly: AssemblyFileVersion("2.12.489.1")] diff --git a/TestBenchFramework/Resources/Strings.Designer.cs b/TestBenchFramework/Resources/Strings.Designer.cs index 168faa57a..a96a0f04f 100644 --- a/TestBenchFramework/Resources/Strings.Designer.cs +++ b/TestBenchFramework/Resources/Strings.Designer.cs @@ -3732,6 +3732,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T cold cooling. + /// + internal static string T_cold_cooling { + get { + return ResourceManager.GetString("T_cold_cooling", resourceCulture); + } + } + /// /// Looks up a localized string similar to T cold from. /// @@ -3768,6 +3777,24 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T hot cooling. + /// + internal static string T_hot_cooling { + get { + return ResourceManager.GetString("T_hot_cooling", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to T hot heating. + /// + internal static string T_hot_heating { + get { + return ResourceManager.GetString("T_hot_heating", resourceCulture); + } + } + /// /// Looks up a localized string similar to T in. /// @@ -3849,6 +3876,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T warm cooling. + /// + internal static string T_warm_cooling { + get { + return ResourceManager.GetString("T_warm_cooling", resourceCulture); + } + } + /// /// Looks up a localized string similar to T warm from. /// @@ -3858,6 +3894,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to T warm heating. + /// + internal static string T_warm_heating { + get { + return ResourceManager.GetString("T_warm_heating", resourceCulture); + } + } + /// /// Looks up a localized string similar to T warm to. /// diff --git a/TestBenchFramework/Resources/Strings.resx b/TestBenchFramework/Resources/Strings.resx index afddcec86..a56216bd1 100644 --- a/TestBenchFramework/Resources/Strings.resx +++ b/TestBenchFramework/Resources/Strings.resx @@ -1651,4 +1651,19 @@ Unselect WARM tank + + T cold cooling + + + T hot cooling + + + T hot heating + + + T warm cooling + + + T warm heating + \ No newline at end of file diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index 887e83b38..9f5c3eeb4 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -541,6 +541,7 @@ +