ValveCategory.All removed, cleanup, SequenceBase improvement.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -19,7 +19,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public ValveCategory Category; /// Feeding, Output or All
|
||||
public ValveCategory Category; /// Feeding, Output or None
|
||||
public string RegulValveName; /// Name of the regulation valve used to control the flow
|
||||
public string FixedRVName; /// Name of the regulation valve with a fixed position
|
||||
public float FixedRVPosition; /// Fixed RV position 0 .. 100 in [%]
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
}
|
||||
}
|
||||
|
||||
categoryComboBox.Items.Add(ValveCategory.All.ToString());
|
||||
categoryComboBox.Items.Add(ValveCategory.Feeding.ToString());
|
||||
categoryComboBox.Items.Add(ValveCategory.Output.ToString());
|
||||
categoryComboBox.Items.Add(ValveCategory.None.ToString());
|
||||
|
||||
Redraw();
|
||||
}
|
||||
@@ -87,9 +87,9 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if (!categoryComboBox.Text.Equals(ValveCategory.All.ToString()) &&
|
||||
!categoryComboBox.Text.Equals(ValveCategory.Feeding.ToString()) &&
|
||||
!categoryComboBox.Text.Equals(ValveCategory.Output.ToString()))
|
||||
if (!categoryComboBox.Text.Equals(ValveCategory.Feeding.ToString()) &&
|
||||
!categoryComboBox.Text.Equals(ValveCategory.Output.ToString()) &&
|
||||
!categoryComboBox.Text.Equals(ValveCategory.None.ToString()))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid 'Category'";
|
||||
@@ -136,11 +136,10 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
}
|
||||
|
||||
ValveCategory newCategory;
|
||||
if (categoryComboBox.Text.Equals(ValveCategory.All.ToString())) newCategory = ValveCategory.All;
|
||||
else if (categoryComboBox.Text.Equals(ValveCategory.Feeding.ToString())) newCategory = ValveCategory.Feeding;
|
||||
else if (categoryComboBox.Text.Equals(ValveCategory.Bench.ToString())) newCategory = ValveCategory.Bench;
|
||||
else if (categoryComboBox.Text.Equals(ValveCategory.Output.ToString())) newCategory = ValveCategory.Output;
|
||||
else newCategory = ValveCategory.None;
|
||||
if (categoryComboBox.Text.Equals(ValveCategory.Feeding.ToString())) newCategory = ValveCategory.Feeding;
|
||||
else if (categoryComboBox.Text.Equals(ValveCategory.Output.ToString())) newCategory = ValveCategory.Output;
|
||||
else newCategory = ValveCategory.None;
|
||||
|
||||
if (newCategory != config.Category)
|
||||
{
|
||||
config.Category = newCategory;
|
||||
|
||||
Reference in New Issue
Block a user