Qfrom, Qto removed from MetersPath, ver. 2.9.326
This commit is contained in:
@@ -11,8 +11,6 @@ namespace Config.Entities
|
|||||||
public virtual int Id { get; protected set; }
|
public virtual int Id { get; protected set; }
|
||||||
public virtual int ItemNr { get; set; }
|
public virtual int ItemNr { get; set; }
|
||||||
public virtual string Name { get; set; }
|
public virtual string Name { get; set; }
|
||||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
|
||||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
|
||||||
|
|
||||||
/// Sensors
|
/// Sensors
|
||||||
public virtual string Sensor1 { get; set; }
|
public virtual string Sensor1 { get; set; }
|
||||||
@@ -72,8 +70,6 @@ namespace Config.Entities
|
|||||||
public virtual MetersPath Clone(string name, int itemNr)
|
public virtual MetersPath Clone(string name, int itemNr)
|
||||||
{
|
{
|
||||||
MetersPath result = new MetersPath(name, itemNr);
|
MetersPath result = new MetersPath(name, itemNr);
|
||||||
result.Qfrom = Qfrom;
|
|
||||||
result.Qto = Qto;
|
|
||||||
result.Sensor1 = Sensor1;
|
result.Sensor1 = Sensor1;
|
||||||
result.Sensor2 = Sensor2;
|
result.Sensor2 = Sensor2;
|
||||||
result.Sensor3 = Sensor3;
|
result.Sensor3 = Sensor3;
|
||||||
|
|||||||
@@ -13,11 +13,10 @@ namespace Config.Mappings
|
|||||||
Id(x => x.Id);
|
Id(x => x.Id);
|
||||||
Map(x => x.ItemNr);
|
Map(x => x.ItemNr);
|
||||||
Map(x => x.Name);
|
Map(x => x.Name);
|
||||||
Map(x => x.Qfrom);
|
|
||||||
Map(x => x.Qto);
|
|
||||||
Map(x => x.Sensor1);
|
|
||||||
#pragma warning disable
|
#pragma warning disable
|
||||||
if (Config.Data.WMsCount >= 2) Map(x => x.Sensor2);
|
if (Config.Data.WMsCount >= 1) Map(x => x.Sensor1);
|
||||||
|
if (Config.Data.WMsCount >= 2) Map(x => x.Sensor2);
|
||||||
if (Config.Data.WMsCount >= 3) Map(x => x.Sensor3);
|
if (Config.Data.WMsCount >= 3) Map(x => x.Sensor3);
|
||||||
if (Config.Data.WMsCount >= 4) Map(x => x.Sensor4);
|
if (Config.Data.WMsCount >= 4) Map(x => x.Sensor4);
|
||||||
if (Config.Data.WMsCount >= 5) Map(x => x.Sensor5);
|
if (Config.Data.WMsCount >= 5) Map(x => x.Sensor5);
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.9.322.0")]
|
[assembly: AssemblyVersion("2.9.326.0")]
|
||||||
[assembly: AssemblyFileVersion("2.9.322.0")]
|
[assembly: AssemblyFileVersion("2.9.326.0")]
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.9.322.0")]
|
[assembly: AssemblyVersion("2.9.326.0")]
|
||||||
[assembly: AssemblyFileVersion("2.9.322.0")]
|
[assembly: AssemblyFileVersion("2.9.326.0")]
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ namespace TBF.BenchControl
|
|||||||
{
|
{
|
||||||
public int ItemNr;
|
public int ItemNr;
|
||||||
public string Name;
|
public string Name;
|
||||||
public float Qfrom;
|
|
||||||
public float Qto;
|
|
||||||
public IRegisterReader[] RegisterReaders;
|
public IRegisterReader[] RegisterReaders;
|
||||||
|
|
||||||
/// Constructor from name, the rest is empty
|
/// Constructor from name, the rest is empty
|
||||||
@@ -25,8 +23,6 @@ namespace TBF.BenchControl
|
|||||||
public MetersPath(Config.Entities.MetersPath entity, IList<BenchControl.Generic.IComponent> components)
|
public MetersPath(Config.Entities.MetersPath entity, IList<BenchControl.Generic.IComponent> components)
|
||||||
: this(entity.Name, entity.ItemNr)
|
: this(entity.Name, entity.ItemNr)
|
||||||
{
|
{
|
||||||
Qfrom = entity.Qfrom;
|
|
||||||
Qto = entity.Qto;
|
|
||||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||||
{
|
{
|
||||||
RegisterReaders[i] = (IRegisterReader)TbfComponents.FindComponent(entity.GetSensor(i), components);
|
RegisterReaders[i] = (IRegisterReader)TbfComponents.FindComponent(entity.GetSensor(i), components);
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.9.323.1")]
|
[assembly: AssemblyVersion("2.9.326.1")]
|
||||||
[assembly: AssemblyFileVersion("2.9.323.1")]
|
[assembly: AssemblyFileVersion("2.9.326.1")]
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ namespace TBF.UiControls
|
|||||||
enum Column
|
enum Column
|
||||||
{
|
{
|
||||||
Name,
|
Name,
|
||||||
Qfrom,
|
|
||||||
Qto,
|
|
||||||
FixedColumnsCount,
|
FixedColumnsCount,
|
||||||
}
|
}
|
||||||
readonly int fixedColumnsCount = (int)Column.FixedColumnsCount;
|
readonly int fixedColumnsCount = (int)Column.FixedColumnsCount;
|
||||||
@@ -58,8 +56,6 @@ namespace TBF.UiControls
|
|||||||
/// ListViewEx columns
|
/// ListViewEx columns
|
||||||
TBF.LocalSettings ls = Program.LocalSettings;
|
TBF.LocalSettings ls = Program.LocalSettings;
|
||||||
Columns.Add(Strings.Name, (ls.MetersColumnCount > 0) ? ls.MetersColumnWidths[0] : 60 * parent.Dpi / PathsDlg.Dpi100pct);
|
Columns.Add(Strings.Name, (ls.MetersColumnCount > 0) ? ls.MetersColumnWidths[0] : 60 * parent.Dpi / PathsDlg.Dpi100pct);
|
||||||
Columns.Add(Strings.Q_from_m3h, (ls.MetersColumnCount > 1) ? ls.MetersColumnWidths[1] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
|
|
||||||
Columns.Add(Strings.Q_to_m3h, (ls.MetersColumnCount > 2) ? ls.MetersColumnWidths[2] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
|
|
||||||
int clmn = (int)Column.FixedColumnsCount;
|
int clmn = (int)Column.FixedColumnsCount;
|
||||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||||
{
|
{
|
||||||
@@ -71,8 +67,6 @@ namespace TBF.UiControls
|
|||||||
editors = new Control[fixedColumnsCount + Config.Data.WMsCount];
|
editors = new Control[fixedColumnsCount + Config.Data.WMsCount];
|
||||||
///
|
///
|
||||||
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.Qto] = new TextBox(); /// Q_to
|
|
||||||
/// Prepare valve combo-boxes (max. 64 valves)
|
/// Prepare valve combo-boxes (max. 64 valves)
|
||||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||||
{
|
{
|
||||||
@@ -106,8 +100,6 @@ namespace TBF.UiControls
|
|||||||
BenchControl.MetersPath path = new BenchControl.MetersPath(entity, parent.TbfComponents);
|
BenchControl.MetersPath path = new BenchControl.MetersPath(entity, parent.TbfComponents);
|
||||||
|
|
||||||
ListViewItem lvi = new ListViewItem(entity.Name);
|
ListViewItem lvi = new ListViewItem(entity.Name);
|
||||||
lvi.SubItems.Add(path.Qfrom.ToString());
|
|
||||||
lvi.SubItems.Add(path.Qto.ToString());
|
|
||||||
|
|
||||||
for (int i = 0; i < Config.Data.WMsCount; i++)
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
||||||
{
|
{
|
||||||
@@ -132,14 +124,6 @@ namespace TBF.UiControls
|
|||||||
|
|
||||||
entity.Name = lvi.Text;
|
entity.Name = lvi.Text;
|
||||||
|
|
||||||
float Qfrom;
|
|
||||||
bool allOk = Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qfrom].Text, out Qfrom);
|
|
||||||
entity.Qfrom = Qfrom;
|
|
||||||
|
|
||||||
float Qto;
|
|
||||||
allOk &= Utils.TryParseUFloat(lvi.SubItems[(int)Column.Qto].Text, out Qto);
|
|
||||||
entity.Qto = Qto;
|
|
||||||
|
|
||||||
for (int j = 0; j < Config.Data.WMsCount; j++)
|
for (int j = 0; j < Config.Data.WMsCount; j++)
|
||||||
{
|
{
|
||||||
entity.SetSensor(j, lvi.SubItems[fixedColumnsCount + j].Text);
|
entity.SetSensor(j, lvi.SubItems[fixedColumnsCount + j].Text);
|
||||||
|
|||||||
Reference in New Issue
Block a user