Working on Ajustment, ver.2.3.227.
This commit is contained in:
parent
5c48dbf60e
commit
87b5c36e6a
@ -33,6 +33,10 @@ namespace Config
|
||||
public const int LineSize = 20;
|
||||
public const int CompoundWMsCount = 1;
|
||||
#endif
|
||||
public static int MaxPartNr()
|
||||
{
|
||||
return Math.Max(WMsCount / LineSize, CompoundWMsCount);
|
||||
}
|
||||
|
||||
///
|
||||
/// Database related: This object reference is set after a successful user login
|
||||
|
||||
@ -62,6 +62,15 @@ namespace Config.Entities
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Publish : byte
|
||||
{
|
||||
None = 0,
|
||||
Always = 1,
|
||||
OnScreen = 2,
|
||||
Internal = 3,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum TestRedType
|
||||
{
|
||||
Fix,
|
||||
|
||||
@ -17,7 +17,7 @@ namespace Config.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Part { get; set; } /// Part=0 ... test of all WM-s
|
||||
/// Part>0 ... part of a set of tests with the same Name: subset of WM-s is given by MetersPath
|
||||
public virtual bool Publish { get; set; }
|
||||
public virtual byte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool Evaluate { get; set; }
|
||||
public virtual float Qfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow high limit in [m3/h]
|
||||
@ -59,7 +59,7 @@ namespace Config.Entities
|
||||
///
|
||||
/// Default values
|
||||
///
|
||||
Publish = true;
|
||||
Publish = (byte)Config.Entities.Publish.Always;
|
||||
Evaluate = true;
|
||||
Repeats = 1;
|
||||
Emptying = false;
|
||||
@ -130,7 +130,7 @@ namespace Config.Entities
|
||||
{
|
||||
string partStr = (Part > 0) ? string.Format(", part {0}", Part) : string.Empty;
|
||||
|
||||
return string.Format("{0}({1}{2}){3}", Name, Publish ? "P" : "-", Evaluate ? "E" : "-", partStr);
|
||||
return string.Format("{0}(P.{1},{2}){3}", Name, ((Publish)Publish).ToString(), Evaluate ? "E" : "-", partStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ namespace Config.Mappings
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Part);
|
||||
Map(x => x.Publish);
|
||||
// .CustomType("tinyint");
|
||||
Map(x => x.Evaluate);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
|
||||
@ -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.2.217.0")]
|
||||
[assembly: AssemblyFileVersion("2.2.217.0")]
|
||||
[assembly: AssemblyVersion("2.3.227.0")]
|
||||
[assembly: AssemblyFileVersion("2.3.227.0")]
|
||||
|
||||
@ -64,7 +64,7 @@ namespace Results
|
||||
|
||||
foreach (var t in procedure.Tests)
|
||||
{
|
||||
if (t.Publish)
|
||||
if (t.Publish != (byte)Config.Entities.Publish.None)
|
||||
{
|
||||
TestData td = TestData.UpdateList(d.TestDataList, new TestData(t));
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ namespace Results.Entities
|
||||
public virtual double ErrLimLo { get; set; } /// [%] (usually < 0)
|
||||
public virtual double ErrLimHi { get; set; } /// [%] (usually > 0)
|
||||
public virtual double Uncertainty { get; set; } /// [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual byte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool Evaluate { get; set; }
|
||||
|
||||
|
||||
@ -45,6 +46,7 @@ namespace Results.Entities
|
||||
ErrLimLo = (double)test.ErrLimLo;
|
||||
ErrLimHi = (double)test.ErrLimHi;
|
||||
Uncertainty = (double)test.Uncertainty;
|
||||
Publish = test.Publish;
|
||||
Evaluate = test.Evaluate;
|
||||
}
|
||||
|
||||
@ -66,6 +68,7 @@ namespace Results.Entities
|
||||
if (ErrLimLo != td.ErrLimLo) return false;
|
||||
if (ErrLimHi != td.ErrLimHi) return false;
|
||||
if (Uncertainty != td.Uncertainty) return false;
|
||||
if (Publish != td.Publish) return false;
|
||||
if (Evaluate != td.Evaluate) return false;
|
||||
|
||||
return true;
|
||||
|
||||
@ -58,6 +58,10 @@ namespace Results.Entities
|
||||
public virtual DateTime StartTime() { return Batch.StartTime; }
|
||||
public virtual DateTime EndTime() { return Batch.EndTime; }
|
||||
|
||||
protected MeterTestRslt lastMeterTestRslts;
|
||||
public virtual MeterTestRslt LastMeterTestRslts() { return lastMeterTestRslts; }
|
||||
|
||||
|
||||
public virtual bool PassedFromTests()
|
||||
{
|
||||
bool passed = true;
|
||||
|
||||
@ -21,6 +21,9 @@ namespace Results.Mappings
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.Publish);
|
||||
// .CustomType("tinyint");
|
||||
Map(x => x.Evaluate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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.2.219.0")]
|
||||
[assembly: AssemblyFileVersion("2.2.219.0")]
|
||||
[assembly: AssemblyVersion("2.3.227.0")]
|
||||
[assembly: AssemblyFileVersion("2.3.227.0")]
|
||||
|
||||
@ -243,6 +243,7 @@ namespace TBF.BenchControl.Elde
|
||||
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
log.DebugFormat("RunDeviceBefore() ... regV#={0}, flowM#{1}, statusP={2}", regulValveNo, refFlowmtrNr, statusP.ToString("X"));
|
||||
TestBenchSim.RunDevice(regulValveNo, refFlowmtrNr, statusP);
|
||||
|
||||
log.DebugFormat("refFreq={0}", referenceFreq);
|
||||
|
||||
@ -232,12 +232,12 @@ namespace TBF.BenchControl.Sequences
|
||||
foreach (var wm in WaterMeters) wm.ClearData(); /// Clean water meter data
|
||||
|
||||
bool compound = (StateMachine.Procedure.MetersKind == MetersKind.Combined);
|
||||
int nrWMs = Math.Min(WaterMeters.Count, compound ? Config.Data.CompoundWMsCount : Config.Data.WMsCount);
|
||||
int waterMetersCount = Math.Min(WaterMeters.Count, compound ? Config.Data.CompoundWMsCount : Config.Data.WMsCount);
|
||||
///
|
||||
Results.Entities.WaterMeterData[] waterMeterData = new Results.Entities.WaterMeterData[nrWMs];
|
||||
Results.Entities.WaterMeterData[] waterMeterData = new Results.Entities.WaterMeterData[waterMetersCount];
|
||||
///
|
||||
int[] waterMeterParts = new int[nrWMs];
|
||||
for (int i = 0; i < nrWMs; i++)
|
||||
int[] waterMeterParts = new int[waterMetersCount];
|
||||
for (int i = 0; i < waterMetersCount; i++)
|
||||
{
|
||||
waterMeterParts[i] = Utils.PartNr(i + 1, compound);
|
||||
waterMeterData[i] = new Results.Entities.WaterMeterData()
|
||||
|
||||
@ -545,13 +545,16 @@ namespace TBF
|
||||
//metrology2ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Err_cor_neg_pct_chdr, Width = 90 });
|
||||
//metrology2ListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Err_cor_pos_pct_chdr, Width = 90 });
|
||||
|
||||
ComboBox yesNo1CBox = new ComboBox(); /// control for Publish
|
||||
yesNo1CBox.Items.Add(Strings.yes);
|
||||
yesNo1CBox.Items.Add(Strings.no);
|
||||
ComboBox publishCBox = new ComboBox(); /// control for Publish
|
||||
for (Config.Entities.Publish pb = 0; pb < Config.Entities.Publish.Count; pb++)
|
||||
{
|
||||
publishCBox.Items.Add(pb.ToString());
|
||||
}
|
||||
|
||||
ComboBox yesNo2CBox = new ComboBox(); /// control for Evaluate
|
||||
yesNo2CBox.Items.Add(Strings.yes);
|
||||
yesNo2CBox.Items.Add(Strings.no);
|
||||
|
||||
ComboBox yesNoCBox = new ComboBox(); /// control for Evaluate
|
||||
yesNoCBox.Items.Add(Strings.yes);
|
||||
yesNoCBox.Items.Add(Strings.no);
|
||||
|
||||
metrology2Editors = new Control[]
|
||||
{
|
||||
@ -563,8 +566,8 @@ namespace TBF
|
||||
new TextBox(), /// Err.Lim. +
|
||||
new TextBox(), /// Uncertainty
|
||||
new TextBox(), /// Filter
|
||||
yesNo1CBox, /// Publish
|
||||
yesNo2CBox, /// Evaluate
|
||||
publishCBox, /// Publish
|
||||
yesNoCBox, /// Evaluate
|
||||
};
|
||||
|
||||
foreach (var ctrl in metrology2Editors)
|
||||
@ -749,7 +752,7 @@ namespace TBF
|
||||
lviMetrlg2.SubItems.Add(test.ErrLimHi.ToString());
|
||||
lviMetrlg2.SubItems.Add(test.Uncertainty.ToString());
|
||||
lviMetrlg2.SubItems.Add(test.TolerRed.ToString());
|
||||
lviMetrlg2.SubItems.Add(test.Publish ? Strings.yes : Strings.no);
|
||||
lviMetrlg2.SubItems.Add(((Config.Entities.Publish)test.Publish).ToString());
|
||||
lviMetrlg2.SubItems.Add(test.Evaluate ? Strings.yes : Strings.no);
|
||||
|
||||
metrology2ListViewEx.Items.Add(lviMetrlg2);
|
||||
@ -840,8 +843,14 @@ namespace TBF
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)Mtrlgy2Clmn.Uncertainty].Text, out tmp)) entity.Uncertainty = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)Mtrlgy2Clmn.Filter].Text, out tmp)) entity.TolerRed = (double)tmp;
|
||||
|
||||
if (lvi.SubItems[(int)Mtrlgy2Clmn.Publish].Text.Equals(Strings.yes)) entity.Publish = true;
|
||||
else if (lvi.SubItems[(int)Mtrlgy2Clmn.Publish].Text.Equals(Strings.no)) entity.Publish = false;
|
||||
for (Config.Entities.Publish pb = 0; pb < Config.Entities.Publish.Count; pb++)
|
||||
{
|
||||
if (lvi.SubItems[(int)Mtrlgy2Clmn.Publish].Text.Equals(pb.ToString()))
|
||||
{
|
||||
entity.Publish = (byte)pb;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (lvi.SubItems[(int)Mtrlgy2Clmn.Evaluate].Text.Equals(Strings.yes)) entity.Evaluate = true;
|
||||
else if (lvi.SubItems[(int)Mtrlgy2Clmn.Evaluate].Text.Equals(Strings.no)) entity.Evaluate = false;
|
||||
@ -1034,13 +1043,23 @@ namespace TBF
|
||||
if (e.SubItem == (int)Mtrlgy2Clmn.Part)
|
||||
{
|
||||
if (e.DisplayText.Equals("-")) return; /// OK
|
||||
if (!int.TryParse(e.DisplayText, out dummy) || dummy < 1 || dummy > 3)
|
||||
if (!int.TryParse(e.DisplayText, out dummy) || dummy < 1 || dummy > Config.Data.MaxPartNr())
|
||||
{
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return; /// NOK
|
||||
}
|
||||
}
|
||||
if (e.SubItem == (int)Mtrlgy2Clmn.Publish)
|
||||
{
|
||||
for (Config.Entities.Publish pb = 0; pb < Config.Entities.Publish.Count; pb++)
|
||||
{
|
||||
if (e.DisplayText.Equals(pb.ToString())) return;
|
||||
}
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return; /// NOK
|
||||
}
|
||||
}
|
||||
|
||||
private void processListViewEx_SubItemClicked(object sender, SubItemEventArgs e)
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.2.227.1")]
|
||||
[assembly: AssemblyFileVersion("2.2.227.1")]
|
||||
[assembly: AssemblyVersion("2.3.227.1")]
|
||||
[assembly: AssemblyFileVersion("2.3.227.1")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user