- StartValve added to OutputPath
- bug fixed in MeterTestResultMap: 'EndState' was not mapped into the database
This commit is contained in:
@@ -11,6 +11,7 @@ namespace TBF.BenchControl
|
|||||||
public float Qto;
|
public float Qto;
|
||||||
public IRegulValve RegulValve;
|
public IRegulValve RegulValve;
|
||||||
public IFlowMeter FlowMeter;
|
public IFlowMeter FlowMeter;
|
||||||
|
public IValve StartValve;
|
||||||
public IDiverter Diverter;
|
public IDiverter Diverter;
|
||||||
public ITempMeter TempDiv;
|
public ITempMeter TempDiv;
|
||||||
public IBalance Balance;
|
public IBalance Balance;
|
||||||
@@ -35,6 +36,7 @@ namespace TBF.BenchControl
|
|||||||
Qto = entity.Qto;
|
Qto = entity.Qto;
|
||||||
RegulValve = (IRegulValve)TbfComponents.FindComponent(entity.RegulValve, components);
|
RegulValve = (IRegulValve)TbfComponents.FindComponent(entity.RegulValve, components);
|
||||||
FlowMeter = (IFlowMeter)TbfComponents.FindComponent(entity.FlowMeter, components);
|
FlowMeter = (IFlowMeter)TbfComponents.FindComponent(entity.FlowMeter, components);
|
||||||
|
StartValve = (IValve)TbfComponents.FindComponent(entity.StartValve, components);
|
||||||
Diverter = (IDiverter)TbfComponents.FindComponent(entity.Diverter, components);
|
Diverter = (IDiverter)TbfComponents.FindComponent(entity.Diverter, components);
|
||||||
TempDiv = (ITempMeter)TbfComponents.FindComponent(entity.TempDiv, components);
|
TempDiv = (ITempMeter)TbfComponents.FindComponent(entity.TempDiv, components);
|
||||||
Balance = (IBalance)TbfComponents.FindComponent(entity.Balance, components);
|
Balance = (IBalance)TbfComponents.FindComponent(entity.Balance, components);
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ namespace TBF.Entities
|
|||||||
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 RegulValve { get; set; }
|
public virtual string RegulValve { get; set; }
|
||||||
public virtual string FlowMeter { get; set; }
|
public virtual string FlowMeter { get; set; }
|
||||||
public virtual string Diverter { get; set; }
|
public virtual string StartValve { get; set; }
|
||||||
|
public virtual string Diverter { get; set; }
|
||||||
public virtual string TempDiv { get; set; }
|
public virtual string TempDiv { get; set; }
|
||||||
public virtual string Balance { get; set; }
|
public virtual string Balance { get; set; }
|
||||||
public virtual string EmptyTankValve { get; set; }
|
public virtual string EmptyTankValve { get; set; }
|
||||||
@@ -41,7 +42,8 @@ namespace TBF.Entities
|
|||||||
Qto = path.Qto;
|
Qto = path.Qto;
|
||||||
RegulValve = (path.RegulValve != null) ? path.RegulValve.Cfg.Name : null;
|
RegulValve = (path.RegulValve != null) ? path.RegulValve.Cfg.Name : null;
|
||||||
FlowMeter = (path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : null;
|
FlowMeter = (path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : null;
|
||||||
Diverter = (path.Diverter != null) ? path.Diverter.Cfg.Name : null;
|
StartValve = (path.StartValve != null) ? path.StartValve.Cfg.Name : null;
|
||||||
|
Diverter = (path.Diverter != null) ? path.Diverter.Cfg.Name : null;
|
||||||
TempDiv = (path.TempDiv != null) ? path.TempDiv.Cfg.Name : null;
|
TempDiv = (path.TempDiv != null) ? path.TempDiv.Cfg.Name : null;
|
||||||
Balance = (path.Balance != null) ? path.Balance.Cfg.Name : null;
|
Balance = (path.Balance != null) ? path.Balance.Cfg.Name : null;
|
||||||
EmptyTankValve = (path.EmptyTankValve != null) ? path.EmptyTankValve.Cfg.Name : null;
|
EmptyTankValve = (path.EmptyTankValve != null) ? path.EmptyTankValve.Cfg.Name : null;
|
||||||
@@ -72,6 +74,7 @@ namespace TBF.Entities
|
|||||||
result.Qto = Qto;
|
result.Qto = Qto;
|
||||||
result.RegulValve = RegulValve;
|
result.RegulValve = RegulValve;
|
||||||
result.FlowMeter = FlowMeter;
|
result.FlowMeter = FlowMeter;
|
||||||
|
result.StartValve = StartValve;
|
||||||
result.Diverter = Diverter;
|
result.Diverter = Diverter;
|
||||||
result.TempDiv = TempDiv;
|
result.TempDiv = TempDiv;
|
||||||
result.Balance = Balance;
|
result.Balance = Balance;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace TBF.Mappings
|
|||||||
Id(x => x.Id);
|
Id(x => x.Id);
|
||||||
References(x => x.TestResult);
|
References(x => x.TestResult);
|
||||||
Map(x => x.SerialNr);
|
Map(x => x.SerialNr);
|
||||||
|
Map(x => x.EndState);
|
||||||
Map(x => x.VolumeStart);
|
Map(x => x.VolumeStart);
|
||||||
Map(x => x.VolumeEnd);
|
Map(x => x.VolumeEnd);
|
||||||
Map(x => x.VolumeMeter);
|
Map(x => x.VolumeMeter);
|
||||||
|
|||||||
@@ -1617,6 +1617,15 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Start valve.
|
||||||
|
/// </summary>
|
||||||
|
internal static string StartValve {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("StartValve", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Stop the pump.
|
/// Looks up a localized string similar to Stop the pump.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -759,4 +759,7 @@
|
|||||||
<data name="Message" xml:space="preserve">
|
<data name="Message" xml:space="preserve">
|
||||||
<value>Meldung</value>
|
<value>Meldung</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StartValve" xml:space="preserve">
|
||||||
|
<value>Startventil</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -820,4 +820,7 @@
|
|||||||
<data name="Message" xml:space="preserve">
|
<data name="Message" xml:space="preserve">
|
||||||
<value>Message</value>
|
<value>Message</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StartValve" xml:space="preserve">
|
||||||
|
<value>Start valve</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -20,12 +20,13 @@ namespace TBF.UiControls
|
|||||||
Name,
|
Name,
|
||||||
Qfrom,
|
Qfrom,
|
||||||
Qto,
|
Qto,
|
||||||
RV,
|
RegulValve,
|
||||||
Ref,
|
Ref,
|
||||||
|
StartValve,
|
||||||
Div,
|
Div,
|
||||||
Tdiv,
|
Tdiv,
|
||||||
Scale,
|
Scale,
|
||||||
EmptV,
|
EmptyValve,
|
||||||
FixedColumnsCount,
|
FixedColumnsCount,
|
||||||
}
|
}
|
||||||
readonly int fixedColumnsCount = (int)Column.FixedColumnsCount;
|
readonly int fixedColumnsCount = (int)Column.FixedColumnsCount;
|
||||||
@@ -60,10 +61,11 @@ namespace TBF.UiControls
|
|||||||
Columns.Add(Strings.Q_to_m3h, (ls.OutputColumnCount > 2) ? ls.OutputColumnWidths[2] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.Q_to_m3h, (ls.OutputColumnCount > 2) ? ls.OutputColumnWidths[2] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.Reg_valve, (ls.OutputColumnCount > 3) ? ls.OutputColumnWidths[3] : 80 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.Reg_valve, (ls.OutputColumnCount > 3) ? ls.OutputColumnWidths[3] : 80 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.Reference, (ls.OutputColumnCount > 4) ? ls.OutputColumnWidths[4] : 85 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.Reference, (ls.OutputColumnCount > 4) ? ls.OutputColumnWidths[4] : 85 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.Diverter, (ls.OutputColumnCount > 5) ? ls.OutputColumnWidths[5] : 60 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.StartValve, (ls.OutputColumnCount > 5) ? ls.OutputColumnWidths[5] : 80 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.T_div, (ls.OutputColumnCount > 6) ? ls.OutputColumnWidths[6] : 70 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.Diverter, (ls.OutputColumnCount > 6) ? ls.OutputColumnWidths[6] : 60 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.Balance, (ls.OutputColumnCount > 7) ? ls.OutputColumnWidths[7] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.T_div, (ls.OutputColumnCount > 7) ? ls.OutputColumnWidths[7] : 70 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.Emptying_valve, (ls.OutputColumnCount > 8) ? ls.OutputColumnWidths[8] : 80 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.Balance, (ls.OutputColumnCount > 8) ? ls.OutputColumnWidths[8] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
|
Columns.Add(Strings.Emptying_valve, (ls.OutputColumnCount > 9) ? ls.OutputColumnWidths[9] : 80 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
int clmn = (int)Column.FixedColumnsCount;
|
int clmn = (int)Column.FixedColumnsCount;
|
||||||
foreach (var vlv in parent.Valves)
|
foreach (var vlv in parent.Valves)
|
||||||
{
|
{
|
||||||
@@ -77,18 +79,30 @@ namespace TBF.UiControls
|
|||||||
/// Prepare fixed columns combo boxes
|
/// Prepare fixed columns combo boxes
|
||||||
ComboBox regulValveComboBox = new ComboBox();
|
ComboBox regulValveComboBox = new ComboBox();
|
||||||
ComboBox flowMeterComboBox = new ComboBox();
|
ComboBox flowMeterComboBox = new ComboBox();
|
||||||
ComboBox diverterComboBox = new ComboBox();
|
ComboBox startValveComboBox = new ComboBox();
|
||||||
|
ComboBox diverterComboBox = new ComboBox();
|
||||||
ComboBox balanceComboBox = new ComboBox();
|
ComboBox balanceComboBox = new ComboBox();
|
||||||
ComboBox tempMeterDivComboBox = new ComboBox();
|
ComboBox tempMeterDivComboBox = new ComboBox();
|
||||||
ComboBox emptyValveComboBox = new ComboBox();
|
ComboBox emptyValveComboBox = new ComboBox();
|
||||||
foreach (var cmpnt in parent.TbfComponents)
|
regulValveComboBox.Items.Add("---");
|
||||||
|
flowMeterComboBox.Items.Add("---");
|
||||||
|
startValveComboBox.Items.Add("---");
|
||||||
|
diverterComboBox.Items.Add("---");
|
||||||
|
balanceComboBox.Items.Add("---");
|
||||||
|
tempMeterDivComboBox.Items.Add("---");
|
||||||
|
emptyValveComboBox.Items.Add("---");
|
||||||
|
foreach (var cmpnt in parent.TbfComponents)
|
||||||
{
|
{
|
||||||
if (cmpnt is IRegulValve) regulValveComboBox.Items.Add(cmpnt.Cfg.Name);
|
if (cmpnt is IRegulValve) regulValveComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
if (cmpnt is IFlowMeter) flowMeterComboBox.Items.Add(cmpnt.Cfg.Name);
|
if (cmpnt is IFlowMeter) flowMeterComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
if (cmpnt is IDiverter) diverterComboBox.Items.Add(cmpnt.Cfg.Name);
|
if (cmpnt is IDiverter) diverterComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
if (cmpnt is IBalance) balanceComboBox.Items.Add(cmpnt.Cfg.Name);
|
if (cmpnt is IBalance) balanceComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
if (cmpnt is ITempMeter) tempMeterDivComboBox.Items.Add(cmpnt.Cfg.Name);
|
if (cmpnt is ITempMeter) tempMeterDivComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
if (cmpnt is IValve && (cmpnt as IValve).CoupledTo == null) emptyValveComboBox.Items.Add(cmpnt.Cfg.Name);
|
if (cmpnt is IValve && (cmpnt as IValve).CoupledTo == null)
|
||||||
|
{
|
||||||
|
startValveComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
|
emptyValveComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editors = new Control[fixedColumnsCount + 64];
|
editors = new Control[fixedColumnsCount + 64];
|
||||||
@@ -96,12 +110,13 @@ namespace TBF.UiControls
|
|||||||
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.RV] = regulValveComboBox;
|
editors[(int)Column.RegulValve] = regulValveComboBox;
|
||||||
editors[(int)Column.Ref] = flowMeterComboBox;
|
editors[(int)Column.Ref] = flowMeterComboBox;
|
||||||
editors[(int)Column.Div] = diverterComboBox;
|
editors[(int)Column.StartValve] = startValveComboBox;
|
||||||
|
editors[(int)Column.Div] = diverterComboBox;
|
||||||
editors[(int)Column.Tdiv] = tempMeterDivComboBox;
|
editors[(int)Column.Tdiv] = tempMeterDivComboBox;
|
||||||
editors[(int)Column.Scale] = balanceComboBox;
|
editors[(int)Column.Scale] = balanceComboBox;
|
||||||
editors[(int)Column.EmptV] = emptyValveComboBox;
|
editors[(int)Column.EmptyValve] = emptyValveComboBox;
|
||||||
/// Prepare valve combo-boxes (max. 64 valves)
|
/// Prepare valve combo-boxes (max. 64 valves)
|
||||||
for (int i = 0; i < 64; i++)
|
for (int i = 0; i < 64; i++)
|
||||||
{
|
{
|
||||||
@@ -141,12 +156,13 @@ namespace TBF.UiControls
|
|||||||
ListViewItem lvi = new ListViewItem(entity.Name);
|
ListViewItem lvi = new ListViewItem(entity.Name);
|
||||||
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.RegulValve != null ? path.RegulValve.Cfg.Name : "---");
|
lvi.SubItems.Add((path.RegulValve != null) ? path.RegulValve.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.FlowMeter != null ? path.FlowMeter.Cfg.Name : "---");
|
lvi.SubItems.Add((path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.Diverter != null ? path.Diverter.Cfg.Name : "---");
|
lvi.SubItems.Add((path.StartValve != null) ? path.StartValve.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.TempDiv != null ? path.TempDiv.Cfg.Name : "---");
|
lvi.SubItems.Add((path.Diverter != null) ? path.Diverter.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.Balance != null ? path.Balance.Cfg.Name : "---");
|
lvi.SubItems.Add((path.TempDiv != null) ? path.TempDiv.Cfg.Name : "---");
|
||||||
lvi.SubItems.Add(path.EmptyTankValve != null ? path.EmptyTankValve.Cfg.Name : "---");
|
lvi.SubItems.Add((path.Balance != null) ? path.Balance.Cfg.Name : "---");
|
||||||
|
lvi.SubItems.Add((path.EmptyTankValve != null) ? path.EmptyTankValve.Cfg.Name : "---");
|
||||||
|
|
||||||
foreach (var valve in parent.Valves)
|
foreach (var valve in parent.Valves)
|
||||||
{
|
{
|
||||||
@@ -186,12 +202,13 @@ namespace TBF.UiControls
|
|||||||
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.RegulValve = lvi.SubItems[(int)Column.RV].Text;
|
entity.RegulValve = lvi.SubItems[(int)Column.RegulValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RegulValve].Text;
|
||||||
entity.FlowMeter = lvi.SubItems[(int)Column.Ref].Text;
|
entity.FlowMeter = lvi.SubItems[(int)Column.Ref].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Ref].Text;
|
||||||
entity.Diverter = lvi.SubItems[(int)Column.Div].Text;
|
entity.StartValve = lvi.SubItems[(int)Column.StartValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.StartValve].Text;
|
||||||
entity.TempDiv = lvi.SubItems[(int)Column.Tdiv].Text;
|
entity.Diverter = lvi.SubItems[(int)Column.Div].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Div].Text;
|
||||||
entity.Balance = lvi.SubItems[(int)Column.Scale].Text;
|
entity.TempDiv = lvi.SubItems[(int)Column.Tdiv].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Tdiv].Text;
|
||||||
entity.EmptyTankValve = lvi.SubItems[(int)Column.EmptV].Text;
|
entity.Balance = lvi.SubItems[(int)Column.Scale].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Scale].Text;
|
||||||
|
entity.EmptyTankValve = lvi.SubItems[(int)Column.EmptyValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.EmptyValve].Text;
|
||||||
|
|
||||||
string valvesOpen = string.Empty;
|
string valvesOpen = string.Empty;
|
||||||
string valvesClose = string.Empty;
|
string valvesClose = string.Empty;
|
||||||
|
|||||||
Reference in New Issue
Block a user