Qfrom, Qto removed from MetersPath, ver. 2.9.326

This commit is contained in:
Milan Hanajik 2016-07-11 10:20:50 +02:00
parent fd69bc6376
commit 4794e73994
7 changed files with 9 additions and 34 deletions

View File

@ -11,8 +11,6 @@ namespace Config.Entities
public virtual int Id { get; protected set; }
public virtual int ItemNr { 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
public virtual string Sensor1 { get; set; }
@ -72,8 +70,6 @@ namespace Config.Entities
public virtual MetersPath Clone(string name, int itemNr)
{
MetersPath result = new MetersPath(name, itemNr);
result.Qfrom = Qfrom;
result.Qto = Qto;
result.Sensor1 = Sensor1;
result.Sensor2 = Sensor2;
result.Sensor3 = Sensor3;

View File

@ -13,11 +13,10 @@ namespace Config.Mappings
Id(x => x.Id);
Map(x => x.ItemNr);
Map(x => x.Name);
Map(x => x.Qfrom);
Map(x => x.Qto);
Map(x => x.Sensor1);
#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 >= 4) Map(x => x.Sensor4);
if (Config.Data.WMsCount >= 5) Map(x => x.Sensor5);

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.9.322.0")]
[assembly: AssemblyFileVersion("2.9.322.0")]
[assembly: AssemblyVersion("2.9.326.0")]
[assembly: AssemblyFileVersion("2.9.326.0")]

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.9.322.0")]
[assembly: AssemblyFileVersion("2.9.322.0")]
[assembly: AssemblyVersion("2.9.326.0")]
[assembly: AssemblyFileVersion("2.9.326.0")]

View File

@ -10,8 +10,6 @@ namespace TBF.BenchControl
{
public int ItemNr;
public string Name;
public float Qfrom;
public float Qto;
public IRegisterReader[] RegisterReaders;
/// 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)
: this(entity.Name, entity.ItemNr)
{
Qfrom = entity.Qfrom;
Qto = entity.Qto;
for (int i = 0; i < Config.Data.WMsCount; i++)
{
RegisterReaders[i] = (IRegisterReader)TbfComponents.FindComponent(entity.GetSensor(i), components);

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.9.323.1")]
[assembly: AssemblyFileVersion("2.9.323.1")]
[assembly: AssemblyVersion("2.9.326.1")]
[assembly: AssemblyFileVersion("2.9.326.1")]

View File

@ -21,8 +21,6 @@ namespace TBF.UiControls
enum Column
{
Name,
Qfrom,
Qto,
FixedColumnsCount,
}
readonly int fixedColumnsCount = (int)Column.FixedColumnsCount;
@ -58,8 +56,6 @@ namespace TBF.UiControls
/// ListViewEx columns
TBF.LocalSettings ls = Program.LocalSettings;
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;
for (int i = 0; i < Config.Data.WMsCount; i++)
{
@ -71,8 +67,6 @@ namespace TBF.UiControls
editors = new Control[fixedColumnsCount + Config.Data.WMsCount];
///
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)
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);
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++)
{
@ -132,14 +124,6 @@ namespace TBF.UiControls
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++)
{
entity.SetSensor(j, lvi.SubItems[fixedColumnsCount + j].Text);