Paths : Selector : UI changes, Selector not mapped to the config DB yet.
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Config.Entities
|
|||||||
public virtual string OriName { get; set; } /// Not mapped to database
|
public virtual string OriName { get; set; } /// Not mapped to database
|
||||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
||||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
||||||
|
public virtual string Selector { get; set; }
|
||||||
public virtual string TempMtrUp { get; set; }
|
public virtual string TempMtrUp { get; set; }
|
||||||
public virtual string TempMtrDown { get; set; }
|
public virtual string TempMtrDown { get; set; }
|
||||||
public virtual string PressMtrUp { get; set; }
|
public virtual string PressMtrUp { get; set; }
|
||||||
@@ -46,7 +47,8 @@ namespace Config.Entities
|
|||||||
|
|
||||||
result.Qfrom = Qfrom;
|
result.Qfrom = Qfrom;
|
||||||
result.Qto = Qto;
|
result.Qto = Qto;
|
||||||
result.TempMtrUp = TempMtrUp;
|
result.Selector = Selector;
|
||||||
|
result.TempMtrUp = TempMtrUp;
|
||||||
result.TempMtrDown = TempMtrDown;
|
result.TempMtrDown = TempMtrDown;
|
||||||
result.PressMtrUp = PressMtrUp;
|
result.PressMtrUp = PressMtrUp;
|
||||||
result.PressMtrDown = PressMtrDown;
|
result.PressMtrDown = PressMtrDown;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace Config.Entities
|
|||||||
public virtual string OriName { get; set; } /// Not mapped to database
|
public virtual string OriName { get; set; } /// Not mapped to database
|
||||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
||||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
||||||
|
public virtual string Selector { get; set; }
|
||||||
public virtual string Pump { get; set; }
|
public virtual string Pump { get; set; }
|
||||||
public virtual string RegulValvesPct { get; set; } /// Positions of regulation valves in % separated by ';'
|
public virtual string RegulValvesPct { get; set; } /// Positions of regulation valves in % separated by ';'
|
||||||
|
|
||||||
@@ -40,12 +41,14 @@ namespace Config.Entities
|
|||||||
{
|
{
|
||||||
FeedingPath result = new FeedingPath(name, itemNr);
|
FeedingPath result = new FeedingPath(name, itemNr);
|
||||||
|
|
||||||
result.Qfrom = Qfrom;
|
result.Qfrom = Qfrom;
|
||||||
result.Qto = Qto;
|
result.Qto = Qto;
|
||||||
result.Pump = Pump;
|
result.Selector = Selector;
|
||||||
|
result.Pump = Pump;
|
||||||
result.RegulValvesPct = RegulValvesPct;
|
result.RegulValvesPct = RegulValvesPct;
|
||||||
result.ValvesOpen = ValvesOpen;
|
result.ValvesOpen = ValvesOpen;
|
||||||
result.ValvesClose = ValvesClose;
|
result.ValvesClose = ValvesClose;
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace Config.Entities
|
|||||||
public virtual string OriName { get; set; } /// Not mapped to database
|
public virtual string OriName { get; set; } /// Not mapped to database
|
||||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
||||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
||||||
|
public virtual string Selector { get; set; }
|
||||||
public virtual string RegulValve { get; set; }
|
public virtual string RegulValve { get; set; }
|
||||||
public virtual string FlowMeter { get; set; }
|
public virtual string FlowMeter { get; set; }
|
||||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||||
@@ -46,18 +47,19 @@ namespace Config.Entities
|
|||||||
{
|
{
|
||||||
OutputPath result = new OutputPath(name, itemNr);
|
OutputPath result = new OutputPath(name, itemNr);
|
||||||
|
|
||||||
result.Name = Name;
|
result.Name = Name;
|
||||||
result.Qfrom = Qfrom;
|
result.Qfrom = Qfrom;
|
||||||
result.Qto = Qto;
|
result.Qto = Qto;
|
||||||
result.RegulValve = RegulValve;
|
result.Selector = Selector;
|
||||||
result.FlowMeter = FlowMeter;
|
result.RegulValve = RegulValve;
|
||||||
result.PidCoef = PidCoef;
|
result.FlowMeter = FlowMeter;
|
||||||
result.StartValve = StartValve;
|
result.PidCoef = PidCoef;
|
||||||
result.Diverter = Diverter;
|
result.StartValve = StartValve;
|
||||||
result.TempDiv = TempDiv;
|
result.Diverter = Diverter;
|
||||||
result.Scale = Scale;
|
result.TempDiv = TempDiv;
|
||||||
|
result.Scale = Scale;
|
||||||
result.RegulValvesPct = RegulValvesPct;
|
result.RegulValvesPct = RegulValvesPct;
|
||||||
result.ValvesOpen = ValvesOpen;
|
result.ValvesOpen = ValvesOpen;
|
||||||
result.ValvesClose = ValvesClose;
|
result.ValvesClose = ValvesClose;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace TBF.BenchControl
|
|||||||
public string Name;
|
public string Name;
|
||||||
public float Qfrom;
|
public float Qfrom;
|
||||||
public float Qto;
|
public float Qto;
|
||||||
|
public string Selector;
|
||||||
public ITempMeter TempMtrUp;
|
public ITempMeter TempMtrUp;
|
||||||
public ITempMeter TempMtrDown;
|
public ITempMeter TempMtrDown;
|
||||||
public IPressureMeter PressMtrUp;
|
public IPressureMeter PressMtrUp;
|
||||||
@@ -36,6 +37,7 @@ namespace TBF.BenchControl
|
|||||||
{
|
{
|
||||||
Qfrom = entity.Qfrom;
|
Qfrom = entity.Qfrom;
|
||||||
Qto = entity.Qto;
|
Qto = entity.Qto;
|
||||||
|
Selector = entity.Selector;
|
||||||
TempMtrUp = TbfComponents.FindComponent(entity.TempMtrUp, components) as ITempMeter;
|
TempMtrUp = TbfComponents.FindComponent(entity.TempMtrUp, components) as ITempMeter;
|
||||||
TempMtrDown = TbfComponents.FindComponent(entity.TempMtrDown, components) as ITempMeter;
|
TempMtrDown = TbfComponents.FindComponent(entity.TempMtrDown, components) as ITempMeter;
|
||||||
PressMtrUp = TbfComponents.FindComponent(entity.PressMtrUp, components) as IPressureMeter;
|
PressMtrUp = TbfComponents.FindComponent(entity.PressMtrUp, components) as IPressureMeter;
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ namespace TBF.BenchControl
|
|||||||
public string Name;
|
public string Name;
|
||||||
public float Qfrom;
|
public float Qfrom;
|
||||||
public float Qto;
|
public float Qto;
|
||||||
public IValve Pump; /// pump to use with this path or null
|
public string Selector;
|
||||||
|
public IValve Pump; /// pump to use with this path or null
|
||||||
public IList<IRegulValve> RegulValves;
|
public IList<IRegulValve> RegulValves;
|
||||||
public IList<float> RegulValvesPct;
|
public IList<float> RegulValvesPct;
|
||||||
public IList<IValve> ValvesOpen; /// a list of valves to open or null
|
public IList<IValve> ValvesOpen; /// a list of valves to open or null
|
||||||
@@ -35,7 +36,8 @@ namespace TBF.BenchControl
|
|||||||
{
|
{
|
||||||
Qfrom = entity.Qfrom;
|
Qfrom = entity.Qfrom;
|
||||||
Qto = entity.Qto;
|
Qto = entity.Qto;
|
||||||
Pump = (IValve)TbfComponents.FindComponent(entity.Pump, components);
|
Selector = entity.Selector;
|
||||||
|
Pump = (IValve)TbfComponents.FindComponent(entity.Pump, components);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Feeding regulation valve components
|
/// Feeding regulation valve components
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace TBF.BenchControl
|
|||||||
public string Name;
|
public string Name;
|
||||||
public float Qfrom;
|
public float Qfrom;
|
||||||
public float Qto;
|
public float Qto;
|
||||||
|
public string Selector;
|
||||||
public IFlowMeter FlowMeter;
|
public IFlowMeter FlowMeter;
|
||||||
public IRegulValve RegulValve;
|
public IRegulValve RegulValve;
|
||||||
public float PidCoef;
|
public float PidCoef;
|
||||||
@@ -45,6 +46,7 @@ namespace TBF.BenchControl
|
|||||||
{
|
{
|
||||||
Qfrom = entity.Qfrom;
|
Qfrom = entity.Qfrom;
|
||||||
Qto = entity.Qto;
|
Qto = entity.Qto;
|
||||||
|
Selector = entity.Selector;
|
||||||
FlowMeter = (IFlowMeter)TbfComponents.FindComponent(entity.FlowMeter, components);
|
FlowMeter = (IFlowMeter)TbfComponents.FindComponent(entity.FlowMeter, components);
|
||||||
RegulValve = (IRegulValve)TbfComponents.FindComponent(entity.RegulValve, components);
|
RegulValve = (IRegulValve)TbfComponents.FindComponent(entity.RegulValve, components);
|
||||||
PidCoef = entity.PidCoef;
|
PidCoef = entity.PidCoef;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2013-2017 Sensus Slovensko a.s.
|
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||||
///
|
///
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -28,6 +28,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
Name,
|
Name,
|
||||||
Qfrom,
|
Qfrom,
|
||||||
Qto,
|
Qto,
|
||||||
|
Selector,
|
||||||
Tup,
|
Tup,
|
||||||
Tdown,
|
Tdown,
|
||||||
Pup,
|
Pup,
|
||||||
@@ -67,8 +68,9 @@ namespace TBF.UI.Bench.Paths
|
|||||||
/// ListViewEx columns
|
/// ListViewEx columns
|
||||||
TBF.LocalSettings ls = Program.LocalSettings;
|
TBF.LocalSettings ls = Program.LocalSettings;
|
||||||
Columns.Add(Strings.Name, (ls.BenchColumnCount > 0) ? ls.BenchColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.Name, (ls.BenchColumnCount > 0) ? ls.BenchColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), (ls.BenchColumnCount > 1) ? ls.BenchColumnWidths[1] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), (ls.BenchColumnCount > 1) ? ls.BenchColumnWidths[1] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), (ls.BenchColumnCount > 2) ? ls.BenchColumnWidths[2] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), (ls.BenchColumnCount > 2) ? ls.BenchColumnWidths[2] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
|
Columns.Add("Selector", (ls.BenchColumnCount > 0) ? ls.BenchColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.T_in, (ls.BenchColumnCount > 3) ? ls.BenchColumnWidths[3] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.T_in, (ls.BenchColumnCount > 3) ? ls.BenchColumnWidths[3] : 50 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.T_out, (ls.BenchColumnCount > 4) ? ls.BenchColumnWidths[4] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.T_out, (ls.BenchColumnCount > 4) ? ls.BenchColumnWidths[4] : 50 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.P_in, (ls.BenchColumnCount > 5) ? ls.BenchColumnWidths[5] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.P_in, (ls.BenchColumnCount > 5) ? ls.BenchColumnWidths[5] : 50 * parent.Dpi / Constants.Dpi100pct);
|
||||||
@@ -117,7 +119,8 @@ namespace TBF.UI.Bench.Paths
|
|||||||
editors[(int)Column.Name] = new TextBox(); /// Name
|
editors[(int)Column.Name] = new TextBox(); /// Name
|
||||||
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
|
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
|
||||||
editors[(int)Column.Qto] = new TextBox(); /// Q_to
|
editors[(int)Column.Qto] = new TextBox(); /// Q_to
|
||||||
editors[(int)Column.Tup] = tUpCBox;
|
editors[(int)Column.Selector] = new TextBox(); /// Selector
|
||||||
|
editors[(int)Column.Tup] = tUpCBox;
|
||||||
editors[(int)Column.Tdown] = tDownCBox;
|
editors[(int)Column.Tdown] = tDownCBox;
|
||||||
editors[(int)Column.Pup] = prUpCBox;
|
editors[(int)Column.Pup] = prUpCBox;
|
||||||
editors[(int)Column.Pdown] = prDownCBox;
|
editors[(int)Column.Pdown] = prDownCBox;
|
||||||
@@ -198,7 +201,8 @@ namespace TBF.UI.Bench.Paths
|
|||||||
|
|
||||||
lvi.SubItems.Add(path.Qfrom.ToString());
|
lvi.SubItems.Add(path.Qfrom.ToString());
|
||||||
lvi.SubItems.Add(path.Qto.ToString());
|
lvi.SubItems.Add(path.Qto.ToString());
|
||||||
lvi.SubItems.Add(path.TempMtrUp != null ? path.TempMtrUp.Cfg.Name : "---");
|
lvi.SubItems.Add(path.Selector);
|
||||||
|
lvi.SubItems.Add(path.TempMtrUp != null ? path.TempMtrUp.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.TempMtrDown != null ? path.TempMtrDown.Cfg.Name : "---");
|
lvi.SubItems.Add(path.TempMtrDown != null ? path.TempMtrDown.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.PressMtrUp != null ? path.PressMtrUp.Cfg.Name : "---");
|
lvi.SubItems.Add(path.PressMtrUp != null ? path.PressMtrUp.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.PressMtrDown != null ? path.PressMtrDown.Cfg.Name : "---");
|
lvi.SubItems.Add(path.PressMtrDown != null ? path.PressMtrDown.Cfg.Name : "---");
|
||||||
@@ -246,6 +250,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
||||||
entity.Qto = Qto;
|
entity.Qto = Qto;
|
||||||
|
|
||||||
|
entity.Selector = lvi.SubItems[(int)Column.Selector].Text;
|
||||||
entity.TempMtrUp = lvi.SubItems[(int)Column.Tup].Text;
|
entity.TempMtrUp = lvi.SubItems[(int)Column.Tup].Text;
|
||||||
entity.TempMtrDown = lvi.SubItems[(int)Column.Tdown].Text;
|
entity.TempMtrDown = lvi.SubItems[(int)Column.Tdown].Text;
|
||||||
entity.PressMtrUp = lvi.SubItems[(int)Column.Pup].Text;
|
entity.PressMtrUp = lvi.SubItems[(int)Column.Pup].Text;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2013-2017 Sensus Slovensko a.s.
|
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||||
///
|
///
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -27,6 +27,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
Name,
|
Name,
|
||||||
Qfrom,
|
Qfrom,
|
||||||
Qto,
|
Qto,
|
||||||
|
Selector,
|
||||||
Pump,
|
Pump,
|
||||||
FixedColumnsCount,
|
FixedColumnsCount,
|
||||||
}
|
}
|
||||||
@@ -63,8 +64,9 @@ namespace TBF.UI.Bench.Paths
|
|||||||
/// ListViewEx columns
|
/// ListViewEx columns
|
||||||
TBF.LocalSettings ls = Program.LocalSettings;
|
TBF.LocalSettings ls = Program.LocalSettings;
|
||||||
Columns.Add(Strings.Name, (ls.FeedingColumnCount > 0) ? ls.FeedingColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.Name, (ls.FeedingColumnCount > 0) ? ls.FeedingColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), (ls.FeedingColumnCount > 1) ? ls.FeedingColumnWidths[1] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), (ls.FeedingColumnCount > 1) ? ls.FeedingColumnWidths[1] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), (ls.FeedingColumnCount > 2) ? ls.FeedingColumnWidths[2] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), (ls.FeedingColumnCount > 2) ? ls.FeedingColumnWidths[2] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
|
Columns.Add("Selector", (ls.FeedingColumnCount > 0) ? ls.FeedingColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.Pump, (ls.FeedingColumnCount > 3) ? ls.FeedingColumnWidths[3] : 60 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.Pump, (ls.FeedingColumnCount > 3) ? ls.FeedingColumnWidths[3] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
int clmn = (int)Column.FixedColumnsCount;
|
int clmn = (int)Column.FixedColumnsCount;
|
||||||
|
|
||||||
@@ -98,7 +100,8 @@ namespace TBF.UI.Bench.Paths
|
|||||||
editors[(int)Column.Name] = new TextBox(); /// Name
|
editors[(int)Column.Name] = new TextBox(); /// Name
|
||||||
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
|
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
|
||||||
editors[(int)Column.Qto] = new TextBox(); /// Q_to
|
editors[(int)Column.Qto] = new TextBox(); /// Q_to
|
||||||
editors[(int)Column.Pump] = pumpCBox;
|
editors[(int)Column.Selector] = new TextBox(); /// Selector
|
||||||
|
editors[(int)Column.Pump] = pumpCBox;
|
||||||
for (int i = 0; i < regvCount; i++)
|
for (int i = 0; i < regvCount; i++)
|
||||||
{
|
{
|
||||||
ComboBox cb = new ComboBox();
|
ComboBox cb = new ComboBox();
|
||||||
@@ -186,6 +189,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
|
|
||||||
lvi.SubItems.Add(path.Qfrom.ToString());
|
lvi.SubItems.Add(path.Qfrom.ToString());
|
||||||
lvi.SubItems.Add(path.Qto.ToString());
|
lvi.SubItems.Add(path.Qto.ToString());
|
||||||
|
lvi.SubItems.Add(path.Selector);
|
||||||
lvi.SubItems.Add(path.Pump != null ? path.Pump.Cfg.Name : "---");
|
lvi.SubItems.Add(path.Pump != null ? path.Pump.Cfg.Name : "---");
|
||||||
|
|
||||||
string[] rvPosStr = (entity.RegulValvesPct != null) ? entity.RegulValvesPct.Split(new char[] {';'})
|
string[] rvPosStr = (entity.RegulValvesPct != null) ? entity.RegulValvesPct.Split(new char[] {';'})
|
||||||
@@ -236,7 +240,9 @@ namespace TBF.UI.Bench.Paths
|
|||||||
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
||||||
entity.Qto = Qto;
|
entity.Qto = Qto;
|
||||||
|
|
||||||
ComboBox pumpCB = editors[(int)Column.Pump] as ComboBox;
|
entity.Selector = lvi.SubItems[(int)Column.Selector].Text;
|
||||||
|
|
||||||
|
ComboBox pumpCB = editors[(int)Column.Pump] as ComboBox;
|
||||||
if (pumpCB.Items.Contains(lvi.SubItems[(int)Column.Pump].Text))
|
if (pumpCB.Items.Contains(lvi.SubItems[(int)Column.Pump].Text))
|
||||||
{
|
{
|
||||||
entity.Pump = lvi.SubItems[(int)Column.Pump].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)Column.Pump].Text;
|
entity.Pump = lvi.SubItems[(int)Column.Pump].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)Column.Pump].Text;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||||
///
|
///
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -28,6 +28,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
Name,
|
Name,
|
||||||
Qfrom,
|
Qfrom,
|
||||||
Qto,
|
Qto,
|
||||||
|
Selector,
|
||||||
RefFlowmtr,
|
RefFlowmtr,
|
||||||
RegulValve,
|
RegulValve,
|
||||||
PidCoef,
|
PidCoef,
|
||||||
@@ -78,8 +79,9 @@ namespace TBF.UI.Bench.Paths
|
|||||||
/// ListViewEx columns
|
/// ListViewEx columns
|
||||||
TBF.LocalSettings ls = Program.LocalSettings;
|
TBF.LocalSettings ls = Program.LocalSettings;
|
||||||
Columns.Add(Strings.Name, (ls.OutputColumnCount > 0) ? ls.OutputColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.Name, (ls.OutputColumnCount > 0) ? ls.OutputColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), (ls.OutputColumnCount > 1) ? ls.OutputColumnWidths[1] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), (ls.OutputColumnCount > 1) ? ls.OutputColumnWidths[1] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), (ls.OutputColumnCount > 2) ? ls.OutputColumnWidths[2] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), (ls.OutputColumnCount > 2) ? ls.OutputColumnWidths[2] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
|
Columns.Add("Selector", (ls.OutputColumnCount > 0) ? ls.OutputColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.Flowmeter, (ls.OutputColumnCount > 3) ? ls.OutputColumnWidths[3] : 85 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.Flowmeter, (ls.OutputColumnCount > 3) ? ls.OutputColumnWidths[3] : 85 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.Reg_valve, (ls.OutputColumnCount > 4) ? ls.OutputColumnWidths[4] : 80 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.Reg_valve, (ls.OutputColumnCount > 4) ? ls.OutputColumnWidths[4] : 80 * parent.Dpi / Constants.Dpi100pct);
|
||||||
Columns.Add(Strings.PID, (ls.OutputColumnCount > 5) ? ls.OutputColumnWidths[5] : 50 * parent.Dpi / Constants.Dpi100pct);
|
Columns.Add(Strings.PID, (ls.OutputColumnCount > 5) ? ls.OutputColumnWidths[5] : 50 * parent.Dpi / Constants.Dpi100pct);
|
||||||
@@ -163,7 +165,8 @@ namespace TBF.UI.Bench.Paths
|
|||||||
editors[(int)Column.Name] = new TextBox(); /// Name
|
editors[(int)Column.Name] = new TextBox(); /// Name
|
||||||
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
|
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
|
||||||
editors[(int)Column.Qto] = new TextBox(); /// Q_to
|
editors[(int)Column.Qto] = new TextBox(); /// Q_to
|
||||||
editors[(int)Column.RefFlowmtr] = flowMeterComboBox;
|
editors[(int)Column.Selector] = new TextBox(); /// Selector
|
||||||
|
editors[(int)Column.RefFlowmtr] = flowMeterComboBox;
|
||||||
editors[(int)Column.RegulValve] = regulValveComboBox;
|
editors[(int)Column.RegulValve] = regulValveComboBox;
|
||||||
editors[(int)Column.PidCoef] = new TextBox(); /// PID
|
editors[(int)Column.PidCoef] = new TextBox(); /// PID
|
||||||
editors[(int)Column.Div] = diverterComboBox;
|
editors[(int)Column.Div] = diverterComboBox;
|
||||||
@@ -268,6 +271,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
|
|
||||||
lvi.SubItems.Add(path.Qfrom.ToString());
|
lvi.SubItems.Add(path.Qfrom.ToString());
|
||||||
lvi.SubItems.Add(path.Qto.ToString());
|
lvi.SubItems.Add(path.Qto.ToString());
|
||||||
|
lvi.SubItems.Add(path.Selector);
|
||||||
lvi.SubItems.Add((path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : "---");
|
lvi.SubItems.Add((path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add((path.RegulValve != null) ? path.RegulValve.Cfg.Name : "---");
|
lvi.SubItems.Add((path.RegulValve != null) ? path.RegulValve.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.PidCoef.ToString("F1"));
|
lvi.SubItems.Add(path.PidCoef.ToString("F1"));
|
||||||
@@ -343,6 +347,7 @@ namespace TBF.UI.Bench.Paths
|
|||||||
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
||||||
entity.Qto = Qto;
|
entity.Qto = Qto;
|
||||||
|
|
||||||
|
entity.Selector = lvi.SubItems[(int)Column.Selector].Text;
|
||||||
entity.FlowMeter = lvi.SubItems[(int)Column.RefFlowmtr].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RefFlowmtr].Text;
|
entity.FlowMeter = lvi.SubItems[(int)Column.RefFlowmtr].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RefFlowmtr].Text;
|
||||||
entity.RegulValve = lvi.SubItems[(int)Column.RegulValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RegulValve].Text;
|
entity.RegulValve = lvi.SubItems[(int)Column.RegulValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RegulValve].Text;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user