Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80697ed65f | ||
|
|
43fd99cea6 | ||
|
|
eafcf016f3 | ||
|
|
5a89a5d43f | ||
|
|
33715395dc | ||
|
|
05982cc2ff | ||
|
|
6706b296c0 | ||
|
|
e4be90b7bc | ||
|
|
9cc9e4b4c9 | ||
|
|
45869401ad | ||
|
|
5a88e8909f | ||
|
|
a4dc7435d0 | ||
|
|
df1689d458 | ||
|
|
76a54f41a7 | ||
|
|
89593b1dac | ||
|
|
dbd6b7a9f7 | ||
|
|
e49fcdebfc | ||
|
|
1ccdcf9bd2 | ||
|
|
60f5359bd9 |
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace Config.Entities
|
||||
@@ -102,14 +103,14 @@ namespace Config.Entities
|
||||
|
||||
public virtual void Export(StreamWriter output)
|
||||
{
|
||||
output.WriteLine(ItemNr.ToString());
|
||||
output.WriteLine(ItemNr.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Name);
|
||||
output.WriteLine(Description);
|
||||
output.WriteLine(CreationUser);
|
||||
output.WriteLine(CreationTime.ToString());
|
||||
output.WriteLine(CreationTime.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(LastChgUser);
|
||||
output.WriteLine(LastChgTime.ToString());
|
||||
output.WriteLine(MetersKind.ToString());
|
||||
output.WriteLine(LastChgTime.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(MetersKind.ToString());
|
||||
output.WriteLine(Watermeters);
|
||||
output.WriteLine(ProtocolTitle);
|
||||
output.WriteLine(DataEntry);
|
||||
@@ -131,13 +132,13 @@ namespace Config.Entities
|
||||
{
|
||||
Procedure result = new Procedure();
|
||||
|
||||
result.ItemNr = int.Parse(input.ReadLine());
|
||||
result.ItemNr = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
result.Name = input.ReadLine();
|
||||
result.Description = input.ReadLine();
|
||||
result.CreationUser = input.ReadLine();
|
||||
result.CreationTime = DateTime.Parse(input.ReadLine());
|
||||
result.CreationTime = DateTime.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
result.LastChgUser = input.ReadLine();
|
||||
result.LastChgTime = DateTime.Parse(input.ReadLine());
|
||||
result.LastChgTime = DateTime.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
string line = input.ReadLine();
|
||||
result.MetersKind = line.Equals(MetersKind.Single.ToString()) ? MetersKind.Single : (line.Equals(MetersKind.Combined.ToString()) ? MetersKind.Combined : MetersKind.HeatMeter);
|
||||
result.Watermeters = input.ReadLine();
|
||||
|
||||
+39
-38
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace Config.Entities
|
||||
@@ -144,28 +145,28 @@ namespace Config.Entities
|
||||
public virtual void Export(StreamWriter output)
|
||||
{
|
||||
output.WriteLine(Name);
|
||||
output.WriteLine(Part.ToString());
|
||||
output.WriteLine(Publish.ToString());
|
||||
output.WriteLine(Part.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Publish.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Evaluate.ToString());
|
||||
output.WriteLine(Qfrom.ToString());
|
||||
output.WriteLine(Qto.ToString());
|
||||
output.WriteLine(Volume.ToString());
|
||||
output.WriteLine(TstTime.ToString());
|
||||
output.WriteLine(Qfrom.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Qto.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Volume.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(TstTime.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Method);
|
||||
output.WriteLine(ErrLimLo.ToString());
|
||||
output.WriteLine(ErrLimHi.ToString());
|
||||
output.WriteLine(Uncertainty.ToString());
|
||||
output.WriteLine(Repeats.ToString());
|
||||
output.WriteLine(ErrLimLo.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(ErrLimHi.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Uncertainty.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Repeats.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Draining.ToString());
|
||||
output.WriteLine(Zeroing.ToString());
|
||||
output.WriteLine(PumpPower.ToString());
|
||||
output.WriteLine(MassRepeats.ToString());
|
||||
output.WriteLine(MassSpread.ToString());
|
||||
output.WriteLine(((byte)MassMethod).ToString());
|
||||
output.WriteLine(TimeBeforeFlow.ToString());
|
||||
output.WriteLine(TimeFlow2Mass.ToString());
|
||||
output.WriteLine(TimePump2StartV.ToString());
|
||||
output.WriteLine(TimeStop2Mass.ToString());
|
||||
output.WriteLine(PumpPower.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(MassRepeats.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(MassSpread.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(((byte)MassMethod).ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(TimeBeforeFlow.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(TimeFlow2Mass.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(TimePump2StartV.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(TimeStop2Mass.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(FeedingPath);
|
||||
output.WriteLine(BenchPath);
|
||||
output.WriteLine(OutputPath);
|
||||
@@ -187,28 +188,28 @@ namespace Config.Entities
|
||||
|
||||
Test tst = new Test();
|
||||
tst.Name = firstLine;
|
||||
tst.Part = int.Parse(input.ReadLine());
|
||||
tst.Publish = sbyte.Parse(input.ReadLine());
|
||||
tst.Evaluate = bool.Parse(input.ReadLine());
|
||||
tst.Qfrom = float.Parse(input.ReadLine());
|
||||
tst.Qto = float.Parse(input.ReadLine());
|
||||
tst.Volume = float.Parse(input.ReadLine());
|
||||
tst.TstTime = float.Parse(input.ReadLine());
|
||||
tst.Part = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Publish = sbyte.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Evaluate = bool.Parse(input.ReadLine());
|
||||
tst.Qfrom = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Qto = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Volume = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.TstTime = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Method = input.ReadLine();
|
||||
tst.ErrLimLo = float.Parse(input.ReadLine());
|
||||
tst.ErrLimHi = float.Parse(input.ReadLine());
|
||||
tst.Uncertainty = float.Parse(input.ReadLine());
|
||||
tst.Repeats = int.Parse(input.ReadLine());
|
||||
tst.ErrLimLo = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.ErrLimHi = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Uncertainty = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Repeats = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.Draining = bool.Parse(input.ReadLine());
|
||||
tst.Zeroing = bool.Parse(input.ReadLine());
|
||||
tst.PumpPower = float.Parse(input.ReadLine());
|
||||
tst.MassRepeats = int.Parse(input.ReadLine());
|
||||
tst.MassSpread = float.Parse(input.ReadLine());
|
||||
tst.MassMethod = (MassMethod)byte.Parse(input.ReadLine());
|
||||
tst.TimeBeforeFlow = int.Parse(input.ReadLine());
|
||||
tst.TimeFlow2Mass = int.Parse(input.ReadLine());
|
||||
tst.TimePump2StartV = int.Parse(input.ReadLine());
|
||||
tst.TimeStop2Mass = int.Parse(input.ReadLine());
|
||||
tst.Zeroing = bool.Parse(input.ReadLine());
|
||||
tst.PumpPower = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.MassRepeats = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.MassSpread = float.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.MassMethod = (MassMethod)byte.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.TimeBeforeFlow = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.TimeFlow2Mass = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.TimePump2StartV = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.TimeStop2Mass = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
tst.FeedingPath = input.ReadLine();
|
||||
tst.BenchPath = input.ReadLine();
|
||||
tst.OutputPath = input.ReadLine();
|
||||
|
||||
@@ -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.12.518.0")]
|
||||
[assembly: AssemblyFileVersion("2.12.518.0")]
|
||||
[assembly: AssemblyVersion("2.12.537.0")]
|
||||
[assembly: AssemblyFileVersion("2.12.537.0")]
|
||||
|
||||
@@ -270,5 +270,40 @@ namespace Results
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static Batch LoadBatch(int batchNr)
|
||||
{
|
||||
IList<Batch> batches;
|
||||
ISession session = DB.CreateSession();
|
||||
if (session == null) return null;
|
||||
|
||||
TestDataList = session.QueryOver<TestData>().List();
|
||||
ComponentsList = session.QueryOver<Components>().List();
|
||||
WaterMeterDataList = session.QueryOver<WaterMeterData>().List();
|
||||
|
||||
try
|
||||
{
|
||||
batches = session.QueryOver<Batch>()
|
||||
.Where(x => (x.BatchNr == batchNr))
|
||||
.List();
|
||||
|
||||
foreach (var batch in batches)
|
||||
{
|
||||
batch.TestRslts = session.QueryOver<TestRslt>()
|
||||
.Where(x => (x.Batch.Id == batch.Id))
|
||||
.List();
|
||||
batch.WaterMeters = session.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.Batch.Id == batch.Id))
|
||||
.List();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.FatalFormat("Cannot load batch #{0}: {1}", batchNr, exc.Message);
|
||||
return null;
|
||||
}
|
||||
|
||||
return (batches.Count > 0) ? batches[0] : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentNHibernate.Cfg;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public class DBase
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(DBase));
|
||||
|
||||
/// <summary> Session factory for all regular sessions, not for CreateEmptyResultsDB(). </summary>
|
||||
public static IList<DBase> Databases;
|
||||
public static int Count { get { return Databases.Count; } }
|
||||
|
||||
static DBase()
|
||||
{
|
||||
Databases = new List<DBase>();
|
||||
}
|
||||
|
||||
|
||||
public readonly string Name;
|
||||
public readonly string ConnectionString;
|
||||
|
||||
ISessionFactory sessionFactory;
|
||||
|
||||
public DBase(string connectionString, string name)
|
||||
{
|
||||
this.ConnectionString = connectionString;
|
||||
this.Name = name;
|
||||
sessionFactory = Fluently.Configure()
|
||||
.Database(MySQLConfiguration.Standard.ConnectionString(connectionString))
|
||||
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.WaterMeterData>())
|
||||
.ExposeConfiguration(BuildSchema)
|
||||
.BuildSessionFactory();
|
||||
}
|
||||
|
||||
public DBase(string connectionString)
|
||||
: this(connectionString, string.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
private void BuildSchema(Configuration config)
|
||||
{
|
||||
/// This NHibernate tool takes a configuration with mapping info and exports a database schema
|
||||
new SchemaExport(config).SetOutputFile("db_schema");
|
||||
}
|
||||
|
||||
public ISession OpenSession()
|
||||
{
|
||||
return sessionFactory.OpenSession();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,5 +89,24 @@ namespace Results.Entities
|
||||
TestRslt = testRslt;
|
||||
CompoundMeterId = (byte)compoundMeterId;
|
||||
}
|
||||
|
||||
public virtual void CopyContentFrom(MeterTestRslt src)
|
||||
{
|
||||
if (src == null) return;
|
||||
|
||||
PulsesMeter = src.PulsesMeter;
|
||||
PulsesMaster = src.PulsesMaster;
|
||||
PulsesPerLiter = src.PulsesPerLiter;
|
||||
VolumeStart = src.VolumeStart;
|
||||
VolumeEnd = src.VolumeEnd;
|
||||
VolumeMeter = src.VolumeMeter;
|
||||
VolumeRef = src.VolumeRef;
|
||||
TimestampStart = src.TimestampStart;
|
||||
TimestampEnd = src.TimestampEnd;
|
||||
TestTime = src.TestTime;
|
||||
Error = src.Error;
|
||||
TestDone = src.TestDone;
|
||||
Passed = src.Passed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ namespace Results.Entities
|
||||
public virtual TestData TestData { get; set; }
|
||||
public virtual Components Components { get; set; }
|
||||
public virtual int Part { get; set; }
|
||||
public virtual int RepetitionNr { get; set; } /// Repetition number from the set of repeated tests (1...)
|
||||
public virtual int RepetitionNr { get; set; } /// Repetition number from the set of repeated tests (1...)
|
||||
|
||||
/// Main results
|
||||
public virtual DateTime StartTime { get; set; } /// Date and time of the test start
|
||||
public virtual DateTime EndTime { get; set; } /// Date and time of the test end
|
||||
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual double TestTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual double PulsesMaster { get; set; }
|
||||
public virtual double ConstMaster { get; set; } /// [pls/l] Pulses per liter master flow meter
|
||||
@@ -104,7 +104,7 @@ namespace Results.Entities
|
||||
|
||||
/// Wrappers
|
||||
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
||||
public virtual int Repeats() { return TestData.Repeats; }
|
||||
public virtual int Repeats() { return TestData.Repeats; }
|
||||
public virtual double Qfrom() { return TestData.Qfrom; }
|
||||
public virtual double Qto() { return TestData.Qto; }
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
@@ -130,6 +130,94 @@ namespace Results.Entities
|
||||
RepetitionNr = repetitionNr;
|
||||
}
|
||||
|
||||
public virtual void CopyContentFrom(TestRslt src)
|
||||
{
|
||||
if (src == null) return;
|
||||
|
||||
Components = src.Components; /// ???
|
||||
Part = src.Part;
|
||||
RepetitionNr = src.RepetitionNr;
|
||||
StartTime = src.StartTime;
|
||||
EndTime = src.EndTime;
|
||||
FlowSetTime = src.FlowSetTime;
|
||||
TestTime = src.TestTime;
|
||||
PulsesMaster = src.PulsesMaster;
|
||||
ConstMaster = src.ConstMaster;
|
||||
MassStartRaw = src.MassStartRaw;
|
||||
MassStart = src.MassStart;
|
||||
MassEndRaw = src.MassEndRaw;
|
||||
MassEnd = src.MassEnd;
|
||||
DensityIn = src.DensityIn;
|
||||
DensityOut = src.DensityOut;
|
||||
DensityDiv = src.DensityDiv;
|
||||
Buoyancy = src.Buoyancy;
|
||||
FlowMass = src.FlowMass;
|
||||
FlowVolume = src.FlowVolume;
|
||||
VolumeCTV = src.VolumeCTV;
|
||||
VolumeMaster = src.VolumeMaster;
|
||||
ErrorMaster = src.ErrorMaster;
|
||||
RefEnergy = src.RefEnergy;
|
||||
AmbTempMean = src.AmbTempMean;
|
||||
AmbTempStart = src.AmbTempStart;
|
||||
AmbTempEnd = src.AmbTempEnd;
|
||||
AmbTempMin = src.AmbTempMin;
|
||||
AmbTempMax = src.AmbTempMax;
|
||||
AmbPressMean = src.AmbPressMean;
|
||||
AmbPressStart = src.AmbPressStart;
|
||||
AmbPressEnd = src.AmbPressEnd;
|
||||
AmbPressMin = src.AmbPressMin;
|
||||
AmbPressMax = src.AmbPressMax;
|
||||
AmbHumiMean = src.AmbHumiMean;
|
||||
AmbHumiStart = src.AmbHumiStart;
|
||||
AmbHumiEnd = src.AmbHumiEnd;
|
||||
AmbHumiMin = src.AmbHumiMin;
|
||||
AmbHumiMax = src.AmbHumiMax;
|
||||
PressUpMean = src.PressUpMean;
|
||||
PressUpStart = src.PressUpStart;
|
||||
PressUpEnd = src.PressUpEnd;
|
||||
PressUpMin = src.PressUpMin;
|
||||
PressUpMax = src.PressUpMax;
|
||||
PressDownMean = src.PressDownMean;
|
||||
PressDownStart = src.PressDownStart;
|
||||
PressDownEnd = src.PressDownEnd;
|
||||
PressDownMin = src.PressDownMin;
|
||||
PressDownMax = src.PressDownMax;
|
||||
PressDeltaMean = src.PressDeltaMean;
|
||||
PressDeltaStart = src.PressDeltaStart;
|
||||
PressDeltaEnd = src.PressDeltaEnd;
|
||||
PressDeltaMin = src.PressDeltaMin;
|
||||
PressDeltaMax = src.PressDeltaMax;
|
||||
TempUpMean = src.TempUpMean;
|
||||
TempUpStart = src.TempUpStart;
|
||||
TempUpEnd = src.TempUpEnd;
|
||||
TempUpMin = src.TempUpMin;
|
||||
TempUpMax = src.TempUpMax;
|
||||
TempDownMean = src.TempDownMean;
|
||||
TempDownStart = src.TempDownStart;
|
||||
TempDownEnd = src.TempDownEnd;
|
||||
TempDownMin = src.TempDownMin;
|
||||
TempDownMax = src.TempDownMax;
|
||||
TempDivMean = src.TempDivMean;
|
||||
TempDivStart = src.TempDivStart;
|
||||
TempDivEnd = src.TempDivEnd;
|
||||
TempDivMin = src.TempDivMin;
|
||||
TempDivMax = src.TempDivMax;
|
||||
FlowStart = src.FlowStart;
|
||||
FlowEnd = src.FlowEnd;
|
||||
FlowMin = src.FlowMin;
|
||||
FlowMax = src.FlowMax;
|
||||
Custom1 = src.Custom1;
|
||||
Custom2 = src.Custom2;
|
||||
Custom3 = src.Custom3;
|
||||
Custom4 = src.Custom4;
|
||||
Custom5 = src.Custom5;
|
||||
Custom6 = src.Custom6;
|
||||
Custom7 = src.Custom7;
|
||||
Custom8 = src.Custom8;
|
||||
Custom9 = src.Custom9;
|
||||
Custom10 = src.Custom10;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());
|
||||
|
||||
@@ -143,6 +143,50 @@ namespace Results.Entities
|
||||
}
|
||||
|
||||
|
||||
public virtual void CopyContentFrom(WaterMeter src)
|
||||
{
|
||||
if (src == null) return;
|
||||
|
||||
SerialNr = src.SerialNr;
|
||||
SerialNrAux = src.SerialNrAux;
|
||||
PurchaseOrder = src.PurchaseOrder;
|
||||
YearOfProduction = src.YearOfProduction;
|
||||
// WMPosition skipped
|
||||
EndState = src.EndState;
|
||||
EndStateAux = src.EndStateAux;
|
||||
QRise = src.QRise;
|
||||
QFall = src.QFall;
|
||||
Passed = src.Passed;
|
||||
ResultCode = src.ResultCode;
|
||||
#if IPERL
|
||||
SerialNrEx = src.SerialNrEx;
|
||||
OrigCalibFactor = src.OrigCalibFactor;
|
||||
CalibFactor = src.CalibFactor;
|
||||
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
|
||||
Q2CorrectionDone = src.Q2CorrectionDone;
|
||||
Q2Correction = src.Q2Correction;
|
||||
Q2CorrRFlow = src.Q2CorrRFlow;
|
||||
Q2CorrLFlow = src.Q2CorrLFlow;
|
||||
Q2CorrFlowRight = src.Q2CorrFlowRight;
|
||||
Diff2Hz8Hz = src.Diff2Hz8Hz;
|
||||
Hz2CorrectionDone = src.Hz2CorrectionDone;
|
||||
Hz2Correction = src.Hz2Correction;
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
Pruefindex = src.Pruefindex;
|
||||
HydrPruefung = src.HydrPruefung;
|
||||
#endif
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
MeterTestRslt srcMtr = src.GetMeterTestRslt(mtr.Name(), (Config.Entities.CompoundMeterId)mtr.CompoundMeterId);
|
||||
if (srcMtr != null)
|
||||
{
|
||||
mtr.CopyContentFrom(srcMtr);
|
||||
mtr.TestRslt.CopyContentFrom(srcMtr.TestRslt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
|
||||
@@ -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.12.486.0")]
|
||||
[assembly: AssemblyFileVersion("2.12.486.0")]
|
||||
[assembly: AssemblyVersion("2.12.544.0")]
|
||||
[assembly: AssemblyFileVersion("2.12.544.0")]
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BatchResults.cs" />
|
||||
<Compile Include="DBase.cs" />
|
||||
<Compile Include="Entities\Batch.cs" />
|
||||
<Compile Include="Entities\Components.cs" />
|
||||
<Compile Include="Entities\MeterTestRslt.cs" />
|
||||
|
||||
@@ -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.12.514.0")]
|
||||
[assembly: AssemblyFileVersion("2.12.514.0")]
|
||||
[assembly: AssemblyVersion("2.12.542.0")]
|
||||
[assembly: AssemblyFileVersion("2.12.542.0")]
|
||||
|
||||
@@ -115,6 +115,7 @@ namespace TBF.BenchControl
|
||||
TurnPumpOnOffDone,
|
||||
|
||||
/// CheckUi events
|
||||
UiCmdReloadBatch,
|
||||
UiCmdStartTest,
|
||||
UiCmdStartQ1,
|
||||
UiCmdStartQ2,
|
||||
@@ -123,16 +124,17 @@ namespace TBF.BenchControl
|
||||
UiCmdStop,
|
||||
UiCmdPurgeBegin,
|
||||
UiCmdPurgeEnd,
|
||||
UiCmdEmptyTank1,
|
||||
UiCmdEmptyTank2,
|
||||
UiCmdEmptyTank3,
|
||||
UiCmdDrainTank1,
|
||||
UiCmdDrainTank2,
|
||||
UiCmdDrainTank3,
|
||||
UiCmdBreak,
|
||||
UiCmdResetResults,
|
||||
UiCmdAcceptResults,
|
||||
UiCmdCalibration,
|
||||
UiCmdCameraTest,
|
||||
UiCmdSensitivityTest,
|
||||
UiCmdB1,
|
||||
UiCmdCustom,
|
||||
UiCmdB1,
|
||||
UiCmdB2,
|
||||
UiCmdB3,
|
||||
|
||||
|
||||
@@ -16,19 +16,19 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
bool done;
|
||||
|
||||
/// Set by the constructor
|
||||
BalanceDev balanceDev;
|
||||
BalanceDev scale;
|
||||
DoubleBox result;
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone, Error
|
||||
/// </summary>
|
||||
/// <param name="balanceDev">Balance device instance</param>
|
||||
/// <param name="scale">Balance device instance</param>
|
||||
/// <param name="requiredReadingsCount">Required mass readings count (>= 3)</param>
|
||||
/// <param name="result">Reference to the measured mass in kg</param>
|
||||
public ReadMassOp(BalanceDev balanceDev, ref DoubleBox result)
|
||||
public ReadMassOp(BalanceDev scale, ref DoubleBox result)
|
||||
{
|
||||
if (balanceDev == null) throw new ArgumentNullException("balanceDev");
|
||||
this.balanceDev = balanceDev;
|
||||
if (scale == null) throw new ArgumentNullException("scale");
|
||||
this.scale = scale;
|
||||
|
||||
this.result = result;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
public void Start()
|
||||
{
|
||||
done = false;
|
||||
started = BalanceDev.GetImmediateMassMeasurement(balanceDev.IdNr, balanceDev.Name);
|
||||
started = BalanceDev.GetImmediateMassMeasurement(scale.IdNr, scale.Name);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@@ -52,22 +52,21 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
{
|
||||
if (!started)
|
||||
{
|
||||
started = BalanceDev.GetImmediateMassMeasurement(balanceDev.IdNr, balanceDev.Name);
|
||||
if (!done) return Event.Busy;
|
||||
else return Event.BalanceDone;
|
||||
started = BalanceDev.GetImmediateMassMeasurement(scale.IdNr, scale.Name);
|
||||
if (!done)
|
||||
return Event.Busy;
|
||||
else
|
||||
return Event.BalanceDone;
|
||||
}
|
||||
else if (started && balanceDev.MsrmntState == MsrmntState.Valid)
|
||||
else if (started && scale.MsrmntState != MsrmntState.Busy)
|
||||
{
|
||||
result.Val = balanceDev.Mass;
|
||||
log.InfoFormat("ReadMassOp.Run() ... mass={0} ... returning Event.BalanceDone", balanceDev.Mass);
|
||||
if (scale.MsrmntState == MsrmntState.Valid) result.Val = scale.Mass;
|
||||
log.InfoFormat("ReadMassOp.Run() ... state={0}, mass={1} ... returning Event.BalanceDone",
|
||||
scale.MsrmntState, scale.Mass);
|
||||
done = true;
|
||||
started = false;
|
||||
return Event.BalanceDone; /// Mass read OK
|
||||
}
|
||||
else if (done)
|
||||
{
|
||||
return Event.BalanceDone; /// Mass has already been read (at least once)
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.Busy;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
@@ -12,22 +12,23 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ReadMassOp));
|
||||
public override string ToString() { return string.Format("ReadMassOp(.,.)"); }
|
||||
|
||||
bool started;
|
||||
bool done;
|
||||
|
||||
/// Set by the constructor
|
||||
BalanceDev balanceDev;
|
||||
BalanceDev scale;
|
||||
DoubleBox result;
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone, Error
|
||||
/// </summary>
|
||||
/// <param name="balanceDev">Balance device instance</param>
|
||||
/// <param name="scale">Balance device instance</param>
|
||||
/// <param name="requiredReadingsCount">Required mass readings count (>= 3)</param>
|
||||
/// <param name="result">Reference to the measured mass in kg</param>
|
||||
public ReadMassOp(BalanceDev balanceDev, ref DoubleBox result)
|
||||
public ReadMassOp(BalanceDev scale, ref DoubleBox result)
|
||||
{
|
||||
if (balanceDev == null) throw new ArgumentNullException("balanceDev");
|
||||
this.balanceDev = balanceDev;
|
||||
if (scale == null) throw new ArgumentNullException("balanceDev");
|
||||
this.scale = scale;
|
||||
|
||||
this.result = result;
|
||||
|
||||
@@ -37,8 +38,9 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
scale.GetImmediateMassMeasurement();
|
||||
started = true;
|
||||
done = false;
|
||||
balanceDev.GetImmediateMassMeasurement();
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@@ -49,22 +51,26 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (balanceDev.MsrmntState == MsrmntState.Valid)
|
||||
{
|
||||
result.Val = balanceDev.Mass;
|
||||
done = true;
|
||||
log.InfoFormat("ReadMassOp.Run() ... mass={0} ... returning Event.BalanceDone", balanceDev.Mass);
|
||||
balanceDev.GetImmediateMassMeasurement(); /// Start another measurement
|
||||
return Event.BalanceDone; /// Mass read OK
|
||||
}
|
||||
else if (done)
|
||||
{
|
||||
return Event.BalanceDone; /// Mass has already been read (at least once)
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.None;
|
||||
}
|
||||
if (!started)
|
||||
{
|
||||
scale.GetImmediateMassMeasurement();
|
||||
started = true;
|
||||
done = false;
|
||||
return Event.Busy;
|
||||
}
|
||||
else if (started && scale.MsrmntState != MsrmntState.Busy)
|
||||
{
|
||||
if (scale.MsrmntState == MsrmntState.Valid) result.Val = scale.Mass;
|
||||
log.InfoFormat("ReadMassOp.Run() ... state={0}, mass={1} ... returning Event.BalanceDone",
|
||||
scale.MsrmntState, scale.Mass);
|
||||
done = true;
|
||||
started = false;
|
||||
return Event.BalanceDone; /// Mass read OK
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.Busy;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
|
||||
@@ -77,7 +77,8 @@ namespace TBF.BenchControl.Operations
|
||||
switch (cmd)
|
||||
{
|
||||
/// Bench Control Panel buttons
|
||||
case UI2BenchCmd.StartTest: return Event.UiCmdStartTest;
|
||||
case UI2BenchCmd.ReloadBatch: return Event.UiCmdReloadBatch;
|
||||
case UI2BenchCmd.StartTest: return Event.UiCmdStartTest;
|
||||
case UI2BenchCmd.StartQ1: return Event.UiCmdStartQ1;
|
||||
case UI2BenchCmd.StartQ2: return Event.UiCmdStartQ2;
|
||||
case UI2BenchCmd.StartQ3: return Event.UiCmdStartQ3;
|
||||
@@ -85,15 +86,16 @@ namespace TBF.BenchControl.Operations
|
||||
case UI2BenchCmd.Stop: return Event.UiCmdStop;
|
||||
case UI2BenchCmd.PurgeBegin: return Event.UiCmdPurgeBegin;
|
||||
case UI2BenchCmd.PurgeEnd: return Event.UiCmdPurgeEnd;
|
||||
case UI2BenchCmd.DrainTank1: return Event.UiCmdEmptyTank1;
|
||||
case UI2BenchCmd.DrainTank2: return Event.UiCmdEmptyTank2;
|
||||
case UI2BenchCmd.DrainTank3: return Event.UiCmdEmptyTank3;
|
||||
case UI2BenchCmd.DrainTank1: return Event.UiCmdDrainTank1;
|
||||
case UI2BenchCmd.DrainTank2: return Event.UiCmdDrainTank2;
|
||||
case UI2BenchCmd.DrainTank3: return Event.UiCmdDrainTank3;
|
||||
case UI2BenchCmd.Break: return Event.UiCmdBreak;
|
||||
case UI2BenchCmd.ResetResults: return Event.UiCmdResetResults;
|
||||
case UI2BenchCmd.AcceptResults: return Event.UiCmdAcceptResults;
|
||||
case UI2BenchCmd.Calibration: return Event.UiCmdCalibration;
|
||||
case UI2BenchCmd.CameraTest: return Event.UiCmdCameraTest;
|
||||
case UI2BenchCmd.SensitivityTest: return Event.UiCmdSensitivityTest;
|
||||
case UI2BenchCmd.Custom: return Event.UiCmdCustom;
|
||||
|
||||
case UI2BenchCmd.Next: return Event.Next;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
@@ -153,6 +154,12 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
completed2 = true;
|
||||
});
|
||||
|
||||
if (writerCfg.Culture > Culture.system && writerCfg.Culture < Culture.Count)
|
||||
{
|
||||
thread1.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
|
||||
thread2.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
public MonthFolders MonthFolders;
|
||||
public DayFolders DayFolders;
|
||||
public string FileNameFormat;
|
||||
public Separator Separator;
|
||||
public Culture Culture;
|
||||
public Separator Separator;
|
||||
public bool SaveGoodOnly;
|
||||
public string[] SelectedItems;
|
||||
|
||||
|
||||
@@ -38,15 +38,11 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
|
||||
private void WriterCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
|
||||
for (YearFolders s = 0; s < YearFolders.Count; s++) yearFoldersComboBox.Items.Add(s.ToString());
|
||||
for (MonthFolders s = 0; s < MonthFolders.Count; s++) monthFoldersComboBox.Items.Add(s.ToString());
|
||||
for (DayFolders s = 0; s < DayFolders.Count; s++) dayFoldersComboBox.Items.Add(s.ToString());
|
||||
|
||||
for (int i = 0; i < (int)Separator.Count; i++)
|
||||
{
|
||||
separatorComboBox.Items.Add(((Separator)i).ToString());
|
||||
}
|
||||
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
|
||||
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
|
||||
|
||||
selectedItems = config.SelectedItems;
|
||||
|
||||
@@ -68,7 +64,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
monthFoldersComboBox.Text = config.MonthFolders.ToString();
|
||||
dayFoldersComboBox.Text = config.DayFolders.ToString();
|
||||
fileNameFmtTextBox.Text = config.FileNameFormat;
|
||||
separatorComboBox.Text = config.Separator.ToString();
|
||||
cultureComboBox.Text = config.Culture.ToString();
|
||||
separatorComboBox.Text = config.Separator.ToString();
|
||||
goodOnlyCheckBox.Checked = config.SaveGoodOnly;
|
||||
}
|
||||
|
||||
@@ -83,7 +80,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
monthFoldersComboBox.Enabled = true;
|
||||
dayFoldersComboBox.Enabled = true;
|
||||
fileNameFmtTextBox.Enabled = true;
|
||||
separatorComboBox.Enabled = true;
|
||||
cultureComboBox.Enabled = true;
|
||||
separatorComboBox.Enabled = true;
|
||||
goodOnlyCheckBox.Enabled = true;
|
||||
selectItemsButton.Enabled = true;
|
||||
}
|
||||
@@ -110,6 +108,12 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
message += Environment.NewLine + "Invalid day folder selection";
|
||||
}
|
||||
|
||||
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid culture";
|
||||
}
|
||||
|
||||
if (!separatorComboBox.Items.Contains(separatorComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
@@ -176,6 +180,16 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
for (Culture i = 0; i < Culture.Count; i++)
|
||||
{
|
||||
if (i.ToString().Equals(cultureComboBox.Text) && (config.Culture != i))
|
||||
{
|
||||
config.Culture = i;
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (Separator i = 0; i < Separator.Count; i++)
|
||||
{
|
||||
if (i.ToString().Equals(separatorComboBox.Text) && (config.Separator != i))
|
||||
|
||||
+32
-8
@@ -52,6 +52,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
this.fileNameFmtTextBox = new System.Windows.Forms.TextBox();
|
||||
this.fileNameFmtLabel = new System.Windows.Forms.Label();
|
||||
this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.cultureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.cultureLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
@@ -111,25 +113,25 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
// separatorLabel
|
||||
//
|
||||
this.separatorLabel.AutoSize = true;
|
||||
this.separatorLabel.Location = new System.Drawing.Point(17, 184);
|
||||
this.separatorLabel.Location = new System.Drawing.Point(17, 206);
|
||||
this.separatorLabel.Name = "separatorLabel";
|
||||
this.separatorLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.separatorLabel.TabIndex = 15;
|
||||
this.separatorLabel.TabIndex = 17;
|
||||
this.separatorLabel.Text = "Separator";
|
||||
//
|
||||
// separatorComboBox
|
||||
//
|
||||
this.separatorComboBox.Enabled = false;
|
||||
this.separatorComboBox.FormattingEnabled = true;
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(108, 181);
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(108, 203);
|
||||
this.separatorComboBox.Name = "separatorComboBox";
|
||||
this.separatorComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.separatorComboBox.TabIndex = 16;
|
||||
this.separatorComboBox.TabIndex = 18;
|
||||
//
|
||||
// selectItemsButton
|
||||
//
|
||||
this.selectItemsButton.Enabled = false;
|
||||
this.selectItemsButton.Location = new System.Drawing.Point(108, 203);
|
||||
this.selectItemsButton.Location = new System.Drawing.Point(108, 225);
|
||||
this.selectItemsButton.Name = "selectItemsButton";
|
||||
this.selectItemsButton.Size = new System.Drawing.Size(145, 23);
|
||||
this.selectItemsButton.TabIndex = 20;
|
||||
@@ -238,17 +240,37 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
// goodOnlyCheckBox
|
||||
//
|
||||
this.goodOnlyCheckBox.AutoSize = true;
|
||||
this.goodOnlyCheckBox.Location = new System.Drawing.Point(20, 207);
|
||||
this.goodOnlyCheckBox.Location = new System.Drawing.Point(20, 229);
|
||||
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
|
||||
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
|
||||
this.goodOnlyCheckBox.TabIndex = 17;
|
||||
this.goodOnlyCheckBox.TabIndex = 19;
|
||||
this.goodOnlyCheckBox.Text = "Good only";
|
||||
this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cultureComboBox
|
||||
//
|
||||
this.cultureComboBox.Enabled = false;
|
||||
this.cultureComboBox.FormattingEnabled = true;
|
||||
this.cultureComboBox.Location = new System.Drawing.Point(108, 181);
|
||||
this.cultureComboBox.Name = "cultureComboBox";
|
||||
this.cultureComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.cultureComboBox.TabIndex = 16;
|
||||
//
|
||||
// cultureLabel
|
||||
//
|
||||
this.cultureLabel.AutoSize = true;
|
||||
this.cultureLabel.Location = new System.Drawing.Point(17, 184);
|
||||
this.cultureLabel.Name = "cultureLabel";
|
||||
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.cultureLabel.TabIndex = 15;
|
||||
this.cultureLabel.Text = "Cullture";
|
||||
//
|
||||
// WriterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.cultureComboBox);
|
||||
this.Controls.Add(this.cultureLabel);
|
||||
this.Controls.Add(this.goodOnlyCheckBox);
|
||||
this.Controls.Add(this.fileNameFmtTextBox);
|
||||
this.Controls.Add(this.fileNameFmtLabel);
|
||||
@@ -271,7 +293,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "WriterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 230);
|
||||
this.Size = new System.Drawing.Size(300, 282);
|
||||
this.Load += new System.EventHandler(this.WriterCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
@@ -301,5 +323,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
private System.Windows.Forms.TextBox fileNameFmtTextBox;
|
||||
private System.Windows.Forms.Label fileNameFmtLabel;
|
||||
private System.Windows.Forms.CheckBox goodOnlyCheckBox;
|
||||
private System.Windows.Forms.ComboBox cultureComboBox;
|
||||
private System.Windows.Forms.Label cultureLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
@@ -93,8 +94,9 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
writerCfg.MonthFolders = newCfg.MonthFolders;
|
||||
writerCfg.DayFolders = newCfg.DayFolders;
|
||||
writerCfg.FileNameFormat = newCfg.FileNameFormat;
|
||||
writerCfg.Separator = newCfg.Separator;
|
||||
writerCfg.EliminateSpaces = newCfg.EliminateSpaces;
|
||||
writerCfg.Culture = newCfg.Culture;
|
||||
writerCfg.Separator = newCfg.Separator;
|
||||
writerCfg.EliminateSpaces = newCfg.EliminateSpaces;
|
||||
writerCfg.CommonItems = newCfg.CommonItems;
|
||||
writerCfg.SelectedItems = newCfg.SelectedItems;
|
||||
writerCfg.Header = newCfg.Header;
|
||||
@@ -221,6 +223,12 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
completed2 = true;
|
||||
});
|
||||
|
||||
if (writerCfg.Culture > Culture.system && writerCfg.Culture < Culture.Count)
|
||||
{
|
||||
thread1.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
|
||||
thread2.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -286,7 +294,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
foreach (var v in commonItems)
|
||||
{
|
||||
leftColumn[cnt] = v.Caption;
|
||||
rightColumn[cnt] = v.Print(batch.WaterMeters[0]);
|
||||
rightColumn[cnt] = (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
public MonthFolders MonthFolders;
|
||||
public DayFolders DayFolders;
|
||||
public string FileNameFormat;
|
||||
public Culture Culture;
|
||||
public Separator Separator;
|
||||
public bool EliminateSpaces;
|
||||
public string[] CommonItems;
|
||||
|
||||
@@ -42,15 +42,11 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
|
||||
private void WriterCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
|
||||
for (YearFolders s = 0; s < YearFolders.Count; s++) yearFoldersComboBox.Items.Add(s.ToString());
|
||||
for (MonthFolders s = 0; s < MonthFolders.Count; s++) monthFoldersComboBox.Items.Add(s.ToString());
|
||||
for (DayFolders s = 0; s < DayFolders.Count; s++) dayFoldersComboBox.Items.Add(s.ToString());
|
||||
|
||||
for (int i = 0; i < (int)Separator.Count; i++)
|
||||
{
|
||||
separatorComboBox.Items.Add(((Separator)i).ToString());
|
||||
}
|
||||
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
|
||||
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
|
||||
|
||||
header = config.Header;
|
||||
commonItems = config.CommonItems;
|
||||
@@ -69,6 +65,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
monthFoldersLabel.Text = "Month folders";
|
||||
dayFoldersLabel.Text = "Day folders";
|
||||
fileNameFmtLabel.Text = "File name format";
|
||||
cultureLabel.Text = "Culture";
|
||||
separatorLabel.Text = "Separator";
|
||||
eliminateSpacesCheckBox.Text = "No spaces";
|
||||
headerButton.Text = Strings.Header;
|
||||
@@ -93,7 +90,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
monthFoldersComboBox.Text = config.MonthFolders.ToString();
|
||||
dayFoldersComboBox.Text = config.DayFolders.ToString();
|
||||
fileNameFmtTextBox.Text = config.FileNameFormat;
|
||||
separatorComboBox.Text = config.Separator.ToString();
|
||||
cultureComboBox.Text = config.Culture.ToString();
|
||||
separatorComboBox.Text = config.Separator.ToString();
|
||||
eliminateSpacesCheckBox.Checked = config.EliminateSpaces;
|
||||
}
|
||||
|
||||
@@ -108,7 +106,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
monthFoldersComboBox.Enabled = true;
|
||||
dayFoldersComboBox.Enabled = true;
|
||||
fileNameFmtTextBox.Enabled = true;
|
||||
separatorComboBox.Enabled = true;
|
||||
cultureComboBox.Enabled = true;
|
||||
separatorComboBox.Enabled = true;
|
||||
eliminateSpacesCheckBox.Enabled = true;
|
||||
headerButton.Enabled = true;
|
||||
commonItemsButton.Enabled = true;
|
||||
@@ -138,6 +137,12 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
message += Environment.NewLine + "Invalid day folder selection";
|
||||
}
|
||||
|
||||
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid culture";
|
||||
}
|
||||
|
||||
if (!separatorComboBox.Items.Contains(separatorComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
@@ -208,6 +213,15 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
for (Culture i = 0; i < Culture.Count; i++)
|
||||
{
|
||||
if (i.ToString().Equals(cultureComboBox.Text) && (config.Culture != i))
|
||||
{
|
||||
config.Culture = i;
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (Separator i = 0; i < Separator.Count; i++)
|
||||
{
|
||||
|
||||
+57
-33
@@ -56,12 +56,14 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
this.footerButton = new System.Windows.Forms.Button();
|
||||
this.commonItemsButton = new System.Windows.Forms.Button();
|
||||
this.upgradeWizardButton = new System.Windows.Forms.Button();
|
||||
this.cultureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.cultureLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(108, 31);
|
||||
this.nameTextBox.Location = new System.Drawing.Point(108, 28);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(146, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
@@ -69,7 +71,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(17, 34);
|
||||
this.nameLabel.Location = new System.Drawing.Point(17, 31);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
@@ -78,7 +80,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(105, 9);
|
||||
this.classNameLabel.Location = new System.Drawing.Point(105, 6);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
@@ -87,7 +89,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// destinationTextBox
|
||||
//
|
||||
this.destinationTextBox.Enabled = false;
|
||||
this.destinationTextBox.Location = new System.Drawing.Point(108, 52);
|
||||
this.destinationTextBox.Location = new System.Drawing.Point(108, 49);
|
||||
this.destinationTextBox.Name = "destinationTextBox";
|
||||
this.destinationTextBox.Size = new System.Drawing.Size(146, 20);
|
||||
this.destinationTextBox.TabIndex = 4;
|
||||
@@ -95,7 +97,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// destinationLabel
|
||||
//
|
||||
this.destinationLabel.AutoSize = true;
|
||||
this.destinationLabel.Location = new System.Drawing.Point(17, 55);
|
||||
this.destinationLabel.Location = new System.Drawing.Point(17, 52);
|
||||
this.destinationLabel.Name = "destinationLabel";
|
||||
this.destinationLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.destinationLabel.TabIndex = 3;
|
||||
@@ -104,7 +106,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// destinationButton
|
||||
//
|
||||
this.destinationButton.Enabled = false;
|
||||
this.destinationButton.Location = new System.Drawing.Point(269, 52);
|
||||
this.destinationButton.Location = new System.Drawing.Point(269, 49);
|
||||
this.destinationButton.Name = "destinationButton";
|
||||
this.destinationButton.Size = new System.Drawing.Size(30, 20);
|
||||
this.destinationButton.TabIndex = 5;
|
||||
@@ -115,28 +117,28 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// separatorLabel
|
||||
//
|
||||
this.separatorLabel.AutoSize = true;
|
||||
this.separatorLabel.Location = new System.Drawing.Point(17, 184);
|
||||
this.separatorLabel.Location = new System.Drawing.Point(17, 203);
|
||||
this.separatorLabel.Name = "separatorLabel";
|
||||
this.separatorLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.separatorLabel.TabIndex = 17;
|
||||
this.separatorLabel.TabIndex = 19;
|
||||
this.separatorLabel.Text = "Separator";
|
||||
//
|
||||
// separatorComboBox
|
||||
//
|
||||
this.separatorComboBox.Enabled = false;
|
||||
this.separatorComboBox.FormattingEnabled = true;
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(108, 181);
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(108, 200);
|
||||
this.separatorComboBox.Name = "separatorComboBox";
|
||||
this.separatorComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.separatorComboBox.TabIndex = 18;
|
||||
this.separatorComboBox.TabIndex = 20;
|
||||
//
|
||||
// testItemsButton
|
||||
//
|
||||
this.testItemsButton.Enabled = false;
|
||||
this.testItemsButton.Location = new System.Drawing.Point(108, 278);
|
||||
this.testItemsButton.Location = new System.Drawing.Point(108, 297);
|
||||
this.testItemsButton.Name = "testItemsButton";
|
||||
this.testItemsButton.Size = new System.Drawing.Size(146, 23);
|
||||
this.testItemsButton.TabIndex = 22;
|
||||
this.testItemsButton.TabIndex = 24;
|
||||
this.testItemsButton.Text = "Test items";
|
||||
this.testItemsButton.UseVisualStyleBackColor = true;
|
||||
this.testItemsButton.Click += new System.EventHandler(this.testItemsButton_Click);
|
||||
@@ -144,7 +146,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// yearFoldersLabel
|
||||
//
|
||||
this.yearFoldersLabel.AutoSize = true;
|
||||
this.yearFoldersLabel.Location = new System.Drawing.Point(17, 97);
|
||||
this.yearFoldersLabel.Location = new System.Drawing.Point(17, 94);
|
||||
this.yearFoldersLabel.Name = "yearFoldersLabel";
|
||||
this.yearFoldersLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.yearFoldersLabel.TabIndex = 9;
|
||||
@@ -153,7 +155,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// monthFoldersLabel
|
||||
//
|
||||
this.monthFoldersLabel.AutoSize = true;
|
||||
this.monthFoldersLabel.Location = new System.Drawing.Point(17, 119);
|
||||
this.monthFoldersLabel.Location = new System.Drawing.Point(17, 116);
|
||||
this.monthFoldersLabel.Name = "monthFoldersLabel";
|
||||
this.monthFoldersLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.monthFoldersLabel.TabIndex = 11;
|
||||
@@ -162,7 +164,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// dayFoldersLabel
|
||||
//
|
||||
this.dayFoldersLabel.AutoSize = true;
|
||||
this.dayFoldersLabel.Location = new System.Drawing.Point(17, 141);
|
||||
this.dayFoldersLabel.Location = new System.Drawing.Point(17, 138);
|
||||
this.dayFoldersLabel.Name = "dayFoldersLabel";
|
||||
this.dayFoldersLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.dayFoldersLabel.TabIndex = 13;
|
||||
@@ -172,7 +174,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
//
|
||||
this.yearFoldersComboBox.Enabled = false;
|
||||
this.yearFoldersComboBox.FormattingEnabled = true;
|
||||
this.yearFoldersComboBox.Location = new System.Drawing.Point(108, 94);
|
||||
this.yearFoldersComboBox.Location = new System.Drawing.Point(108, 91);
|
||||
this.yearFoldersComboBox.Name = "yearFoldersComboBox";
|
||||
this.yearFoldersComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.yearFoldersComboBox.TabIndex = 10;
|
||||
@@ -181,7 +183,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
//
|
||||
this.monthFoldersComboBox.Enabled = false;
|
||||
this.monthFoldersComboBox.FormattingEnabled = true;
|
||||
this.monthFoldersComboBox.Location = new System.Drawing.Point(108, 116);
|
||||
this.monthFoldersComboBox.Location = new System.Drawing.Point(108, 113);
|
||||
this.monthFoldersComboBox.Name = "monthFoldersComboBox";
|
||||
this.monthFoldersComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.monthFoldersComboBox.TabIndex = 12;
|
||||
@@ -190,7 +192,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
//
|
||||
this.dayFoldersComboBox.Enabled = false;
|
||||
this.dayFoldersComboBox.FormattingEnabled = true;
|
||||
this.dayFoldersComboBox.Location = new System.Drawing.Point(108, 138);
|
||||
this.dayFoldersComboBox.Location = new System.Drawing.Point(108, 135);
|
||||
this.dayFoldersComboBox.Name = "dayFoldersComboBox";
|
||||
this.dayFoldersComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.dayFoldersComboBox.TabIndex = 14;
|
||||
@@ -198,7 +200,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// destination2Button
|
||||
//
|
||||
this.destination2Button.Enabled = false;
|
||||
this.destination2Button.Location = new System.Drawing.Point(269, 73);
|
||||
this.destination2Button.Location = new System.Drawing.Point(269, 70);
|
||||
this.destination2Button.Name = "destination2Button";
|
||||
this.destination2Button.Size = new System.Drawing.Size(30, 20);
|
||||
this.destination2Button.TabIndex = 8;
|
||||
@@ -208,7 +210,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// destination2TextBox
|
||||
//
|
||||
this.destination2TextBox.Enabled = false;
|
||||
this.destination2TextBox.Location = new System.Drawing.Point(108, 73);
|
||||
this.destination2TextBox.Location = new System.Drawing.Point(108, 70);
|
||||
this.destination2TextBox.Name = "destination2TextBox";
|
||||
this.destination2TextBox.Size = new System.Drawing.Size(146, 20);
|
||||
this.destination2TextBox.TabIndex = 7;
|
||||
@@ -216,7 +218,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// destination2Label
|
||||
//
|
||||
this.destination2Label.AutoSize = true;
|
||||
this.destination2Label.Location = new System.Drawing.Point(17, 76);
|
||||
this.destination2Label.Location = new System.Drawing.Point(17, 73);
|
||||
this.destination2Label.Name = "destination2Label";
|
||||
this.destination2Label.Size = new System.Drawing.Size(69, 13);
|
||||
this.destination2Label.TabIndex = 6;
|
||||
@@ -225,7 +227,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// fileNameFmtTextBox
|
||||
//
|
||||
this.fileNameFmtTextBox.Enabled = false;
|
||||
this.fileNameFmtTextBox.Location = new System.Drawing.Point(108, 160);
|
||||
this.fileNameFmtTextBox.Location = new System.Drawing.Point(108, 157);
|
||||
this.fileNameFmtTextBox.Name = "fileNameFmtTextBox";
|
||||
this.fileNameFmtTextBox.Size = new System.Drawing.Size(146, 20);
|
||||
this.fileNameFmtTextBox.TabIndex = 16;
|
||||
@@ -233,7 +235,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// fileNameFmtLabel
|
||||
//
|
||||
this.fileNameFmtLabel.AutoSize = true;
|
||||
this.fileNameFmtLabel.Location = new System.Drawing.Point(17, 163);
|
||||
this.fileNameFmtLabel.Location = new System.Drawing.Point(17, 160);
|
||||
this.fileNameFmtLabel.Name = "fileNameFmtLabel";
|
||||
this.fileNameFmtLabel.Size = new System.Drawing.Size(84, 13);
|
||||
this.fileNameFmtLabel.TabIndex = 15;
|
||||
@@ -242,20 +244,20 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// eliminateSpacesCheckBox
|
||||
//
|
||||
this.eliminateSpacesCheckBox.AutoSize = true;
|
||||
this.eliminateSpacesCheckBox.Location = new System.Drawing.Point(108, 208);
|
||||
this.eliminateSpacesCheckBox.Location = new System.Drawing.Point(108, 227);
|
||||
this.eliminateSpacesCheckBox.Name = "eliminateSpacesCheckBox";
|
||||
this.eliminateSpacesCheckBox.Size = new System.Drawing.Size(77, 17);
|
||||
this.eliminateSpacesCheckBox.TabIndex = 19;
|
||||
this.eliminateSpacesCheckBox.TabIndex = 21;
|
||||
this.eliminateSpacesCheckBox.Text = "No spaces";
|
||||
this.eliminateSpacesCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// headerButton
|
||||
//
|
||||
this.headerButton.Enabled = false;
|
||||
this.headerButton.Location = new System.Drawing.Point(108, 228);
|
||||
this.headerButton.Location = new System.Drawing.Point(108, 247);
|
||||
this.headerButton.Name = "headerButton";
|
||||
this.headerButton.Size = new System.Drawing.Size(146, 23);
|
||||
this.headerButton.TabIndex = 20;
|
||||
this.headerButton.TabIndex = 22;
|
||||
this.headerButton.Text = "Header";
|
||||
this.headerButton.UseVisualStyleBackColor = true;
|
||||
this.headerButton.Click += new System.EventHandler(this.headerButton_Click);
|
||||
@@ -263,10 +265,10 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// footerButton
|
||||
//
|
||||
this.footerButton.Enabled = false;
|
||||
this.footerButton.Location = new System.Drawing.Point(108, 303);
|
||||
this.footerButton.Location = new System.Drawing.Point(108, 322);
|
||||
this.footerButton.Name = "footerButton";
|
||||
this.footerButton.Size = new System.Drawing.Size(146, 23);
|
||||
this.footerButton.TabIndex = 23;
|
||||
this.footerButton.TabIndex = 25;
|
||||
this.footerButton.Text = "Footer";
|
||||
this.footerButton.UseVisualStyleBackColor = true;
|
||||
this.footerButton.Click += new System.EventHandler(this.footerButton_Click);
|
||||
@@ -274,28 +276,48 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
// commonItemsButton
|
||||
//
|
||||
this.commonItemsButton.Enabled = false;
|
||||
this.commonItemsButton.Location = new System.Drawing.Point(108, 253);
|
||||
this.commonItemsButton.Location = new System.Drawing.Point(108, 272);
|
||||
this.commonItemsButton.Name = "commonItemsButton";
|
||||
this.commonItemsButton.Size = new System.Drawing.Size(146, 23);
|
||||
this.commonItemsButton.TabIndex = 21;
|
||||
this.commonItemsButton.TabIndex = 23;
|
||||
this.commonItemsButton.Text = "Common items";
|
||||
this.commonItemsButton.UseVisualStyleBackColor = true;
|
||||
this.commonItemsButton.Click += new System.EventHandler(this.commonItemsButton_Click);
|
||||
//
|
||||
// upgradeWizardButton
|
||||
//
|
||||
this.upgradeWizardButton.Location = new System.Drawing.Point(269, 253);
|
||||
this.upgradeWizardButton.Location = new System.Drawing.Point(269, 272);
|
||||
this.upgradeWizardButton.Name = "upgradeWizardButton";
|
||||
this.upgradeWizardButton.Size = new System.Drawing.Size(80, 48);
|
||||
this.upgradeWizardButton.TabIndex = 24;
|
||||
this.upgradeWizardButton.TabIndex = 26;
|
||||
this.upgradeWizardButton.Text = "Upgrade wizard";
|
||||
this.upgradeWizardButton.UseVisualStyleBackColor = true;
|
||||
this.upgradeWizardButton.Click += new System.EventHandler(this.upgradeWizardButton_Click);
|
||||
//
|
||||
// cultureComboBox
|
||||
//
|
||||
this.cultureComboBox.Enabled = false;
|
||||
this.cultureComboBox.FormattingEnabled = true;
|
||||
this.cultureComboBox.Location = new System.Drawing.Point(108, 178);
|
||||
this.cultureComboBox.Name = "cultureComboBox";
|
||||
this.cultureComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.cultureComboBox.TabIndex = 18;
|
||||
//
|
||||
// cultureLabel
|
||||
//
|
||||
this.cultureLabel.AutoSize = true;
|
||||
this.cultureLabel.Location = new System.Drawing.Point(17, 181);
|
||||
this.cultureLabel.Name = "cultureLabel";
|
||||
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.cultureLabel.TabIndex = 17;
|
||||
this.cultureLabel.Text = "Cullture";
|
||||
//
|
||||
// WriterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.cultureComboBox);
|
||||
this.Controls.Add(this.cultureLabel);
|
||||
this.Controls.Add(this.upgradeWizardButton);
|
||||
this.Controls.Add(this.commonItemsButton);
|
||||
this.Controls.Add(this.footerButton);
|
||||
@@ -356,5 +378,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
private System.Windows.Forms.Button footerButton;
|
||||
private System.Windows.Forms.Button commonItemsButton;
|
||||
private System.Windows.Forms.Button upgradeWizardButton;
|
||||
private System.Windows.Forms.ComboBox cultureComboBox;
|
||||
private System.Windows.Forms.Label cultureLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace TBF.BenchControl.Output.FileWriters
|
||||
|
||||
public enum Culture
|
||||
{
|
||||
system,
|
||||
EN,
|
||||
DE,
|
||||
SK,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
@@ -198,7 +199,13 @@ namespace TBF.BenchControl.Output.FileWriters.Xml
|
||||
WriteRslts(batch, writerCfg.DestinationPath2);
|
||||
completed2 = true;
|
||||
});
|
||||
|
||||
|
||||
if (writerCfg.Culture > Culture.system && writerCfg.Culture < Culture.Count)
|
||||
{
|
||||
thread1.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
|
||||
thread2.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
||||
HdrTop = TitleY + 60;
|
||||
BodyTop = HdrTop + 160;
|
||||
|
||||
if (batch.WaterMeters[0].Compound())
|
||||
if (batch.WaterMeters.Count > 0 && batch.WaterMeters[0].Compound())
|
||||
{
|
||||
rsltItems = Results.ItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Printer_CombinedWM);
|
||||
}
|
||||
@@ -100,12 +100,15 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
||||
}
|
||||
|
||||
int testsCount = 0;
|
||||
foreach (var mtr in batch.WaterMeters[0].MeterTestRslts)
|
||||
if (batch.WaterMeters.Count > 0)
|
||||
{
|
||||
if (mtr.Publish() == Config.Entities.Publish.Always) testsCount++;
|
||||
foreach (var mtr in batch.WaterMeters[0].MeterTestRslts)
|
||||
{
|
||||
if (mtr.Publish() == Config.Entities.Publish.Always) testsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (batch.WaterMeters[0].Compound()) testsCount /= 3;
|
||||
if (batch.WaterMeters.Count > 0 && batch.WaterMeters[0].Compound()) testsCount /= 3;
|
||||
|
||||
int wmSectionHeight = (testsCount + 4) * SpacingOne;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace TBF.BenchControl.ResultsPrinters.LabelPrinter
|
||||
|
||||
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
|
||||
|
||||
if (batch.WaterMeters[0].Compound())
|
||||
if (batch.WaterMeters.Count > 0 && batch.WaterMeters[0].Compound())
|
||||
{
|
||||
rsltItems = Results.ItemSpec.FromStrArray(Program.LocalSettings.RsltItems_Printer_CombinedWM);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
using TBF.UiBridge;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Operations;
|
||||
@@ -32,6 +33,7 @@ namespace TBF.BenchControl.Sequences
|
||||
IList<Generic.ITestParams> simultWithEvacuationParams;
|
||||
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
///
|
||||
delegate void iPerlCommFormDlgt(MainSeq myRef, Generic.IComponentCfg cfg, IList<Test> tests, IList<Generic.ITestParams> multiTestParams);
|
||||
@@ -64,7 +66,7 @@ namespace TBF.BenchControl.Sequences
|
||||
log.Fatal("--------------------------------------");
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
void CloseIPerlCommForm()
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
@@ -219,106 +221,67 @@ namespace TBF.BenchControl.Sequences
|
||||
//--------------------------------------------------------------------------------------------
|
||||
select_procedure:
|
||||
|
||||
/// Make sure the CycleBeginForm is closed (after an abnormal procedure/test end, etc.)
|
||||
CloseBeginForm();
|
||||
|
||||
selection = MakeSelection(MKSelContext.ProcedureNotSelected);
|
||||
|
||||
//--------------------------------
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn);
|
||||
StateMachine.LoadProcedure(false);
|
||||
if (StateMachine.Procedure == null) goto select_procedure;
|
||||
CloseBeginForm(); /// Make sure the CycleBeginForm is closed (after an abnormal end, etc.)
|
||||
|
||||
do
|
||||
{
|
||||
selection = MakeSelection(MKSelContext.ProcedureNotSelected);
|
||||
StateMachine.LoadProcedure(false);
|
||||
}
|
||||
while (StateMachine.Procedure == null); /// Make sure a valid procedure is selected
|
||||
|
||||
///
|
||||
/// Procedure selected at this point, a new batch was started
|
||||
///
|
||||
StateMachine.LoadProcedureParams(StateMachine.Procedure);
|
||||
StateMachine.LoadProcedureParams(StateMachine.Procedure);
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Enable STOP button
|
||||
int newBatchNr = Program.LocalSettings.BatchNr;
|
||||
log.FatalFormat("New measurement session started: batch = {0}, procedure = {1}", newBatchNr, StateMachine.Procedure.Name);
|
||||
|
||||
///
|
||||
/// Prepare new water meters
|
||||
///
|
||||
foreach (var wm in WaterMeters) wm.ClearData(); /// Clean water meter data
|
||||
|
||||
bool compound = (StateMachine.Procedure.MetersKind == MetersKind.Combined);
|
||||
bool heatMeters = (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter);
|
||||
int waterMetersCount = Math.Min(WaterMeters.Count, heatMeters ? Config.Data.HeatMetersCount : (compound ? Config.Data.CompoundWMsCount : Config.Data.WMsCount));
|
||||
///
|
||||
Results.Entities.WaterMeterData[] waterMeterData = new Results.Entities.WaterMeterData[waterMetersCount];
|
||||
///
|
||||
int[] waterMeterParts = new int[waterMetersCount];
|
||||
for (int wmNr = 0; wmNr < waterMetersCount; wmNr++)
|
||||
if (selection == Selection.RestoreBatch)
|
||||
{
|
||||
int ix = compound ? (2 * wmNr) : wmNr;
|
||||
|
||||
waterMeterParts[wmNr] = Utils.PartNr(wmNr + 1, compound);
|
||||
waterMeterData[wmNr] = new Results.Entities.WaterMeterData()
|
||||
{
|
||||
ProductName = WaterMeters[ix].ProductName,
|
||||
Producer = WaterMeters[ix].Producer,
|
||||
|
||||
L = WaterMeters[ix].L,
|
||||
DN = WaterMeters[ix].DN,
|
||||
Mounting = WaterMeters[ix].Mounting,
|
||||
|
||||
Q4_Qmax = WaterMeters[ix].Q4_Qmax,
|
||||
Q3_Qn = WaterMeters[ix].Q3_Qn,
|
||||
Q2_Qt = WaterMeters[ix].Q2_Qt,
|
||||
Q1_Qmin = WaterMeters[ix].Q1_Qmin,
|
||||
|
||||
MetrologicalClass = WaterMeters[ix].MetrologicalClass,
|
||||
TemperatureClass = WaterMeters[ix].TemperatureClass,
|
||||
PressureLossClass = WaterMeters[ix].PressureLossClass,
|
||||
MaxAdmissiblePressure = WaterMeters[ix].MaxAdmissiblePressure,
|
||||
FlowProfileSensitivityClass = WaterMeters[ix].FlowProfileSensitivityClass,
|
||||
|
||||
ApprovalInfo = WaterMeters[ix].ApprovalInfo,
|
||||
Certificate = WaterMeters[ix].Certificate,
|
||||
|
||||
PulsesPerLtr = WaterMeters[ix].PulsesPerLtr,
|
||||
|
||||
Text1 = WaterMeters[ix].Text1,
|
||||
Text2 = WaterMeters[ix].Text2,
|
||||
Text3 = WaterMeters[ix].Text3,
|
||||
Text4 = WaterMeters[ix].Text4,
|
||||
Text5 = WaterMeters[ix].Text5,
|
||||
|
||||
Compound = compound,
|
||||
HeatMeter = heatMeters,
|
||||
};
|
||||
|
||||
if (compound)
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
RestoreBatchResults(TBF.UiBridge.Bridge.BatchNr, ref BatchRslts); /// pass the original batch number of the batch to be restored
|
||||
}
|
||||
else if (selection == Selection.Custom)
|
||||
{
|
||||
for (int i = StateMachine.Procedure.Tests.Count - 1; i >= 0; i--)
|
||||
{
|
||||
int auxIx = 2 * wmNr + 1;
|
||||
waterMeterData[wmNr].ProducerAux = WaterMeters[auxIx].Producer;
|
||||
waterMeterData[wmNr].Q3_Qn_Aux = WaterMeters[auxIx].Q3_Qn;
|
||||
waterMeterData[wmNr].MetrologicalClassAux = WaterMeters[auxIx].MetrologicalClass;
|
||||
waterMeterData[wmNr].ApprovalInfoAux = WaterMeters[auxIx].ApprovalInfo;
|
||||
if (StateMachine.Procedure.Tests[i].Name.ToLower().Contains("write") ||
|
||||
StateMachine.Procedure.Tests[i].Name.ToLower().Contains("reset"))
|
||||
{
|
||||
StateMachine.Procedure.Tests.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
#if ORACLE_DB
|
||||
BenchControl.WaterMeters.iPerl.WaterMeter iPerl = WaterMeters[wmNr] as BenchControl.WaterMeters.iPerl.WaterMeter;
|
||||
if (iPerl != null)
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
|
||||
for (int i = StateMachine.Procedure.Tests.Count - 1; i >= 0; i--)
|
||||
{
|
||||
waterMeterData[wmNr].WMTypeId = iPerl.WMType_ID;
|
||||
waterMeterData[wmNr].WMTypeRev = iPerl.WMType_Rev;
|
||||
if (StateMachine.Procedure.Tests[i].Name.ToLower().Contains("adj"))
|
||||
{
|
||||
StateMachine.Procedure.Tests.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Prepare empty results
|
||||
///
|
||||
BatchRslts = Results.BatchResults.NewFromProcedure(Program.LocalSettings.BatchNr,
|
||||
(BenchInfo != null) ? BenchInfo.TestBenchId : 1,
|
||||
Users.GlobalData.CurrentUser.UserName, Users.GlobalData.CurrentUser.Number, Program.Version,
|
||||
StateMachine.Procedure, waterMeterData, waterMeterParts);
|
||||
StateMachine.CycleStartTimeStamp = BatchRslts.Batch.StartTime;
|
||||
|
||||
|
||||
Bridge.OnProcedureSelected(this, new ProcedureSelectedEventArgs(StateMachine.Procedure));
|
||||
|
||||
/// Display 'Cycle Begin Form'
|
||||
if (OpenCycleBeginForm()) goto stop;
|
||||
///
|
||||
/// Display 'Cycle Begin Form' in case of a normal batch (not a restored batch)
|
||||
///
|
||||
if (selection != Selection.RestoreBatch && selection != Selection.Custom)
|
||||
{
|
||||
if (OpenCycleBeginForm()) goto stop;
|
||||
}
|
||||
|
||||
/// Find purge suquences
|
||||
TransitionSequence purgeBegin = null;
|
||||
@@ -335,9 +298,11 @@ namespace TBF.BenchControl.Sequences
|
||||
{
|
||||
goto assume_bench_filled;
|
||||
}
|
||||
else if (selection == Selection.Cycle && benchFilled)
|
||||
else if ((selection == Selection.Cycle && benchFilled) || (selection == Selection.RestoreBatch))
|
||||
{
|
||||
//--------------------------------
|
||||
///
|
||||
/// Always ask a question in case of a restored batch
|
||||
///
|
||||
State.Create("MainSeq : Answer a question")
|
||||
.AddOperation(new Operations.AskYesNoOp(Strings.Fill_with_water))
|
||||
.AddOperation(checkUiOp)
|
||||
@@ -409,6 +374,35 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
|
||||
modelessDlg = null;
|
||||
|
||||
if (selection == Selection.Custom)
|
||||
{
|
||||
/// Load existing data from databases
|
||||
Results.DBase.Databases.Clear();
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.197; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR10")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR10 result database: {0}", exc.Message); }
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.98; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR11")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR11 result database: {0}", exc.Message); }
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.152; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR13")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR13 result database: {0}", exc.Message); }
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.63; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR15")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR15 result database: {0}", exc.Message); }
|
||||
|
||||
for (int i = 0; i < BatchRslts.WaterMeters.Length; i++)
|
||||
{
|
||||
WaterMeter newWM = BatchRslts.WaterMeters[i];
|
||||
for (int j = 0; j < Results.DBase.Count; j++)
|
||||
{
|
||||
NHibernate.ISession session = Results.DBase.Databases[j].OpenSession();
|
||||
|
||||
IList<WaterMeter> watermeters = session.QueryOver<WaterMeter>().Where(x => (x.SerialNr == newWM.SerialNr)).List();
|
||||
if (watermeters.Count > 0)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].CopyContentFrom(watermeters[watermeters.Count - 1]); /// Copy results from the last occurance of the watermeter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -417,7 +411,7 @@ namespace TBF.BenchControl.Sequences
|
||||
benchFilled = true;
|
||||
Bridge.Bench2UI(ButtonsEtc.ShowBenchFilled);
|
||||
|
||||
if (selection != Selection.PurgeBegin)
|
||||
if (selection != Selection.PurgeBegin && selection != Selection.RestoreBatch && selection != Selection.Custom)
|
||||
{
|
||||
goto cycle_or_test_selected;
|
||||
}
|
||||
@@ -903,11 +897,13 @@ namespace TBF.BenchControl.Sequences
|
||||
summaryResults.Info(TestResult2CsvLine(tr));
|
||||
}
|
||||
|
||||
|
||||
Program.LocalSettings.BatchNr++;
|
||||
Program.LocalSettings.Save();
|
||||
log.FatalFormat("BatchNr = {0} (incremented)", Program.LocalSettings.BatchNr);
|
||||
|
||||
log.FatalFormat("Measurement session saved: batch = {0}, procedure = {1}, next batch nr. = {2}",
|
||||
ProcessData.BatchRslts.Batch.BatchNr,
|
||||
ProcessData.BatchRslts.Batch.ProcedureName,
|
||||
Program.LocalSettings.BatchNr);
|
||||
|
||||
if (simultWithEvacuationCount > 0)
|
||||
{
|
||||
@@ -1040,33 +1036,24 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection done in MakeSelection()
|
||||
/// Return values of MakeSelection()
|
||||
/// </summary>
|
||||
public enum Selection
|
||||
{
|
||||
/// Handled inside MakeSelection()
|
||||
None,
|
||||
DrainTank1,
|
||||
DrainTank2,
|
||||
DrainTank3,
|
||||
CloseTank1,
|
||||
CloseTank2,
|
||||
CloseTank3,
|
||||
CameraTest,
|
||||
|
||||
/// Used as return values
|
||||
Cycle,
|
||||
RestOfCycle,
|
||||
Test,
|
||||
Q1,
|
||||
Q2,
|
||||
Q3,
|
||||
Stop,
|
||||
PurgeBegin,
|
||||
PurgeEnd,
|
||||
public enum Selection
|
||||
{
|
||||
PurgeBegin,
|
||||
PurgeEnd,
|
||||
Break,
|
||||
SaveResults,
|
||||
}
|
||||
Cycle,
|
||||
RestOfCycle,
|
||||
Test,
|
||||
Q1,
|
||||
Q2,
|
||||
Q3,
|
||||
SaveResults,
|
||||
RestoreBatch,
|
||||
Custom,
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Idle loop to make a procedure or test selection.
|
||||
@@ -1074,14 +1061,15 @@ namespace TBF.BenchControl.Sequences
|
||||
/// </summary>
|
||||
/// <param name="context">Context where MakeSelection() is called</param>
|
||||
/// <returns>
|
||||
/// Selection.Cycle
|
||||
/// Selection.PurgeBegin
|
||||
/// Selection.PurgeEnd
|
||||
/// Selection.Break
|
||||
/// Selection.Cycle
|
||||
/// Selection.Test
|
||||
/// Selection.Q1
|
||||
/// Selection.Q2
|
||||
/// Selection.Q3
|
||||
/// Selection.Stop
|
||||
/// Selection.PurgeBegin
|
||||
/// Selection.PurgeEnd
|
||||
/// Selection.SaveResults
|
||||
/// </returns>
|
||||
private Selection MakeSelection(MKSelContext context)
|
||||
{
|
||||
@@ -1096,7 +1084,6 @@ namespace TBF.BenchControl.Sequences
|
||||
DoubleBox mass3 = new DoubleBox();
|
||||
|
||||
IList<Event> e;
|
||||
Selection selection;
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -1130,7 +1117,7 @@ namespace TBF.BenchControl.Sequences
|
||||
(((StateMachine.Scale2 != null) && (StateMachine.DrainValve2 != null) && !draining2) ? ButtonsEtc.DrainTankBtn2En : 0) |
|
||||
(((StateMachine.Scale3 != null) && (StateMachine.DrainValve3 != null) && !draining3) ? ButtonsEtc.DrainTankBtn3En : 0));
|
||||
|
||||
selection = Selection.None;
|
||||
|
||||
State.Create("MainSeq : Select an activity")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation((StateMachine.Scale1 != null) ? StateMachine.Scale1.ReadMassOp(ref mass1) : null)
|
||||
@@ -1141,32 +1128,43 @@ namespace TBF.BenchControl.Sequences
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
else if (e.Contains(Event.UiCmdStop)) selection = Selection.Stop;
|
||||
else if (e.Contains(Event.UiCmdCameraTest)) selection = Selection.CameraTest;
|
||||
else if (e.Contains(Event.UiCmdEmptyTank1)) selection = Selection.DrainTank1;
|
||||
else if (e.Contains(Event.UiCmdEmptyTank2)) selection = Selection.DrainTank2;
|
||||
else if (e.Contains(Event.UiCmdEmptyTank3)) selection = Selection.DrainTank3;
|
||||
else if (draining1 && StateMachine.Scale1.IsEmpty(mass1.Val)) selection = Selection.CloseTank1;
|
||||
else if (draining2 && StateMachine.Scale2.IsEmpty(mass2.Val)) selection = Selection.CloseTank2;
|
||||
else if (draining3 && StateMachine.Scale3.IsEmpty(mass3.Val)) selection = Selection.CloseTank3;
|
||||
else if (e.Contains(Event.UiCmdPurgeBegin)) return Selection.PurgeBegin; /// Value used to branch the code later on
|
||||
else if (e.Contains(Event.UiCmdPurgeEnd)) return Selection.PurgeEnd;
|
||||
else if (e.Contains(Event.UiCmdBreak) && context == MKSelContext.InsideProcedure) return Selection.Break;
|
||||
else if (e.Contains(Event.UiCmdStartTest)) return Selection.Test;
|
||||
else if (e.Contains(Event.UiCmdStartQ1)) return Selection.Q1;
|
||||
else if (e.Contains(Event.UiCmdStartQ2)) return Selection.Q2;
|
||||
else if (e.Contains(Event.UiCmdStartQ3)) return Selection.Q3;
|
||||
else if (e.Contains(Event.UiCmdStartCycle)) return Selection.Cycle;
|
||||
else if (e.Contains(Event.UiCmdAcceptResults)) return Selection.SaveResults;
|
||||
}
|
||||
while (selection == Selection.None);
|
||||
|
||||
/// Handled inside MakeSelection() inside the selection loop
|
||||
if (e.Contains(Event.Error)) break;
|
||||
if (e.Contains(Event.UiCmdStop)) break;
|
||||
if (e.Contains(Event.UiCmdDrainTank1)) break;
|
||||
if (e.Contains(Event.UiCmdDrainTank2)) break;
|
||||
if (e.Contains(Event.UiCmdDrainTank3)) break;
|
||||
if (draining1 && StateMachine.Scale1.IsEmpty(mass1.Val)) break;
|
||||
if (draining2 && StateMachine.Scale2.IsEmpty(mass2.Val)) break;
|
||||
if (draining3 && StateMachine.Scale3.IsEmpty(mass3.Val)) break;
|
||||
|
||||
if (selection == Selection.CameraTest)
|
||||
{
|
||||
CameraTest();
|
||||
/// Quit the selection loop and leave MakeSelection()
|
||||
if (e.Contains(Event.UiCmdBreak) && context == MKSelContext.InsideProcedure) return Selection.Break;
|
||||
if (e.Contains(Event.UiCmdPurgeBegin)) return Selection.PurgeBegin;
|
||||
if (e.Contains(Event.UiCmdPurgeEnd)) return Selection.PurgeEnd;
|
||||
if (e.Contains(Event.UiCmdStartCycle)) return Selection.Cycle;
|
||||
if (e.Contains(Event.UiCmdStartTest)) return Selection.Test;
|
||||
if (e.Contains(Event.UiCmdStartQ1)) return Selection.Q1;
|
||||
if (e.Contains(Event.UiCmdStartQ2)) return Selection.Q2;
|
||||
if (e.Contains(Event.UiCmdStartQ3)) return Selection.Q3;
|
||||
if (e.Contains(Event.UiCmdAcceptResults)) return Selection.SaveResults;
|
||||
if (e.Contains(Event.UiCmdReloadBatch)) return Selection.RestoreBatch;
|
||||
if (e.Contains(Event.UiCmdCustom)) return Selection.Custom;
|
||||
}
|
||||
else if (selection == Selection.Stop)
|
||||
while (true);
|
||||
|
||||
|
||||
if (e.Contains(Event.Error))
|
||||
{
|
||||
///------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Error);
|
||||
///------------------------------------
|
||||
State.Create("MainSeq : ERROR state")
|
||||
.EnterState();
|
||||
while (true) StateMachine.WaitRunDevsRunOps(); /// Endless loop
|
||||
}
|
||||
else if (e.Contains(Event.UiCmdStop))
|
||||
{
|
||||
if (draining1 || draining2 || draining3)
|
||||
{
|
||||
@@ -1182,12 +1180,13 @@ namespace TBF.BenchControl.Sequences
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
draining1 = draining2 = draining3 = false;
|
||||
}
|
||||
selection = Selection.None;
|
||||
}
|
||||
else if ((selection == Selection.DrainTank1) && !draining1)
|
||||
else if (e.Contains(Event.UiCmdDrainTank1) && !draining1)
|
||||
{
|
||||
draining1 = true;
|
||||
///--------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Emptying_tank);
|
||||
///--------------------------------------------
|
||||
Bridge.Bench2UI(((context == MKSelContext.ProcedureNotSelected) ? ButtonsEtc.ProcedureCmbBoxEn : 0) |
|
||||
ButtonsEtc.TestCmbBoxEn | ButtonsEtc.StopBtnEn |
|
||||
(draining2 ? 0 : ButtonsEtc.DrainTankBtn2En) |
|
||||
@@ -1198,10 +1197,12 @@ namespace TBF.BenchControl.Sequences
|
||||
do { e = StateMachine.WaitRunDevsRunOps(); }
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
}
|
||||
else if ((selection == Selection.DrainTank2) && !draining2)
|
||||
else if (e.Contains(Event.UiCmdDrainTank2) && !draining2)
|
||||
{
|
||||
draining2 = true;
|
||||
///--------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Emptying_tank);
|
||||
///--------------------------------------------
|
||||
Bridge.Bench2UI(((context == MKSelContext.ProcedureNotSelected) ? ButtonsEtc.ProcedureCmbBoxEn : 0) |
|
||||
ButtonsEtc.TestCmbBoxEn | ButtonsEtc.StopBtnEn |
|
||||
(draining1 ? 0 : ButtonsEtc.DrainTankBtn1En) |
|
||||
@@ -1212,10 +1213,12 @@ namespace TBF.BenchControl.Sequences
|
||||
do { e = StateMachine.WaitRunDevsRunOps(); }
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
}
|
||||
else if ((selection == Selection.DrainTank3) && !draining3)
|
||||
else if (e.Contains(Event.UiCmdDrainTank3) && !draining3)
|
||||
{
|
||||
draining3 = true;
|
||||
///--------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Emptying_tank);
|
||||
///--------------------------------------------
|
||||
Bridge.Bench2UI(((context == MKSelContext.ProcedureNotSelected) ? ButtonsEtc.ProcedureCmbBoxEn : 0) |
|
||||
ButtonsEtc.TestCmbBoxEn | ButtonsEtc.StopBtnEn |
|
||||
(draining1 ? 0 : ButtonsEtc.DrainTankBtn1En) |
|
||||
@@ -1226,7 +1229,7 @@ namespace TBF.BenchControl.Sequences
|
||||
do { e = StateMachine.WaitRunDevsRunOps(); }
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
}
|
||||
else if (selection == Selection.CloseTank1)
|
||||
else if (draining1 && StateMachine.Scale1.IsEmpty(mass1.Val))
|
||||
{
|
||||
State.Create("MainSeq : Close tank 1")
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.DrainValve1))
|
||||
@@ -1235,7 +1238,7 @@ namespace TBF.BenchControl.Sequences
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
draining1 = false;
|
||||
}
|
||||
else if (selection == Selection.CloseTank2)
|
||||
else if (draining2 && StateMachine.Scale2.IsEmpty(mass2.Val))
|
||||
{
|
||||
State.Create("MainSeq : Close tank 2")
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.DrainValve2))
|
||||
@@ -1244,7 +1247,7 @@ namespace TBF.BenchControl.Sequences
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
draining2 = false;
|
||||
}
|
||||
else if (selection == Selection.CloseTank3)
|
||||
else if (draining3 && StateMachine.Scale3.IsEmpty(mass3.Val))
|
||||
{
|
||||
State.Create("MainSeq : Close tank 3")
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, StateMachine.DrainValve3))
|
||||
@@ -1254,105 +1257,143 @@ namespace TBF.BenchControl.Sequences
|
||||
draining3 = false;
|
||||
}
|
||||
}
|
||||
|
||||
error:
|
||||
Bridge.OnActivity(this, Strings.Error);
|
||||
State.Create("MainSeq : ERROR state")
|
||||
.EnterState();
|
||||
while (true) StateMachine.WaitRunDevsRunOps();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a camera test
|
||||
/// </summary>
|
||||
void CameraTest()
|
||||
{
|
||||
IList<Event> e;
|
||||
|
||||
camera_test:
|
||||
Bridge.OnActivity(this, "Camera test");
|
||||
//---------------------------------------------------------
|
||||
Bridge.Bench2UI(ButtonsEtc.StartTestBtnsEn | ButtonsEtc.StopBtnEn);
|
||||
State.Create("MainSeq : 1 = Grab, 2 = Live, 3 = Focus, Stop = Quit camera test")
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.UiCmdStop)) return;
|
||||
if (e.Contains(Event.UiCmdStartQ1)) goto grab;
|
||||
if (e.Contains(Event.UiCmdStartQ2)) goto live;
|
||||
if (e.Contains(Event.UiCmdStartQ3)) goto focus;
|
||||
}
|
||||
while (true);
|
||||
|
||||
grab:
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn);
|
||||
State.Create("MainSeq : Press 'Stop' to continue")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation((Cameras.Count > 0 && Cameras[0] != null && (Cameras[0].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[0].GrabImageOp() : null)
|
||||
.AddOperation((Cameras.Count > 1 && Cameras[1] != null && (Cameras[1].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[1].GrabImageOp() : null)
|
||||
.AddOperation((Cameras.Count > 2 && Cameras[2] != null && (Cameras[2].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[2].GrabImageOp() : null)
|
||||
.AddOperation((Cameras.Count > 3 && Cameras[3] != null && (Cameras[3].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[3].GrabImageOp() : null)
|
||||
.AddOperation((Cameras.Count > 4 && Cameras[4] != null && (Cameras[4].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[4].GrabImageOp() : null)
|
||||
.AddOperation((Cameras.Count > 5 && Cameras[5] != null && (Cameras[5].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[5].GrabImageOp() : null)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.UiCmdStop)) goto camera_test;
|
||||
}
|
||||
while (true);
|
||||
|
||||
live:
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn);
|
||||
State.Create("MainSeq : Press 'Stop' to stop.")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation((Cameras.Count > 0 && Cameras[0] != null && (Cameras[0].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[0].LiveStreamOp(false) : null)
|
||||
.AddOperation((Cameras.Count > 1 && Cameras[1] != null && (Cameras[1].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[1].LiveStreamOp(false) : null)
|
||||
.AddOperation((Cameras.Count > 2 && Cameras[2] != null && (Cameras[2].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[2].LiveStreamOp(false) : null)
|
||||
.AddOperation((Cameras.Count > 3 && Cameras[3] != null && (Cameras[3].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[3].LiveStreamOp(false) : null)
|
||||
.AddOperation((Cameras.Count > 4 && Cameras[4] != null && (Cameras[4].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[4].LiveStreamOp(false) : null)
|
||||
.AddOperation((Cameras.Count > 5 && Cameras[5] != null && (Cameras[5].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[5].LiveStreamOp(false) : null)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.UiCmdStop)) goto camera_test;
|
||||
}
|
||||
while (true);
|
||||
|
||||
focus:
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn);
|
||||
State.Create("MainSeq : Press 'Stop' to stop.")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation((Cameras.Count > 0 && Cameras[0] != null && (Cameras[0].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[0].LiveStreamOp(true) : null)
|
||||
.AddOperation((Cameras.Count > 1 && Cameras[1] != null && (Cameras[1].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[1].LiveStreamOp(true) : null)
|
||||
.AddOperation((Cameras.Count > 2 && Cameras[2] != null && (Cameras[2].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[2].LiveStreamOp(true) : null)
|
||||
.AddOperation((Cameras.Count > 3 && Cameras[3] != null && (Cameras[3].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[3].LiveStreamOp(true) : null)
|
||||
.AddOperation((Cameras.Count > 4 && Cameras[4] != null && (Cameras[4].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[4].LiveStreamOp(true) : null)
|
||||
.AddOperation((Cameras.Count > 5 && Cameras[5] != null && (Cameras[5].Cfg.DebugLevel != DebugMode.DetectedOff)) ? Cameras[5].LiveStreamOp(true) : null)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.UiCmdStop)) goto camera_test;
|
||||
}
|
||||
while (true);
|
||||
|
||||
error:
|
||||
Bridge.OnActivity(this, Strings.Error);
|
||||
State.Create("MainSeq : ERROR state")
|
||||
.EnterState();
|
||||
while (true) StateMachine.WaitRunDevsRunOps();
|
||||
}
|
||||
|
||||
|
||||
void CollectSimultSteps()
|
||||
/// <summary>
|
||||
/// Create a new empty batch results from the procedure
|
||||
/// </summary>
|
||||
/// <param name="newBatchNr">New batch number</param>
|
||||
/// <param name="procedure">Selected procedure</param>
|
||||
/// <returns>Created BatchResults</returns>
|
||||
Results.BatchResults CreateNewBatchResults(int newBatchNr, Procedure procedure)
|
||||
{
|
||||
///
|
||||
/// Prepare new water meters
|
||||
///
|
||||
foreach (var wm in WaterMeters) wm.ClearData(); /// Clean water meter data
|
||||
|
||||
bool compound = (StateMachine.Procedure.MetersKind == MetersKind.Combined);
|
||||
bool heatMeters = (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter);
|
||||
int waterMetersCount = Math.Min(WaterMeters.Count, heatMeters ? Config.Data.HeatMetersCount : (compound ? Config.Data.CompoundWMsCount : Config.Data.WMsCount));
|
||||
///
|
||||
Results.Entities.WaterMeterData[] waterMeterData = new Results.Entities.WaterMeterData[waterMetersCount];
|
||||
///
|
||||
int[] waterMeterParts = new int[waterMetersCount];
|
||||
for (int wmNr = 0; wmNr < waterMetersCount; wmNr++)
|
||||
{
|
||||
int ix = compound ? (2 * wmNr) : wmNr;
|
||||
|
||||
waterMeterParts[wmNr] = Utils.PartNr(wmNr + 1, compound);
|
||||
waterMeterData[wmNr] = new Results.Entities.WaterMeterData()
|
||||
{
|
||||
ProductName = WaterMeters[ix].ProductName,
|
||||
Producer = WaterMeters[ix].Producer,
|
||||
|
||||
L = WaterMeters[ix].L,
|
||||
DN = WaterMeters[ix].DN,
|
||||
Mounting = WaterMeters[ix].Mounting,
|
||||
|
||||
Q4_Qmax = WaterMeters[ix].Q4_Qmax,
|
||||
Q3_Qn = WaterMeters[ix].Q3_Qn,
|
||||
Q2_Qt = WaterMeters[ix].Q2_Qt,
|
||||
Q1_Qmin = WaterMeters[ix].Q1_Qmin,
|
||||
|
||||
MetrologicalClass = WaterMeters[ix].MetrologicalClass,
|
||||
TemperatureClass = WaterMeters[ix].TemperatureClass,
|
||||
PressureLossClass = WaterMeters[ix].PressureLossClass,
|
||||
MaxAdmissiblePressure = WaterMeters[ix].MaxAdmissiblePressure,
|
||||
FlowProfileSensitivityClass = WaterMeters[ix].FlowProfileSensitivityClass,
|
||||
|
||||
ApprovalInfo = WaterMeters[ix].ApprovalInfo,
|
||||
Certificate = WaterMeters[ix].Certificate,
|
||||
|
||||
PulsesPerLtr = WaterMeters[ix].PulsesPerLtr,
|
||||
|
||||
Text1 = WaterMeters[ix].Text1,
|
||||
Text2 = WaterMeters[ix].Text2,
|
||||
Text3 = WaterMeters[ix].Text3,
|
||||
Text4 = WaterMeters[ix].Text4,
|
||||
Text5 = WaterMeters[ix].Text5,
|
||||
|
||||
Compound = compound,
|
||||
HeatMeter = heatMeters,
|
||||
};
|
||||
|
||||
if (compound)
|
||||
{
|
||||
int auxIx = 2 * wmNr + 1;
|
||||
waterMeterData[wmNr].ProducerAux = WaterMeters[auxIx].Producer;
|
||||
waterMeterData[wmNr].Q3_Qn_Aux = WaterMeters[auxIx].Q3_Qn;
|
||||
waterMeterData[wmNr].MetrologicalClassAux = WaterMeters[auxIx].MetrologicalClass;
|
||||
waterMeterData[wmNr].ApprovalInfoAux = WaterMeters[auxIx].ApprovalInfo;
|
||||
}
|
||||
|
||||
#if ORACLE_DB
|
||||
BenchControl.WaterMeters.iPerl.WaterMeter iPerl = WaterMeters[wmNr] as BenchControl.WaterMeters.iPerl.WaterMeter;
|
||||
if (iPerl != null)
|
||||
{
|
||||
waterMeterData[wmNr].WMTypeId = iPerl.WMType_ID;
|
||||
waterMeterData[wmNr].WMTypeRev = iPerl.WMType_Rev;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Prepare empty results
|
||||
return Results.BatchResults.NewFromProcedure(newBatchNr,
|
||||
(BenchInfo != null) ? BenchInfo.TestBenchId : 1,
|
||||
Users.GlobalData.CurrentUser.UserName,
|
||||
Users.GlobalData.CurrentUser.Number,
|
||||
Program.Version,
|
||||
StateMachine.Procedure,
|
||||
waterMeterData,
|
||||
waterMeterParts);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reload batch results from Results database given the batch number
|
||||
/// </summary>
|
||||
/// <param name="oriBatchNr">Original batch number</param>
|
||||
/// <param name="newBatchNr">New unique batch number</param>
|
||||
/// <param name="procedure">Reloaded procedure</param>
|
||||
/// <returns></returns>
|
||||
void RestoreBatchResults(int oriBatchNr, ref Results.BatchResults batchResults)
|
||||
{
|
||||
Batch oriBatch = Results.DB.LoadBatch(oriBatchNr);
|
||||
|
||||
batchResults.Batch.StartTime = oriBatch.StartTime;
|
||||
|
||||
foreach (var testRslt in batchResults.Batch.TestRslts)
|
||||
{
|
||||
foreach (var oriTstRslt in oriBatch.TestRslts)
|
||||
{
|
||||
if (testRslt.Name() == oriTstRslt.Name() &&
|
||||
testRslt.Part == oriTstRslt.Part &&
|
||||
testRslt.RepetitionNr == oriTstRslt.RepetitionNr)
|
||||
{
|
||||
testRslt.CopyContentFrom(oriTstRslt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < batchResults.WaterMeters.Length; i++)
|
||||
{
|
||||
WaterMeter wm = batchResults.WaterMeters[i];
|
||||
foreach (var wm2 in oriBatch.WaterMeters)
|
||||
{
|
||||
if (wm.WMPosition == wm2.WMPosition)
|
||||
{
|
||||
wm.CopyContentFrom(wm2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CollectSimultSteps()
|
||||
{
|
||||
///
|
||||
/// Collect steps (e.g. iPerl communication) to be done simultaneously with purging
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace TBF.BenchControl.Sequences
|
||||
/// Empties the tank: opens the emptying valve and measures the weight.
|
||||
/// </summary>
|
||||
/// <param name="drainValve">Valve to empty the tank</param>
|
||||
/// <param name="scale">Balance underneath the tank</param>
|
||||
/// <param name="scale">Scale underneath the tank</param>
|
||||
/// <returns>Event.Done or Event.Error</returns>
|
||||
protected Event DrainTheTank(IValve drainValve, IScale scale, IList<IOperation> extraOperations)
|
||||
{
|
||||
@@ -241,7 +241,7 @@ namespace TBF.BenchControl.Sequences
|
||||
//
|
||||
// Quit emptying
|
||||
//
|
||||
State.Create("SequenceBase : Drain valve closed")
|
||||
State.Create("SequenceBase : Closing the drain valve")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
@@ -251,13 +251,13 @@ namespace TBF.BenchControl.Sequences
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error))
|
||||
return Event.Error;
|
||||
if (e.Contains(Event.Error)) return Event.Error;
|
||||
if (TestAndLogUiCmdStop(e)) return Event.UiCmdStop;
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet) || !e.Contains(Event.BalanceDone));
|
||||
|
||||
|
||||
State.Create("SequenceBase : Updating the weight")
|
||||
State.Create("SequenceBase : Updating the mass")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(new Operations.TimerOp(5))
|
||||
@@ -267,9 +267,9 @@ namespace TBF.BenchControl.Sequences
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error))
|
||||
return Event.Error;
|
||||
}
|
||||
if (e.Contains(Event.Error)) return Event.Error;
|
||||
if (TestAndLogUiCmdStop(e)) return Event.UiCmdStop;
|
||||
}
|
||||
while (!e.Contains(Event.BalanceDone) || !e.Contains(Event.TimerExpired));
|
||||
|
||||
|
||||
@@ -485,18 +485,18 @@ namespace TBF.BenchControl.Sequences
|
||||
switch (step.EndCondition)
|
||||
{
|
||||
case StepCondition.Scale1Empty:
|
||||
endContitionFulfilled = (StateMachine.Balance1 == null) || StateMachine.Balance1.IsEmpty();
|
||||
endContitionFulfilled = (StateMachine.Scale1 == null) || StateMachine.Scale1.IsEmpty();
|
||||
break;
|
||||
case StepCondition.Scale2Empty:
|
||||
endContitionFulfilled = (StateMachine.Balance2 == null) || StateMachine.Balance2.IsEmpty();
|
||||
endContitionFulfilled = (StateMachine.Scale2 == null) || StateMachine.Scale2.IsEmpty();
|
||||
break;
|
||||
case StepCondition.Scale3Empty:
|
||||
endContitionFulfilled = (StateMachine.Balance3 == null) || StateMachine.Balance3.IsEmpty();
|
||||
endContitionFulfilled = (StateMachine.Scale3 == null) || StateMachine.Scale3.IsEmpty();
|
||||
break;
|
||||
case StepCondition.AllScalesEmpty:
|
||||
endContitionFulfilled = ((StateMachine.Balance1 == null) || StateMachine.Balance1.IsEmpty()) &&
|
||||
((StateMachine.Balance2 == null) || StateMachine.Balance2.IsEmpty()) &&
|
||||
((StateMachine.Balance3 == null) || StateMachine.Balance3.IsEmpty());
|
||||
endContitionFulfilled = ((StateMachine.Scale1 == null) || StateMachine.Scale1.IsEmpty()) &&
|
||||
((StateMachine.Scale2 == null) || StateMachine.Scale2.IsEmpty()) &&
|
||||
((StateMachine.Scale3 == null) || StateMachine.Scale3.IsEmpty());
|
||||
break;
|
||||
}
|
||||
*/
|
||||
@@ -772,9 +772,9 @@ namespace TBF.BenchControl.Sequences
|
||||
sb.Append(";"); sb.Append("60");
|
||||
sb.Append(";"); sb.Append("0");
|
||||
sb.Append(";"); sb.Append("0");
|
||||
sb.Append(";"); sb.Append(outPath.FlowMeter.Idx1);
|
||||
sb.Append(";"); sb.Append((outPath != null && outPath.FlowMeter != null) ? outPath.FlowMeter.Idx1 : 0);
|
||||
sb.Append(";"); sb.Append(" ");
|
||||
sb.Append(";"); if (outPath.Scale != null) sb.Append(outPath.Scale.Name);
|
||||
sb.Append(";"); sb.Append((outPath != null && outPath.Scale != null) ? outPath.Scale.Name : string.Empty);
|
||||
sb.Append(";"); sb.Append(tstRslt.AmbTempMean);
|
||||
sb.Append(";"); sb.Append(Units.ConvertTo(Unit.mbar, tstRslt.AmbPressMean).ToString("F0")); /// [mbar]
|
||||
sb.Append(";"); sb.Append(tstRslt.AmbHumiMean); /// [%]
|
||||
@@ -823,10 +823,8 @@ namespace TBF.BenchControl.Sequences
|
||||
sb.Append(";"); sb.Append(tstRslt.TestTime); /// t
|
||||
sb.Append(";"); sb.Append(tstRslt.ErrorMaster); /// Eelm . . . chyba etalonu voci komercne pravej hodnote
|
||||
sb.Append(";"); sb.Append(" "); /// Emass . . . chyba druheho etalonu voci komercne pravej hodnote (teraz vynechavame)
|
||||
sb.Append(";"); if (outPath.FlowMeter != null && outPath.FlowMeter.LtrPerPulse != 0)
|
||||
{
|
||||
sb.Append(1.0f / outPath.FlowMeter.LtrPerPulse); /// Const.MID . konstanta eatlonu
|
||||
}
|
||||
sb.Append(";"); sb.Append((outPath != null && outPath.FlowMeter != null && outPath.FlowMeter.LtrPerPulse != 0) ? (1.0f / outPath.FlowMeter.LtrPerPulse) : 0);
|
||||
/// Const.MID . konstanta eatlonu
|
||||
sb.Append(";"); sb.Append(" "); /// Const.MA . . konstanta druheho etalonu
|
||||
sb.Append(";"); sb.Append("0"); /// Time Div Start celkovy cas v [ms]
|
||||
sb.Append(";"); sb.Append("0"); /// Time Div Start1
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
State.Create("Adjustment : Starting the pump")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
do
|
||||
@@ -115,7 +115,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
|
||||
if (test.TimeBeforeFlow > 0)
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
if (!test.Draining) /// Do not skip emptying if test.Emptying==true
|
||||
{
|
||||
//--------------------------------
|
||||
State.Create("CombinedWithDetection : Get the mass of water in the tank")
|
||||
State.Create("CombinedWithDetection : Mesuring mass of water in the tank")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Scale.ReadMassOp(ref Mass))
|
||||
.EnterState();
|
||||
|
||||
@@ -90,10 +90,10 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
//------------------------------------------------
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
///
|
||||
State.Create("Endurance : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
do
|
||||
@@ -106,13 +106,13 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||
//------------------------------------------------
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
State.Create("Endurance : Setting the flow")
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min.
|
||||
.EnterState();
|
||||
@@ -188,7 +188,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
//------------------------------------------------
|
||||
State.Create("Endurance : Starting the test")
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -231,7 +231,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
ClearAllStatistics();
|
||||
|
||||
/// Measurement loop - begin
|
||||
State.Create("Read water meters")
|
||||
State.Create(string.Format("{0}({1}) : Reading watermeters", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(readRegistersOp)
|
||||
@@ -452,9 +452,21 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
Bridge.OnActivity(this, Strings.Endurance_cycle_execution);
|
||||
//------------------------------------------------
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (TestAndLogUiCmdStop(test, e)) { if (retVal == Event.Done) retVal = Event.UiCmdStop; break; }
|
||||
}
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
|
||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||
ClearAllStatistics();
|
||||
|
||||
|
||||
///
|
||||
/// Update CyclePar[] array
|
||||
///
|
||||
@@ -480,7 +492,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
///
|
||||
cBrd.CyclePar = cyclePar;
|
||||
///
|
||||
State.Create("Endurance : Cycle parameters upload")
|
||||
State.Create(string.Format("{0}({1}) : Uploading cycle parameters", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -509,7 +521,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
|
||||
bool stopInProgress = false;
|
||||
///
|
||||
State.Create("Endurance : Cycle execution")
|
||||
State.Create(string.Format("{0}({1}) : Executing the cycle", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp((int)test.TstTime, Event.TimerExpired))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -559,7 +571,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Last_cycle_wait_please);
|
||||
//------------------------------------------------
|
||||
State.Create("Endurance : Extra delay to be sure the last endurance cycle completed")
|
||||
State.Create(string.Format("{0}({1}) : Delay to make sure the last endu.cycle completed", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp((int)(duration / 1000) + 1, Event.TimerExpired))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -612,7 +624,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
/// Quit this sequence ///
|
||||
///----------------------///
|
||||
|
||||
State.Create("Endurance : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
///
|
||||
/// Measure the weight in case there is no unconditional draining
|
||||
///
|
||||
State.Create("FixedStartAdvanced : Measuring the mass of water in the tank")
|
||||
State.Create("FixedStartAdvanced : Measuring mass of water in the tank")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Scale.ReadMassOp(ref Mass))
|
||||
.EnterState();
|
||||
|
||||
+19
-19
@@ -96,7 +96,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
///
|
||||
/// Measure the weight in case there is no unconditional draining
|
||||
///
|
||||
State.Create("FixedStartMassCollection : Measuring the mass of water in the tank")
|
||||
State.Create(string.Format("{0}({1}) : Measuring mass of water in the tank", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
@@ -128,7 +128,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
///
|
||||
/// Make sure the drain valve is closed
|
||||
///
|
||||
State.Create("FixedStartMassCollection : Make sure the drain valve is closed")
|
||||
State.Create(string.Format("{0}({1}) : Make sure the drain valve is closed", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
@@ -156,10 +156,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
///
|
||||
State.Create("FixedStartMassCollection : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
@@ -173,7 +173,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
valvesOpen.Add(inPath.Pump);
|
||||
valvesOpen.Add(outPath.StartValve);
|
||||
///
|
||||
State.Create("FixedStartMassCollection : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Turning pump on", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(valvesOpen, null))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
@@ -208,7 +208,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
|
||||
//--------------------------------
|
||||
State.Create("FixedStartMassCollection : Setting the flow")
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 600)) /// timeout = 10 min.
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
@@ -245,7 +245,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
double Tw_last = 0;
|
||||
double Tc_last = 0;
|
||||
|
||||
State.Create("FixedStartMassCollection : Check temperature stabilized.")
|
||||
State.Create(string.Format("{0}({1}) : Checking if the temperature is stable", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
|
||||
@@ -289,7 +289,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Stopping_flow_for_the_fixed_start);
|
||||
//------------------------------------------------
|
||||
State.Create("FixedStartMassCollection : Closing the start/stop valve before the fixed start test")
|
||||
State.Create(string.Format("{0}({1}) : Closing the start/stop valve before the fixed start test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, outPath.StartValve))
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
|
||||
@@ -353,7 +353,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
Bridge.OnActivity(this, Strings.Enter_water_meter_data);
|
||||
State.Create("FixedStartMassCollection : Enter begin-state")
|
||||
State.Create(string.Format("{0}({1}) : Entering begin-state", test.Method, test.Name))
|
||||
.AddOperation((dataEntryCmpnt as GenericDevices.IHasWMStatesForm).ShowTestStartFormOp())
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
|
||||
@@ -401,7 +401,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
State.Create("FixedStartMassCollection : Measuring the start mass")
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -433,7 +433,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
//------------------------------------------------
|
||||
State.Create("FixedStartMassCollection : Starting the test")
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -458,7 +458,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
while (!e.Contains(Event.MeasurementStarted));
|
||||
|
||||
|
||||
State.Create("FixedStartMassCollection : Opening the start/stop valve at the beginning of the fixed start test")
|
||||
State.Create(string.Format("{0}({1}) : Opening the start/stop valve at the beginning of the fixed start test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -564,7 +564,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
test_completed:
|
||||
|
||||
State.Create("FixedStartMassCollection : Closing the start/stop valve at the end of the fixed start test")
|
||||
State.Create(string.Format("{0}({1}) : Closing the start/stop valve at the end of the fixed start test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -587,7 +587,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
while (e.Contains(Event.ValvesBusy));
|
||||
|
||||
|
||||
State.Create("FixedStartMassCollection : Waiting before 2nd mass measurement")
|
||||
State.Create(string.Format("{0}({1}) : Waiting before 2nd mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -618,7 +618,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
State.Create("FixedStartMassCollection : Measuring the end mass")
|
||||
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -647,7 +647,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
TestEndTime = DateTime.Now;
|
||||
|
||||
|
||||
State.Create("FixedStartMassCollection : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
@@ -671,7 +671,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
Bridge.OnActivity(this, Strings.Enter_water_meter_data);
|
||||
State state = State.Create("FixedStartMassCollection : Enter end-state");
|
||||
State state = State.Create(string.Format("{0}({1}) : Entering the end-state", test.Method, test.Name));
|
||||
if (heatMetersTestParams != null && dataEntryCmpnt is GenericDevices.IHasHeatMtrStatesForm)
|
||||
{
|
||||
state.AddOperation((dataEntryCmpnt as GenericDevices.IHasHeatMtrStatesForm).
|
||||
@@ -981,7 +981,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
/// Quit this sequence ///
|
||||
///----------------------///
|
||||
|
||||
State.Create("FixedStartMassCollection : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
|
||||
@@ -75,11 +75,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, string.Format("Simulating {0}", test.Name));
|
||||
//------------------------------------------------
|
||||
//------------------------------------------------------------------
|
||||
Bridge.OnActivity(this, string.Format("{0} simulation", test.Name));
|
||||
//------------------------------------------------------------------
|
||||
|
||||
State.Create(string.Format("FlyingStart : Simulating {0}", test.Name))
|
||||
State.Create(string.Format("{0}({1}) : Simulating {0}", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -142,10 +142,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
//------------------------------------------------
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
///
|
||||
State.Create("FlyingStart : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
@@ -158,13 +158,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||
//------------------------------------------------
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
State.Create("FlyingStart : Setting the flow")
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min.
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
@@ -202,7 +202,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
double Tw_last = 0;
|
||||
double Tc_last = 0;
|
||||
|
||||
State.Create("FlyingStart : Check temperature stabilized.")
|
||||
State.Create(string.Format("{0}({1}) : Checking if the temperature is stable", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
|
||||
@@ -282,7 +282,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStart : Starting the test")
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -658,7 +658,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
/// Quit this sequence ///
|
||||
///----------------------///
|
||||
|
||||
State.Create("FlyingStart : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
|
||||
+19
-19
@@ -76,10 +76,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, string.Format("Simulating {0}", test.Name));
|
||||
Bridge.OnActivity(this, string.Format("{0} Simulation", test.Name));
|
||||
//------------------------------------------------
|
||||
|
||||
State.Create(string.Format("FlyingStartMassCollection : Simulating {0}", test.Name))
|
||||
State.Create(string.Format("{0}({1}) : Simulation", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -139,7 +139,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
///
|
||||
/// Measure the weight and skip emptying if there is enough room in the tank
|
||||
///
|
||||
State.Create("FlyingStartMassCollection : Checking available tank capacity")
|
||||
State.Create(string.Format("{0}({1}) : Checking available tank capacity", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Scale.ReadMassOp(ref Mass))
|
||||
.EnterState();
|
||||
@@ -169,7 +169,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
drainTheTank = false;
|
||||
#else
|
||||
State.Create("FlyingStartMassCollection : Opening the emptying valve")
|
||||
State.Create(string.Format("{0}({1}) : Opening the emptying valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.Scale.DrainValve, null))
|
||||
.EnterState();
|
||||
@@ -206,10 +206,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
///
|
||||
State.Create("FlyingStartMassCollection : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
@@ -222,12 +222,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
|
||||
if (test.TimePump2StartV > 0)
|
||||
{
|
||||
State.Create("FlyingStartMassCollection : Waiting after the pump started")
|
||||
State.Create(string.Format("{0}({1}) : Waiting after the pump started", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimePump2StartV))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
@@ -247,7 +247,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
if (benchPath.StopBFValve != null)
|
||||
{
|
||||
State.Create("FlyingStartMassCollection : Opening the stop backflow valve")
|
||||
State.Create(string.Format("{0}({1}) : Opening the stop backflow valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(benchPath.StopBFValve, null))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
@@ -265,7 +265,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
if (test.TimeBeforeFlow > 0)
|
||||
{
|
||||
State.Create("FlyingStartMassCollection : Waiting before flow setting process starts")
|
||||
State.Create(string.Format("{0}({1}) : Waiting before flow setting process starts", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeBeforeFlow))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
@@ -288,7 +288,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartMassCollection : Setting the flow")
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min.
|
||||
@@ -327,7 +327,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
double Tw_last = 0;
|
||||
double Tc_last = 0;
|
||||
|
||||
State.Create("FlyingStartMassCollection : Check temperature stabilized.")
|
||||
State.Create(string.Format("{0}({1}) : Check temperature stabilized.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
|
||||
@@ -432,7 +432,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
if (test.TimeFlow2Mass > 0)
|
||||
{
|
||||
State.Create("FlyingStartMassCollection : Waiting before 1st mass measurement")
|
||||
State.Create(string.Format("{0}({1}) : Waiting before 1st mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
|
||||
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
|
||||
@@ -460,7 +460,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
else
|
||||
LogProcessHeaderHeatMeters(processDataLogger, "Start mass");
|
||||
|
||||
State.Create("FlyingStartMassCollection : Measuring the start mass")
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -498,7 +498,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartMassCollection : Starting the test")
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -540,7 +540,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
ClearAllStatistics();
|
||||
|
||||
/// Measurement loop - begin
|
||||
State.Create("Read water meters")
|
||||
State.Create(string.Format("{0}({1}) : Reading watermeters", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(readRegistersOp)
|
||||
@@ -631,7 +631,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartMassCollection : Waiting before the 2nd mass measurement")
|
||||
State.Create(string.Format("{0}({1}) : Waiting before the 2nd mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -663,7 +663,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
else
|
||||
LogProcessHeaderHeatMeters(processDataLogger, "End mass");
|
||||
|
||||
State.Create("FlyingStartMassCollection : Measuring the end mass")
|
||||
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -1001,7 +1001,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
/// Quit this sequence ///
|
||||
///----------------------///
|
||||
|
||||
State.Create("FlyingStartMassCollection : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
|
||||
@@ -58,14 +58,14 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
//------------------------------------------------
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
|
||||
State.Create("LeakTest : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
|
||||
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
|
||||
.AddOperation(benchPath.PressMtrDelta == null ? null : benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
do
|
||||
@@ -74,7 +74,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
@@ -89,7 +89,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
{
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(pumpPower);
|
||||
|
||||
State.Create("LeakTest : Setting the water pressure")
|
||||
State.Create(string.Format("{0}({1}) : Setting the water pressure", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -143,7 +143,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
|
||||
//------------------------------------------------
|
||||
State.Create("LeakTest : Maximum water pressure set")
|
||||
State.Create(string.Format("{0}({1}) : Maximum water pressure set", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -178,7 +178,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Closing_valve_Pump_off);
|
||||
//------------------------------------------------
|
||||
State.Create("LeakTest : Closing the valve")
|
||||
State.Create(string.Format("{0}({1}) : Closing the valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.SetValvesOp(null, outPath.StartValve))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -202,7 +202,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
||||
|
||||
State.Create("LeakTest : Closing the valve")
|
||||
State.Create(string.Format("{0}({1}) : Closing the valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.SetValvesOp(null, inPath.Pump))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -233,7 +233,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
//------------------------------------------------
|
||||
State.Create("LeakTest : Starting the test")
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -422,7 +422,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
State.Create("LeakTest : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
|
||||
@@ -59,14 +59,14 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
//------------------------------------------------
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
|
||||
State.Create("PMaxTest : Starting the pump")
|
||||
State.Create(string.Format("{0}({1}) : Starting the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
|
||||
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
|
||||
.AddOperation(benchPath.PressMtrDelta == null ? null : benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
do
|
||||
@@ -75,7 +75,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
while (e.Contains(Event.ValvesBusy) /* || !e.Contains(Event.AllPositionsReached)*/);
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
@@ -90,7 +90,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
{
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(pumpPower);
|
||||
|
||||
State.Create("PMaxTest : Setting the water pressure")
|
||||
State.Create(string.Format("{0}({1}) : Setting the water pressure", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -144,7 +144,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
|
||||
//------------------------------------------------
|
||||
State.Create("PMaxTest : Starting the test")
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
@@ -333,7 +333,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
State.Create("PMaxTest : Stopping diverter, gate, etc.")
|
||||
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StopPreviousOp())
|
||||
.EnterState();
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
||||
///
|
||||
/// Measure the weight and skip emptying if there is enough room in the tank
|
||||
///
|
||||
State.Create("ReferenceFlowmeterCalibration : Measuring the mass of water in the tank")
|
||||
State.Create("ReferenceFlowmeterCalibration : Measuring mass of water in the tank")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Scale.ReadMassOp(ref Mass))
|
||||
.EnterState();
|
||||
|
||||
+124
-124
@@ -28,135 +28,135 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.sendButton = new System.Windows.Forms.Button();
|
||||
this.sentCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.failedCountLabel = new System.Windows.Forms.Label();
|
||||
this.passedCountLabel = new System.Windows.Forms.Label();
|
||||
this.purchaseOrderLabel = new System.Windows.Forms.Label();
|
||||
this.procedureLabel = new System.Windows.Forms.Label();
|
||||
this.endTimeLabel = new System.Windows.Forms.Label();
|
||||
this.startTimeLabel = new System.Windows.Forms.Label();
|
||||
this.batchNrLabel = new System.Windows.Forms.Label();
|
||||
this.showButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// sendButton
|
||||
//
|
||||
this.sendButton.Location = new System.Drawing.Point(832, 2);
|
||||
this.sendButton.Name = "sendButton";
|
||||
this.sendButton.Size = new System.Drawing.Size(104, 23);
|
||||
this.sendButton.TabIndex = 15;
|
||||
this.sendButton.Text = "Again";
|
||||
this.sendButton.UseVisualStyleBackColor = true;
|
||||
this.sendButton.Click += new System.EventHandler(this.sendButton_Click);
|
||||
//
|
||||
// sentCheckBox
|
||||
//
|
||||
this.sentCheckBox.AutoSize = true;
|
||||
this.sentCheckBox.Location = new System.Drawing.Point(748, 6);
|
||||
this.sentCheckBox.Name = "sentCheckBox";
|
||||
this.sentCheckBox.Size = new System.Drawing.Size(48, 17);
|
||||
this.sentCheckBox.TabIndex = 14;
|
||||
this.sentCheckBox.Text = "Sent";
|
||||
this.sentCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// failedCountLabel
|
||||
//
|
||||
this.failedCountLabel.AutoSize = true;
|
||||
this.failedCountLabel.Location = new System.Drawing.Point(681, 7);
|
||||
this.failedCountLabel.Name = "failedCountLabel";
|
||||
this.failedCountLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.failedCountLabel.TabIndex = 13;
|
||||
this.failedCountLabel.Text = "failedCnt";
|
||||
//
|
||||
// passedCountLabel
|
||||
//
|
||||
this.passedCountLabel.AutoSize = true;
|
||||
this.passedCountLabel.Location = new System.Drawing.Point(590, 7);
|
||||
this.passedCountLabel.Name = "passedCountLabel";
|
||||
this.passedCountLabel.Size = new System.Drawing.Size(57, 13);
|
||||
this.passedCountLabel.TabIndex = 12;
|
||||
this.passedCountLabel.Text = "passedCnt";
|
||||
//
|
||||
// purchaseOrderLabel
|
||||
//
|
||||
this.purchaseOrderLabel.AutoSize = true;
|
||||
this.purchaseOrderLabel.Location = new System.Drawing.Point(481, 7);
|
||||
this.purchaseOrderLabel.Name = "purchaseOrderLabel";
|
||||
this.purchaseOrderLabel.Size = new System.Drawing.Size(77, 13);
|
||||
this.purchaseOrderLabel.TabIndex = 11;
|
||||
this.purchaseOrderLabel.Text = "purchaseOrder";
|
||||
//
|
||||
// procedureLabel
|
||||
//
|
||||
this.procedureLabel.AutoSize = true;
|
||||
this.procedureLabel.Location = new System.Drawing.Point(328, 7);
|
||||
this.procedureLabel.Name = "procedureLabel";
|
||||
this.procedureLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.procedureLabel.TabIndex = 10;
|
||||
this.procedureLabel.Text = "procedure";
|
||||
//
|
||||
// endTimeLabel
|
||||
//
|
||||
this.endTimeLabel.AutoSize = true;
|
||||
this.endTimeLabel.Location = new System.Drawing.Point(185, 7);
|
||||
this.endTimeLabel.Name = "endTimeLabel";
|
||||
this.endTimeLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.endTimeLabel.TabIndex = 9;
|
||||
this.endTimeLabel.Text = "endTime";
|
||||
//
|
||||
// startTimeLabel
|
||||
//
|
||||
this.startTimeLabel.AutoSize = true;
|
||||
this.startTimeLabel.Location = new System.Drawing.Point(54, 7);
|
||||
this.startTimeLabel.Name = "startTimeLabel";
|
||||
this.startTimeLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.startTimeLabel.TabIndex = 8;
|
||||
this.startTimeLabel.Text = "startTime";
|
||||
//
|
||||
// batchNrLabel
|
||||
//
|
||||
this.batchNrLabel.AutoSize = true;
|
||||
this.batchNrLabel.Location = new System.Drawing.Point(3, 7);
|
||||
this.batchNrLabel.Name = "batchNrLabel";
|
||||
this.batchNrLabel.Size = new System.Drawing.Size(24, 13);
|
||||
this.batchNrLabel.TabIndex = 16;
|
||||
this.batchNrLabel.Text = "bNr";
|
||||
//
|
||||
// showButton
|
||||
//
|
||||
this.showButton.Location = new System.Drawing.Point(939, 2);
|
||||
this.showButton.Name = "showButton";
|
||||
this.showButton.Size = new System.Drawing.Size(104, 23);
|
||||
this.showButton.TabIndex = 17;
|
||||
this.showButton.Text = "Show";
|
||||
this.showButton.UseVisualStyleBackColor = true;
|
||||
this.showButton.Click += new System.EventHandler(this.showButton_Click);
|
||||
//
|
||||
// PreviousResultCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.showButton);
|
||||
this.Controls.Add(this.batchNrLabel);
|
||||
this.Controls.Add(this.sendButton);
|
||||
this.Controls.Add(this.sentCheckBox);
|
||||
this.Controls.Add(this.failedCountLabel);
|
||||
this.Controls.Add(this.passedCountLabel);
|
||||
this.Controls.Add(this.purchaseOrderLabel);
|
||||
this.Controls.Add(this.procedureLabel);
|
||||
this.Controls.Add(this.endTimeLabel);
|
||||
this.Controls.Add(this.startTimeLabel);
|
||||
this.Name = "PreviousResultCtrl";
|
||||
this.Size = new System.Drawing.Size(1048, 26);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.sendReloadButton = new System.Windows.Forms.Button();
|
||||
this.sentCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.failedCountLabel = new System.Windows.Forms.Label();
|
||||
this.passedCountLabel = new System.Windows.Forms.Label();
|
||||
this.purchaseOrderLabel = new System.Windows.Forms.Label();
|
||||
this.procedureLabel = new System.Windows.Forms.Label();
|
||||
this.endTimeLabel = new System.Windows.Forms.Label();
|
||||
this.startTimeLabel = new System.Windows.Forms.Label();
|
||||
this.batchNrLabel = new System.Windows.Forms.Label();
|
||||
this.showButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// sendReloadButton
|
||||
//
|
||||
this.sendReloadButton.Location = new System.Drawing.Point(832, 2);
|
||||
this.sendReloadButton.Name = "sendReloadButton";
|
||||
this.sendReloadButton.Size = new System.Drawing.Size(104, 23);
|
||||
this.sendReloadButton.TabIndex = 15;
|
||||
this.sendReloadButton.Text = "Again";
|
||||
this.sendReloadButton.UseVisualStyleBackColor = true;
|
||||
this.sendReloadButton.Click += new System.EventHandler(this.sendReloadButton_Click);
|
||||
//
|
||||
// sentCheckBox
|
||||
//
|
||||
this.sentCheckBox.AutoSize = true;
|
||||
this.sentCheckBox.Location = new System.Drawing.Point(748, 6);
|
||||
this.sentCheckBox.Name = "sentCheckBox";
|
||||
this.sentCheckBox.Size = new System.Drawing.Size(48, 17);
|
||||
this.sentCheckBox.TabIndex = 14;
|
||||
this.sentCheckBox.Text = "Sent";
|
||||
this.sentCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// failedCountLabel
|
||||
//
|
||||
this.failedCountLabel.AutoSize = true;
|
||||
this.failedCountLabel.Location = new System.Drawing.Point(681, 7);
|
||||
this.failedCountLabel.Name = "failedCountLabel";
|
||||
this.failedCountLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.failedCountLabel.TabIndex = 13;
|
||||
this.failedCountLabel.Text = "failedCnt";
|
||||
//
|
||||
// passedCountLabel
|
||||
//
|
||||
this.passedCountLabel.AutoSize = true;
|
||||
this.passedCountLabel.Location = new System.Drawing.Point(590, 7);
|
||||
this.passedCountLabel.Name = "passedCountLabel";
|
||||
this.passedCountLabel.Size = new System.Drawing.Size(57, 13);
|
||||
this.passedCountLabel.TabIndex = 12;
|
||||
this.passedCountLabel.Text = "passedCnt";
|
||||
//
|
||||
// purchaseOrderLabel
|
||||
//
|
||||
this.purchaseOrderLabel.AutoSize = true;
|
||||
this.purchaseOrderLabel.Location = new System.Drawing.Point(481, 7);
|
||||
this.purchaseOrderLabel.Name = "purchaseOrderLabel";
|
||||
this.purchaseOrderLabel.Size = new System.Drawing.Size(77, 13);
|
||||
this.purchaseOrderLabel.TabIndex = 11;
|
||||
this.purchaseOrderLabel.Text = "purchaseOrder";
|
||||
//
|
||||
// procedureLabel
|
||||
//
|
||||
this.procedureLabel.AutoSize = true;
|
||||
this.procedureLabel.Location = new System.Drawing.Point(328, 7);
|
||||
this.procedureLabel.Name = "procedureLabel";
|
||||
this.procedureLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.procedureLabel.TabIndex = 10;
|
||||
this.procedureLabel.Text = "procedure";
|
||||
//
|
||||
// endTimeLabel
|
||||
//
|
||||
this.endTimeLabel.AutoSize = true;
|
||||
this.endTimeLabel.Location = new System.Drawing.Point(185, 7);
|
||||
this.endTimeLabel.Name = "endTimeLabel";
|
||||
this.endTimeLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.endTimeLabel.TabIndex = 9;
|
||||
this.endTimeLabel.Text = "endTime";
|
||||
//
|
||||
// startTimeLabel
|
||||
//
|
||||
this.startTimeLabel.AutoSize = true;
|
||||
this.startTimeLabel.Location = new System.Drawing.Point(54, 7);
|
||||
this.startTimeLabel.Name = "startTimeLabel";
|
||||
this.startTimeLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.startTimeLabel.TabIndex = 8;
|
||||
this.startTimeLabel.Text = "startTime";
|
||||
//
|
||||
// batchNrLabel
|
||||
//
|
||||
this.batchNrLabel.AutoSize = true;
|
||||
this.batchNrLabel.Location = new System.Drawing.Point(3, 7);
|
||||
this.batchNrLabel.Name = "batchNrLabel";
|
||||
this.batchNrLabel.Size = new System.Drawing.Size(24, 13);
|
||||
this.batchNrLabel.TabIndex = 16;
|
||||
this.batchNrLabel.Text = "bNr";
|
||||
//
|
||||
// showButton
|
||||
//
|
||||
this.showButton.Location = new System.Drawing.Point(939, 2);
|
||||
this.showButton.Name = "showButton";
|
||||
this.showButton.Size = new System.Drawing.Size(104, 23);
|
||||
this.showButton.TabIndex = 17;
|
||||
this.showButton.Text = "Show";
|
||||
this.showButton.UseVisualStyleBackColor = true;
|
||||
this.showButton.Click += new System.EventHandler(this.showButton_Click);
|
||||
//
|
||||
// PreviousResultCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.showButton);
|
||||
this.Controls.Add(this.batchNrLabel);
|
||||
this.Controls.Add(this.sendReloadButton);
|
||||
this.Controls.Add(this.sentCheckBox);
|
||||
this.Controls.Add(this.failedCountLabel);
|
||||
this.Controls.Add(this.passedCountLabel);
|
||||
this.Controls.Add(this.purchaseOrderLabel);
|
||||
this.Controls.Add(this.procedureLabel);
|
||||
this.Controls.Add(this.endTimeLabel);
|
||||
this.Controls.Add(this.startTimeLabel);
|
||||
this.Name = "PreviousResultCtrl";
|
||||
this.Size = new System.Drawing.Size(1048, 26);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button sendButton;
|
||||
private System.Windows.Forms.Button sendReloadButton;
|
||||
private System.Windows.Forms.CheckBox sentCheckBox;
|
||||
private System.Windows.Forms.Label failedCountLabel;
|
||||
private System.Windows.Forms.Label passedCountLabel;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
///
|
||||
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -12,7 +9,8 @@ namespace TBF.Forms
|
||||
{
|
||||
public partial class PreviousResultCtrl : UserControl
|
||||
{
|
||||
PreviousResultsDlg parent;
|
||||
readonly PreviousResultsDlg parent;
|
||||
readonly bool reloadEn;
|
||||
|
||||
public int BatchNr;
|
||||
public DateTime StarTime;
|
||||
@@ -28,10 +26,12 @@ namespace TBF.Forms
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public PreviousResultCtrl(PreviousResultsDlg parent, int bnr, DateTime s, DateTime e, string proc, string pOrd, int passCnt, int failCnt, bool sent)
|
||||
public PreviousResultCtrl(PreviousResultsDlg parent, int bnr, DateTime s, DateTime e, string proc, string pOrd, int passCnt, int failCnt, bool sent, bool reloadEn)
|
||||
: this()
|
||||
{
|
||||
this.parent = parent;
|
||||
this.reloadEn = reloadEn;
|
||||
|
||||
BatchNr = bnr;
|
||||
StarTime = s;
|
||||
EndTime = e;
|
||||
@@ -52,17 +52,18 @@ namespace TBF.Forms
|
||||
#if MUNICH
|
||||
sentCheckBox.Text = Strings.Printed;
|
||||
sentCheckBox.Checked = Sent;
|
||||
sendButton.Enabled = true; /// 'Print again' function always available
|
||||
sendButton.Text = Strings.Print_again;
|
||||
sendReloadButton.Enabled = true; /// 'Print again' function always available
|
||||
sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Print_again;
|
||||
#elif ORACLE_DB
|
||||
sentCheckBox.Text = Strings.Sent;
|
||||
sentCheckBox.Checked = Sent;
|
||||
sendButton.Enabled = !Sent;
|
||||
sendButton.Text = Strings.Again;
|
||||
sendReloadButton.Enabled = reloadEn || !Sent;
|
||||
sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Save_again;
|
||||
#else
|
||||
sentCheckBox.Visible = false;
|
||||
sendButton.Enabled = false;
|
||||
sendButton.Visible = false;
|
||||
sendReloadButton.Enabled = reloadEn;
|
||||
sendReloadButton.Visible = reloadEn;
|
||||
sendReloadButton.Text = Strings.Restore;
|
||||
#endif
|
||||
showButton.Text = Strings.Show;
|
||||
}
|
||||
@@ -72,16 +73,19 @@ namespace TBF.Forms
|
||||
this.Sent = sent;
|
||||
#if MUNICH
|
||||
sentCheckBox.Checked = sent;
|
||||
sendButton.Enabled = true;
|
||||
sendReloadButton.Enabled = true;
|
||||
#elif ORACLE_DB
|
||||
sentCheckBox.Checked = sent;
|
||||
sendButton.Enabled = !sent;
|
||||
sendReloadButton.Enabled = !sent;
|
||||
#endif
|
||||
}
|
||||
|
||||
private void sendButton_Click(object sender, EventArgs e)
|
||||
private void sendReloadButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
parent.OnSendAgain(this, new PreviousResultIdEventArgs(BatchNr));
|
||||
if (reloadEn)
|
||||
parent.OnReload(this, new PreviousResultIdEventArgs(BatchNr));
|
||||
else
|
||||
parent.OnSendAgain(this, new PreviousResultIdEventArgs(BatchNr));
|
||||
}
|
||||
|
||||
private void showButton_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using Oracle.DataAccess.Client; // ODP.NET Oracle managed provider
|
||||
using Oracle.DataAccess.Types;
|
||||
using TBF.BenchControl.DB.SensusOracle;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Forms
|
||||
@@ -23,11 +18,13 @@ namespace TBF.Forms
|
||||
ISession session;
|
||||
int currentBatchNr;
|
||||
IList<Batch> batches;
|
||||
bool reloadEn;
|
||||
|
||||
|
||||
public PreviousResultsDlg()
|
||||
public PreviousResultsDlg(bool reloadEn)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.reloadEn = reloadEn;
|
||||
currentBatchNr = Program.LocalSettings.BatchNr;
|
||||
|
||||
SendAgainHandler += delegate(object sndr, PreviousResultIdEventArgs args)
|
||||
@@ -43,6 +40,12 @@ namespace TBF.Forms
|
||||
};
|
||||
}
|
||||
|
||||
public PreviousResultsDlg()
|
||||
: this(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
private void PreviousResultsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
@@ -66,6 +69,26 @@ namespace TBF.Forms
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void OnReload(object sender, PreviousResultIdEventArgs data)
|
||||
{
|
||||
foreach (var batch in batches)
|
||||
{
|
||||
if (batch.BatchNr == data.BatchNr)
|
||||
{
|
||||
TBF.UiBridge.Bridge.BatchNr = batch.BatchNr;
|
||||
Program.MainWnd.UpdateProcedure(batch.ProcedureName);
|
||||
TBF.UiBridge.Bridge.Ui2Bench(TBF.UiBridge.UI2BenchCmd.ReloadBatch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public event EventHandler<PreviousResultIdEventArgs> SendAgainHandler;
|
||||
|
||||
/// <summary>
|
||||
@@ -74,8 +97,14 @@ namespace TBF.Forms
|
||||
public void OnSendAgain(object sender, PreviousResultIdEventArgs data)
|
||||
{
|
||||
if (SendAgainHandler == null) return;
|
||||
try { SendAgainHandler(sender, data); }
|
||||
catch (Exception e) { log.Error("SendAgainHandler(...) failed", e); }
|
||||
try
|
||||
{
|
||||
SendAgainHandler(sender, data);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Error("SendAgainHandler(...) failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void DoSendAgain(object sender, PreviousResultIdEventArgs data)
|
||||
@@ -148,7 +177,6 @@ namespace TBF.Forms
|
||||
|
||||
public void DoShowResults(object sender, PreviousResultIdEventArgs data)
|
||||
{
|
||||
|
||||
Results.Forms.BatchResultsDlg dlg = new Results.Forms.BatchResultsDlg();
|
||||
dlg.PopupResultsLeft = Program.LocalSettings.PopupResultsLeft;
|
||||
dlg.PopupResultsTop = Program.LocalSettings.PopupResultsTop;
|
||||
@@ -208,15 +236,16 @@ namespace TBF.Forms
|
||||
if (passedCount + failedCount == 0) continue;
|
||||
|
||||
|
||||
flowLayoutPanel1.Controls.Add(new PreviousResultCtrl( this,
|
||||
b.BatchNr,
|
||||
b.StartTime,
|
||||
b.EndTime,
|
||||
b.ProcedureName,
|
||||
b.WaterMeters[0].PurchaseOrder,
|
||||
passedCount,
|
||||
failedCount,
|
||||
b.RsltsSent));
|
||||
flowLayoutPanel1.Controls.Add(new PreviousResultCtrl(this,
|
||||
b.BatchNr,
|
||||
b.StartTime,
|
||||
b.EndTime,
|
||||
b.ProcedureName,
|
||||
b.WaterMeters[0].PurchaseOrder,
|
||||
passedCount,
|
||||
failedCount,
|
||||
b.RsltsSent,
|
||||
reloadEn));
|
||||
}
|
||||
|
||||
ResumeLayout();
|
||||
|
||||
@@ -443,21 +443,27 @@ namespace TBF
|
||||
|
||||
private void procedureComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcedureName = procedureComboBox.Text;
|
||||
UpdateProcedure(procedureComboBox.Text);
|
||||
}
|
||||
|
||||
public void UpdateProcedure(string procedureName)
|
||||
{
|
||||
procedureComboBox.Text = procedureName;
|
||||
ProcedureName = procedureName;
|
||||
BenchControlPanel.ReloadTests();
|
||||
if (CurrentProcedure != null && CurrentProcedure.Description != null)
|
||||
{
|
||||
descriptionLabel.Text = CurrentProcedure.Description;
|
||||
}
|
||||
if (CurrentProcedure != null && CurrentProcedure.Description != null)
|
||||
{
|
||||
descriptionLabel.Text = CurrentProcedure.Description;
|
||||
}
|
||||
if (CurrentProcedure != null && testProgressControls != null)
|
||||
{
|
||||
testProgressControls.ProcedureSelectedInUI(this, new UiBridge.ProcedureSelectedEventArgs(CurrentProcedure));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ProcedureName))
|
||||
{
|
||||
Program.LocalSettings.LastProcedureName = ProcedureName;
|
||||
Program.LocalSettings.Save();
|
||||
}
|
||||
{
|
||||
Program.LocalSettings.LastProcedureName = ProcedureName;
|
||||
Program.LocalSettings.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.12.536.1")]
|
||||
[assembly: AssemblyFileVersion("2.12.536.1")]
|
||||
[assembly: AssemblyVersion("2.12.550.1")]
|
||||
[assembly: AssemblyFileVersion("2.12.550.1")]
|
||||
|
||||
+18
-9
@@ -150,15 +150,6 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Again.
|
||||
/// </summary>
|
||||
internal static string Again {
|
||||
get {
|
||||
return ResourceManager.GetString("Again", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Air density [kg/m3].
|
||||
/// </summary>
|
||||
@@ -3327,6 +3318,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Restore.
|
||||
/// </summary>
|
||||
internal static string Restore {
|
||||
get {
|
||||
return ResourceManager.GetString("Restore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Results.
|
||||
/// </summary>
|
||||
@@ -3390,6 +3390,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save again.
|
||||
/// </summary>
|
||||
internal static string Save_again {
|
||||
get {
|
||||
return ResourceManager.GetString("Save_again", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save column widths.
|
||||
/// </summary>
|
||||
|
||||
@@ -1164,8 +1164,8 @@
|
||||
<data name="Print_watermeter_results" xml:space="preserve">
|
||||
<value>Tisk výsledů vodoměrů</value>
|
||||
</data>
|
||||
<data name="Again" xml:space="preserve">
|
||||
<value>Znovu</value>
|
||||
<data name="Save_again" xml:space="preserve">
|
||||
<value>Uložit znovu</value>
|
||||
</data>
|
||||
<data name="Previous_results" xml:space="preserve">
|
||||
<value>Predešlé výsledky</value>
|
||||
@@ -1275,4 +1275,10 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Zopakovat</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="Reload" xml:space="preserve">
|
||||
<value>Znovu otevřít</value>
|
||||
</data>
|
||||
<data name="Show" xml:space="preserve">
|
||||
<value>Zobrazit</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -1155,8 +1155,8 @@
|
||||
<data name="Print_watermeter_results" xml:space="preserve">
|
||||
<value>Wasserzählerergebnisse drucken</value>
|
||||
</data>
|
||||
<data name="Again" xml:space="preserve">
|
||||
<value>Wieder</value>
|
||||
<data name="Save_again" xml:space="preserve">
|
||||
<value>Wieder speichern</value>
|
||||
</data>
|
||||
<data name="Previous_results" xml:space="preserve">
|
||||
<value>Vorherige Ergebnisse</value>
|
||||
@@ -1413,4 +1413,7 @@
|
||||
<data name="ROI_Data" xml:space="preserve">
|
||||
<value>ROI Daten</value>
|
||||
</data>
|
||||
<data name="Restore" xml:space="preserve">
|
||||
<value>Wiederherstellen</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1363,8 +1363,8 @@
|
||||
<data name="Print_watermeter_results" xml:space="preserve">
|
||||
<value>Print watermeter results</value>
|
||||
</data>
|
||||
<data name="Again" xml:space="preserve">
|
||||
<value>Again</value>
|
||||
<data name="Save_again" xml:space="preserve">
|
||||
<value>Save again</value>
|
||||
</data>
|
||||
<data name="Sent" xml:space="preserve">
|
||||
<value>Sent</value>
|
||||
@@ -1714,4 +1714,7 @@
|
||||
<data name="Turning_direction" xml:space="preserve">
|
||||
<value>Turning direction</value>
|
||||
</data>
|
||||
<data name="Restore" xml:space="preserve">
|
||||
<value>Restore</value>
|
||||
</data>
|
||||
</root>
|
||||
+25
-11
@@ -32,8 +32,9 @@ namespace TBF.Screens
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.reloadPreviousResultsButton = new System.Windows.Forms.Button();
|
||||
this.columnWidthsButton = new System.Windows.Forms.Button();
|
||||
this.previousResultsButton = new System.Windows.Forms.Button();
|
||||
this.showPreviousResultsButton = new System.Windows.Forms.Button();
|
||||
this.configureButton = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
@@ -54,8 +55,9 @@ namespace TBF.Screens
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.splitContainer.Panel1.Controls.Add(this.reloadPreviousResultsButton);
|
||||
this.splitContainer.Panel1.Controls.Add(this.columnWidthsButton);
|
||||
this.splitContainer.Panel1.Controls.Add(this.previousResultsButton);
|
||||
this.splitContainer.Panel1.Controls.Add(this.showPreviousResultsButton);
|
||||
this.splitContainer.Panel1.Controls.Add(this.configureButton);
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
@@ -65,6 +67,17 @@ namespace TBF.Screens
|
||||
this.splitContainer.SplitterDistance = 42;
|
||||
this.splitContainer.TabIndex = 0;
|
||||
//
|
||||
// reloadPreviousResultsButton
|
||||
//
|
||||
this.reloadPreviousResultsButton.Enabled = false;
|
||||
this.reloadPreviousResultsButton.Location = new System.Drawing.Point(405, 10);
|
||||
this.reloadPreviousResultsButton.Name = "reloadPreviousResultsButton";
|
||||
this.reloadPreviousResultsButton.Size = new System.Drawing.Size(147, 30);
|
||||
this.reloadPreviousResultsButton.TabIndex = 3;
|
||||
this.reloadPreviousResultsButton.Text = "Reload previous results";
|
||||
this.reloadPreviousResultsButton.UseVisualStyleBackColor = true;
|
||||
this.reloadPreviousResultsButton.Click += new System.EventHandler(this.reloadPreviousResultsButton_Click);
|
||||
//
|
||||
// columnWidthsButton
|
||||
//
|
||||
this.columnWidthsButton.Location = new System.Drawing.Point(126, 10);
|
||||
@@ -75,15 +88,15 @@ namespace TBF.Screens
|
||||
this.columnWidthsButton.UseVisualStyleBackColor = true;
|
||||
this.columnWidthsButton.Click += new System.EventHandler(this.columnWidthsButton_Click);
|
||||
//
|
||||
// previousResultsButton
|
||||
// showPreviousResultsButton
|
||||
//
|
||||
this.previousResultsButton.Location = new System.Drawing.Point(252, 10);
|
||||
this.previousResultsButton.Name = "previousResultsButton";
|
||||
this.previousResultsButton.Size = new System.Drawing.Size(147, 30);
|
||||
this.previousResultsButton.TabIndex = 2;
|
||||
this.previousResultsButton.Text = "Previous results";
|
||||
this.previousResultsButton.UseVisualStyleBackColor = true;
|
||||
this.previousResultsButton.Click += new System.EventHandler(this.previousResultsButton_Click);
|
||||
this.showPreviousResultsButton.Location = new System.Drawing.Point(252, 10);
|
||||
this.showPreviousResultsButton.Name = "showPreviousResultsButton";
|
||||
this.showPreviousResultsButton.Size = new System.Drawing.Size(147, 30);
|
||||
this.showPreviousResultsButton.TabIndex = 2;
|
||||
this.showPreviousResultsButton.Text = "Show previous results";
|
||||
this.showPreviousResultsButton.UseVisualStyleBackColor = true;
|
||||
this.showPreviousResultsButton.Click += new System.EventHandler(this.showPreviousResultsButton_Click);
|
||||
//
|
||||
// configureButton
|
||||
//
|
||||
@@ -129,6 +142,7 @@ namespace TBF.Screens
|
||||
private System.Windows.Forms.Button configureButton;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
|
||||
private System.Windows.Forms.Button columnWidthsButton;
|
||||
private System.Windows.Forms.Button previousResultsButton;
|
||||
private System.Windows.Forms.Button showPreviousResultsButton;
|
||||
private System.Windows.Forms.Button reloadPreviousResultsButton;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,14 @@ namespace TBF.Screens
|
||||
else
|
||||
OnTestCompleted(sender, args);
|
||||
};
|
||||
|
||||
Bridge.ButtonsEtcHandler += delegate(object sndr, ButtonsEtcEventArgs args)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
Invoke(new EventHandler<ButtonsEtcEventArgs>(OnButtonsEtc), sndr, args);
|
||||
else
|
||||
OnButtonsEtc(sndr, args);
|
||||
};
|
||||
}
|
||||
|
||||
void OnProcedureSelected(object sender, ProcedureSelectedEventArgs args)
|
||||
@@ -74,12 +82,17 @@ namespace TBF.Screens
|
||||
RedrawAll(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
|
||||
}
|
||||
|
||||
void OnButtonsEtc(object sender, UiBridge.ButtonsEtcEventArgs args)
|
||||
{
|
||||
reloadPreviousResultsButton.Enabled = ((args.Flags & UiBridge.ButtonsEtc.ProcedureCmbBoxEn) != 0);
|
||||
}
|
||||
|
||||
private void ResultsTabPageCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Localization
|
||||
configureButton.Text = Strings.Configure;
|
||||
columnWidthsButton.Text = Strings.Save_column_widths;
|
||||
previousResultsButton.Text = Strings.Previous_results;
|
||||
showPreviousResultsButton.Text = Strings.Previous_results;
|
||||
|
||||
MetersArrangement = Program.LocalSettings.ResultsConfigMeters;
|
||||
TestsArrangement = Program.LocalSettings.ResultsConfigTests;
|
||||
@@ -143,11 +156,16 @@ namespace TBF.Screens
|
||||
/// <summary>
|
||||
/// Clear the results
|
||||
/// </summary>
|
||||
private void previousResultsButton_Click(object sender, EventArgs e)
|
||||
private void showPreviousResultsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
new TBF.Forms.PreviousResultsDlg().ShowDialog();
|
||||
}
|
||||
|
||||
private void reloadPreviousResultsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
new TBF.Forms.PreviousResultsDlg(true).ShowDialog();
|
||||
}
|
||||
|
||||
#region Redraw
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace TBF.UiBridge
|
||||
|
||||
public static readonly Queue<UI2BenchCmd> Ui2MachineQueue;
|
||||
|
||||
public static int BatchNr;
|
||||
|
||||
public static string SelectedProcedureName
|
||||
{
|
||||
get { return Program.MainWnd.ProcedureName; }
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace TBF.UiBridge
|
||||
public enum UI2BenchCmd
|
||||
{
|
||||
None = 0,
|
||||
ReloadBatch,
|
||||
StartTest,
|
||||
StartQ1,
|
||||
StartQ2,
|
||||
@@ -27,6 +28,7 @@ namespace TBF.UiBridge
|
||||
B1,
|
||||
B2,
|
||||
B3,
|
||||
Custom,
|
||||
Next, /// Used for debugging
|
||||
}
|
||||
|
||||
@@ -48,6 +50,7 @@ namespace TBF.UiBridge
|
||||
AcceptResultsBtnEn = 0x1000,
|
||||
CalibrationBtnEn = 0x2000,
|
||||
SensitivityTestBtnEn = 0x4000,
|
||||
CustomBtnEn = 0x8000,
|
||||
|
||||
/// If one of the following flags is set, flags 0x1 through 0x2000 are ignored
|
||||
///
|
||||
|
||||
+250
-257
@@ -31,263 +31,255 @@ namespace TBF.UiControls
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BenchControlPanel));
|
||||
this.stopBtn = new System.Windows.Forms.Button();
|
||||
this.startTestBtn = new System.Windows.Forms.Button();
|
||||
this.startCycleBtn = new System.Windows.Forms.Button();
|
||||
this.purgeBeginBtn = new System.Windows.Forms.Button();
|
||||
this.purgeEndBtn = new System.Windows.Forms.Button();
|
||||
this.breakBtn = new System.Windows.Forms.Button();
|
||||
this.resetResultsBtn = new System.Windows.Forms.Button();
|
||||
this.cameraTestBtn = new System.Windows.Forms.Button();
|
||||
this.emptyTank1Btn = new System.Windows.Forms.Button();
|
||||
this.sensitivityTestBtn = new System.Windows.Forms.Button();
|
||||
this.emptyTank2Btn = new System.Windows.Forms.Button();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.startQ3Btn = new System.Windows.Forms.Button();
|
||||
this.startQ2Btn = new System.Windows.Forms.Button();
|
||||
this.startQ1Btn = new System.Windows.Forms.Button();
|
||||
this.testComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.purgeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.emptyGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.emptyTank3Btn = new System.Windows.Forms.Button();
|
||||
this.otherGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.nextButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.acceptResultsBtn = new System.Windows.Forms.Button();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.purgeGroupBox.SuspendLayout();
|
||||
this.emptyGroupBox.SuspendLayout();
|
||||
this.otherGroupBox.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// stopBtn
|
||||
//
|
||||
resources.ApplyResources(this.stopBtn, "stopBtn");
|
||||
this.stopBtn.BackColor = System.Drawing.Color.Tomato;
|
||||
this.stopBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.stopBtn.Name = "stopBtn";
|
||||
this.stopBtn.UseVisualStyleBackColor = false;
|
||||
this.stopBtn.Click += new System.EventHandler(this.stopBtn_Click);
|
||||
//
|
||||
// startTestBtn
|
||||
//
|
||||
resources.ApplyResources(this.startTestBtn, "startTestBtn");
|
||||
this.startTestBtn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
this.startTestBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.startTestBtn.Name = "startTestBtn";
|
||||
this.startTestBtn.UseVisualStyleBackColor = false;
|
||||
this.startTestBtn.Click += new System.EventHandler(this.startTestBtn_Click);
|
||||
//
|
||||
// startCycleBtn
|
||||
//
|
||||
resources.ApplyResources(this.startCycleBtn, "startCycleBtn");
|
||||
this.startCycleBtn.BackColor = System.Drawing.Color.LightSeaGreen;
|
||||
this.startCycleBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.startCycleBtn.Name = "startCycleBtn";
|
||||
this.startCycleBtn.UseVisualStyleBackColor = false;
|
||||
this.startCycleBtn.Click += new System.EventHandler(this.startCycleBtn_Click);
|
||||
//
|
||||
// purgeBeginBtn
|
||||
//
|
||||
resources.ApplyResources(this.purgeBeginBtn, "purgeBeginBtn");
|
||||
this.purgeBeginBtn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.purgeBeginBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.purgeBeginBtn.Name = "purgeBeginBtn";
|
||||
this.purgeBeginBtn.UseVisualStyleBackColor = false;
|
||||
this.purgeBeginBtn.Click += new System.EventHandler(this.purgeBeginBtn_Click);
|
||||
//
|
||||
// purgeEndBtn
|
||||
//
|
||||
resources.ApplyResources(this.purgeEndBtn, "purgeEndBtn");
|
||||
this.purgeEndBtn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.purgeEndBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.purgeEndBtn.Name = "purgeEndBtn";
|
||||
this.purgeEndBtn.UseVisualStyleBackColor = false;
|
||||
this.purgeEndBtn.Click += new System.EventHandler(this.purgeEndBtn_Click);
|
||||
//
|
||||
// breakBtn
|
||||
//
|
||||
resources.ApplyResources(this.breakBtn, "breakBtn");
|
||||
this.breakBtn.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.breakBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.breakBtn.Name = "breakBtn";
|
||||
this.breakBtn.UseVisualStyleBackColor = false;
|
||||
this.breakBtn.Click += new System.EventHandler(this.breakBtn_Click);
|
||||
//
|
||||
// resetResultsBtn
|
||||
//
|
||||
resources.ApplyResources(this.resetResultsBtn, "resetResultsBtn");
|
||||
this.resetResultsBtn.BackColor = System.Drawing.Color.Tomato;
|
||||
this.resetResultsBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.resetResultsBtn.Name = "resetResultsBtn";
|
||||
this.resetResultsBtn.UseVisualStyleBackColor = false;
|
||||
this.resetResultsBtn.Click += new System.EventHandler(this.resetResultsBtn_Click);
|
||||
//
|
||||
// cameraTestBtn
|
||||
//
|
||||
resources.ApplyResources(this.cameraTestBtn, "cameraTestBtn");
|
||||
this.cameraTestBtn.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.cameraTestBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.cameraTestBtn.Name = "cameraTestBtn";
|
||||
this.cameraTestBtn.UseVisualStyleBackColor = false;
|
||||
this.cameraTestBtn.Click += new System.EventHandler(this.cameraTestBtn_Click);
|
||||
//
|
||||
// emptyTank1Btn
|
||||
//
|
||||
resources.ApplyResources(this.emptyTank1Btn, "emptyTank1Btn");
|
||||
this.emptyTank1Btn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.emptyTank1Btn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.emptyTank1Btn.Name = "emptyTank1Btn";
|
||||
this.emptyTank1Btn.UseVisualStyleBackColor = false;
|
||||
this.emptyTank1Btn.Click += new System.EventHandler(this.emptyTank1Btn_Click);
|
||||
//
|
||||
// sensitivityTestBtn
|
||||
//
|
||||
resources.ApplyResources(this.sensitivityTestBtn, "sensitivityTestBtn");
|
||||
this.sensitivityTestBtn.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.sensitivityTestBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.sensitivityTestBtn.Name = "sensitivityTestBtn";
|
||||
this.sensitivityTestBtn.UseVisualStyleBackColor = false;
|
||||
this.sensitivityTestBtn.Click += new System.EventHandler(this.sensitivityTestBtn_Click);
|
||||
//
|
||||
// emptyTank2Btn
|
||||
//
|
||||
resources.ApplyResources(this.emptyTank2Btn, "emptyTank2Btn");
|
||||
this.emptyTank2Btn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.emptyTank2Btn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.emptyTank2Btn.Name = "emptyTank2Btn";
|
||||
this.emptyTank2Btn.UseVisualStyleBackColor = false;
|
||||
this.emptyTank2Btn.Click += new System.EventHandler(this.emptyTank2Btn_Click);
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
resources.ApplyResources(this.testGroupBox, "testGroupBox");
|
||||
this.testGroupBox.Controls.Add(this.startQ3Btn);
|
||||
this.testGroupBox.Controls.Add(this.startQ2Btn);
|
||||
this.testGroupBox.Controls.Add(this.startQ1Btn);
|
||||
this.testGroupBox.Controls.Add(this.testComboBox);
|
||||
this.testGroupBox.Controls.Add(this.startTestBtn);
|
||||
this.testGroupBox.Controls.Add(this.startCycleBtn);
|
||||
this.testGroupBox.Controls.Add(this.stopBtn);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.TabStop = false;
|
||||
//
|
||||
// startQ3Btn
|
||||
//
|
||||
resources.ApplyResources(this.startQ3Btn, "startQ3Btn");
|
||||
this.startQ3Btn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
this.startQ3Btn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.startQ3Btn.Name = "startQ3Btn";
|
||||
this.startQ3Btn.UseVisualStyleBackColor = false;
|
||||
this.startQ3Btn.Click += new System.EventHandler(this.startQ3Btn_Click);
|
||||
//
|
||||
// startQ2Btn
|
||||
//
|
||||
resources.ApplyResources(this.startQ2Btn, "startQ2Btn");
|
||||
this.startQ2Btn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
this.startQ2Btn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.startQ2Btn.Name = "startQ2Btn";
|
||||
this.startQ2Btn.UseVisualStyleBackColor = false;
|
||||
this.startQ2Btn.Click += new System.EventHandler(this.startQ2Btn_Click);
|
||||
//
|
||||
// startQ1Btn
|
||||
//
|
||||
resources.ApplyResources(this.startQ1Btn, "startQ1Btn");
|
||||
this.startQ1Btn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
this.startQ1Btn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.startQ1Btn.Name = "startQ1Btn";
|
||||
this.startQ1Btn.UseVisualStyleBackColor = false;
|
||||
this.startQ1Btn.Click += new System.EventHandler(this.startQ1Btn_Click);
|
||||
//
|
||||
// testComboBox
|
||||
//
|
||||
resources.ApplyResources(this.testComboBox, "testComboBox");
|
||||
this.testComboBox.FormattingEnabled = true;
|
||||
this.testComboBox.Name = "testComboBox";
|
||||
this.testComboBox.SelectedIndexChanged += new System.EventHandler(this.testComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// purgeGroupBox
|
||||
//
|
||||
resources.ApplyResources(this.purgeGroupBox, "purgeGroupBox");
|
||||
this.purgeGroupBox.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.purgeGroupBox.Controls.Add(this.purgeEndBtn);
|
||||
this.purgeGroupBox.Controls.Add(this.purgeBeginBtn);
|
||||
this.purgeGroupBox.Name = "purgeGroupBox";
|
||||
this.purgeGroupBox.TabStop = false;
|
||||
//
|
||||
// emptyGroupBox
|
||||
//
|
||||
resources.ApplyResources(this.emptyGroupBox, "emptyGroupBox");
|
||||
this.emptyGroupBox.Controls.Add(this.emptyTank3Btn);
|
||||
this.emptyGroupBox.Controls.Add(this.emptyTank1Btn);
|
||||
this.emptyGroupBox.Controls.Add(this.emptyTank2Btn);
|
||||
this.emptyGroupBox.Name = "emptyGroupBox";
|
||||
this.emptyGroupBox.TabStop = false;
|
||||
//
|
||||
// emptyTank3Btn
|
||||
//
|
||||
resources.ApplyResources(this.emptyTank3Btn, "emptyTank3Btn");
|
||||
this.emptyTank3Btn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.emptyTank3Btn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.emptyTank3Btn.Name = "emptyTank3Btn";
|
||||
this.emptyTank3Btn.UseVisualStyleBackColor = false;
|
||||
this.emptyTank3Btn.Click += new System.EventHandler(this.emptyTank3Btn_Click);
|
||||
//
|
||||
// otherGroupBox
|
||||
//
|
||||
resources.ApplyResources(this.otherGroupBox, "otherGroupBox");
|
||||
this.otherGroupBox.Controls.Add(this.sensitivityTestBtn);
|
||||
this.otherGroupBox.Controls.Add(this.nextButton);
|
||||
this.otherGroupBox.Controls.Add(this.cameraTestBtn);
|
||||
this.otherGroupBox.Controls.Add(this.breakBtn);
|
||||
this.otherGroupBox.Name = "otherGroupBox";
|
||||
this.otherGroupBox.TabStop = false;
|
||||
//
|
||||
// nextButton
|
||||
//
|
||||
resources.ApplyResources(this.nextButton, "nextButton");
|
||||
this.nextButton.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.nextButton.Name = "nextButton";
|
||||
this.nextButton.UseVisualStyleBackColor = true;
|
||||
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.acceptResultsBtn);
|
||||
this.groupBox1.Controls.Add(this.resetResultsBtn);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// acceptResultsBtn
|
||||
//
|
||||
resources.ApplyResources(this.acceptResultsBtn, "acceptResultsBtn");
|
||||
this.acceptResultsBtn.BackColor = System.Drawing.Color.ForestGreen;
|
||||
this.acceptResultsBtn.ImageKey = global::TBF.Resources.Strings.Camera;
|
||||
this.acceptResultsBtn.Name = "acceptResultsBtn";
|
||||
this.acceptResultsBtn.UseVisualStyleBackColor = false;
|
||||
this.acceptResultsBtn.Click += new System.EventHandler(this.acceptResultsBtn_Click);
|
||||
//
|
||||
// BenchControlPanel
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.otherGroupBox);
|
||||
this.Controls.Add(this.emptyGroupBox);
|
||||
this.Controls.Add(this.purgeGroupBox);
|
||||
this.Controls.Add(this.testGroupBox);
|
||||
this.Name = "BenchControlPanel";
|
||||
this.Load += new System.EventHandler(this.BenchControlPanel_Load);
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.purgeGroupBox.ResumeLayout(false);
|
||||
this.emptyGroupBox.ResumeLayout(false);
|
||||
this.otherGroupBox.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BenchControlPanel));
|
||||
this.stopBtn = new System.Windows.Forms.Button();
|
||||
this.startTestBtn = new System.Windows.Forms.Button();
|
||||
this.startCycleBtn = new System.Windows.Forms.Button();
|
||||
this.purgeBeginBtn = new System.Windows.Forms.Button();
|
||||
this.purgeEndBtn = new System.Windows.Forms.Button();
|
||||
this.breakBtn = new System.Windows.Forms.Button();
|
||||
this.resetResultsBtn = new System.Windows.Forms.Button();
|
||||
this.cameraTestBtn = new System.Windows.Forms.Button();
|
||||
this.emptyTank1Btn = new System.Windows.Forms.Button();
|
||||
this.sensitivityTestBtn = new System.Windows.Forms.Button();
|
||||
this.emptyTank2Btn = new System.Windows.Forms.Button();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.startQ3Btn = new System.Windows.Forms.Button();
|
||||
this.startQ2Btn = new System.Windows.Forms.Button();
|
||||
this.startQ1Btn = new System.Windows.Forms.Button();
|
||||
this.testComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.purgeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.emptyGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.emptyTank3Btn = new System.Windows.Forms.Button();
|
||||
this.otherGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.nextButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.acceptResultsBtn = new System.Windows.Forms.Button();
|
||||
this.customButton = new System.Windows.Forms.Button();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.purgeGroupBox.SuspendLayout();
|
||||
this.emptyGroupBox.SuspendLayout();
|
||||
this.otherGroupBox.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// stopBtn
|
||||
//
|
||||
this.stopBtn.BackColor = System.Drawing.Color.Tomato;
|
||||
resources.ApplyResources(this.stopBtn, "stopBtn");
|
||||
this.stopBtn.Name = "stopBtn";
|
||||
this.stopBtn.UseVisualStyleBackColor = false;
|
||||
this.stopBtn.Click += new System.EventHandler(this.stopBtn_Click);
|
||||
//
|
||||
// startTestBtn
|
||||
//
|
||||
this.startTestBtn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
resources.ApplyResources(this.startTestBtn, "startTestBtn");
|
||||
this.startTestBtn.Name = "startTestBtn";
|
||||
this.startTestBtn.UseVisualStyleBackColor = false;
|
||||
this.startTestBtn.Click += new System.EventHandler(this.startTestBtn_Click);
|
||||
//
|
||||
// startCycleBtn
|
||||
//
|
||||
this.startCycleBtn.BackColor = System.Drawing.Color.LightSeaGreen;
|
||||
resources.ApplyResources(this.startCycleBtn, "startCycleBtn");
|
||||
this.startCycleBtn.Name = "startCycleBtn";
|
||||
this.startCycleBtn.UseVisualStyleBackColor = false;
|
||||
this.startCycleBtn.Click += new System.EventHandler(this.startCycleBtn_Click);
|
||||
//
|
||||
// purgeBeginBtn
|
||||
//
|
||||
this.purgeBeginBtn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
resources.ApplyResources(this.purgeBeginBtn, "purgeBeginBtn");
|
||||
this.purgeBeginBtn.Name = "purgeBeginBtn";
|
||||
this.purgeBeginBtn.UseVisualStyleBackColor = false;
|
||||
this.purgeBeginBtn.Click += new System.EventHandler(this.purgeBeginBtn_Click);
|
||||
//
|
||||
// purgeEndBtn
|
||||
//
|
||||
this.purgeEndBtn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
resources.ApplyResources(this.purgeEndBtn, "purgeEndBtn");
|
||||
this.purgeEndBtn.Name = "purgeEndBtn";
|
||||
this.purgeEndBtn.UseVisualStyleBackColor = false;
|
||||
this.purgeEndBtn.Click += new System.EventHandler(this.purgeEndBtn_Click);
|
||||
//
|
||||
// breakBtn
|
||||
//
|
||||
this.breakBtn.BackColor = System.Drawing.Color.DarkGray;
|
||||
resources.ApplyResources(this.breakBtn, "breakBtn");
|
||||
this.breakBtn.Name = "breakBtn";
|
||||
this.breakBtn.UseVisualStyleBackColor = false;
|
||||
this.breakBtn.Click += new System.EventHandler(this.breakBtn_Click);
|
||||
//
|
||||
// resetResultsBtn
|
||||
//
|
||||
this.resetResultsBtn.BackColor = System.Drawing.Color.Tomato;
|
||||
resources.ApplyResources(this.resetResultsBtn, "resetResultsBtn");
|
||||
this.resetResultsBtn.Name = "resetResultsBtn";
|
||||
this.resetResultsBtn.UseVisualStyleBackColor = false;
|
||||
this.resetResultsBtn.Click += new System.EventHandler(this.resetResultsBtn_Click);
|
||||
//
|
||||
// cameraTestBtn
|
||||
//
|
||||
this.cameraTestBtn.BackColor = System.Drawing.Color.DarkGray;
|
||||
resources.ApplyResources(this.cameraTestBtn, "cameraTestBtn");
|
||||
this.cameraTestBtn.Name = "cameraTestBtn";
|
||||
this.cameraTestBtn.UseVisualStyleBackColor = false;
|
||||
this.cameraTestBtn.Click += new System.EventHandler(this.cameraTestBtn_Click);
|
||||
//
|
||||
// emptyTank1Btn
|
||||
//
|
||||
this.emptyTank1Btn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
resources.ApplyResources(this.emptyTank1Btn, "emptyTank1Btn");
|
||||
this.emptyTank1Btn.Name = "emptyTank1Btn";
|
||||
this.emptyTank1Btn.UseVisualStyleBackColor = false;
|
||||
this.emptyTank1Btn.Click += new System.EventHandler(this.emptyTank1Btn_Click);
|
||||
//
|
||||
// sensitivityTestBtn
|
||||
//
|
||||
this.sensitivityTestBtn.BackColor = System.Drawing.Color.DarkGray;
|
||||
resources.ApplyResources(this.sensitivityTestBtn, "sensitivityTestBtn");
|
||||
this.sensitivityTestBtn.Name = "sensitivityTestBtn";
|
||||
this.sensitivityTestBtn.UseVisualStyleBackColor = false;
|
||||
this.sensitivityTestBtn.Click += new System.EventHandler(this.sensitivityTestBtn_Click);
|
||||
//
|
||||
// emptyTank2Btn
|
||||
//
|
||||
this.emptyTank2Btn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
resources.ApplyResources(this.emptyTank2Btn, "emptyTank2Btn");
|
||||
this.emptyTank2Btn.Name = "emptyTank2Btn";
|
||||
this.emptyTank2Btn.UseVisualStyleBackColor = false;
|
||||
this.emptyTank2Btn.Click += new System.EventHandler(this.emptyTank2Btn_Click);
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.startQ3Btn);
|
||||
this.testGroupBox.Controls.Add(this.startQ2Btn);
|
||||
this.testGroupBox.Controls.Add(this.startQ1Btn);
|
||||
this.testGroupBox.Controls.Add(this.testComboBox);
|
||||
this.testGroupBox.Controls.Add(this.startTestBtn);
|
||||
this.testGroupBox.Controls.Add(this.startCycleBtn);
|
||||
this.testGroupBox.Controls.Add(this.stopBtn);
|
||||
resources.ApplyResources(this.testGroupBox, "testGroupBox");
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.TabStop = false;
|
||||
//
|
||||
// startQ3Btn
|
||||
//
|
||||
this.startQ3Btn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
resources.ApplyResources(this.startQ3Btn, "startQ3Btn");
|
||||
this.startQ3Btn.Name = "startQ3Btn";
|
||||
this.startQ3Btn.UseVisualStyleBackColor = false;
|
||||
this.startQ3Btn.Click += new System.EventHandler(this.startQ3Btn_Click);
|
||||
//
|
||||
// startQ2Btn
|
||||
//
|
||||
this.startQ2Btn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
resources.ApplyResources(this.startQ2Btn, "startQ2Btn");
|
||||
this.startQ2Btn.Name = "startQ2Btn";
|
||||
this.startQ2Btn.UseVisualStyleBackColor = false;
|
||||
this.startQ2Btn.Click += new System.EventHandler(this.startQ2Btn_Click);
|
||||
//
|
||||
// startQ1Btn
|
||||
//
|
||||
this.startQ1Btn.BackColor = System.Drawing.Color.DarkSeaGreen;
|
||||
resources.ApplyResources(this.startQ1Btn, "startQ1Btn");
|
||||
this.startQ1Btn.Name = "startQ1Btn";
|
||||
this.startQ1Btn.UseVisualStyleBackColor = false;
|
||||
this.startQ1Btn.Click += new System.EventHandler(this.startQ1Btn_Click);
|
||||
//
|
||||
// testComboBox
|
||||
//
|
||||
resources.ApplyResources(this.testComboBox, "testComboBox");
|
||||
this.testComboBox.FormattingEnabled = true;
|
||||
this.testComboBox.Name = "testComboBox";
|
||||
this.testComboBox.SelectedIndexChanged += new System.EventHandler(this.testComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// purgeGroupBox
|
||||
//
|
||||
this.purgeGroupBox.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.purgeGroupBox.Controls.Add(this.purgeEndBtn);
|
||||
this.purgeGroupBox.Controls.Add(this.purgeBeginBtn);
|
||||
resources.ApplyResources(this.purgeGroupBox, "purgeGroupBox");
|
||||
this.purgeGroupBox.Name = "purgeGroupBox";
|
||||
this.purgeGroupBox.TabStop = false;
|
||||
//
|
||||
// emptyGroupBox
|
||||
//
|
||||
this.emptyGroupBox.Controls.Add(this.emptyTank3Btn);
|
||||
this.emptyGroupBox.Controls.Add(this.emptyTank1Btn);
|
||||
this.emptyGroupBox.Controls.Add(this.emptyTank2Btn);
|
||||
resources.ApplyResources(this.emptyGroupBox, "emptyGroupBox");
|
||||
this.emptyGroupBox.Name = "emptyGroupBox";
|
||||
this.emptyGroupBox.TabStop = false;
|
||||
//
|
||||
// emptyTank3Btn
|
||||
//
|
||||
this.emptyTank3Btn.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
resources.ApplyResources(this.emptyTank3Btn, "emptyTank3Btn");
|
||||
this.emptyTank3Btn.Name = "emptyTank3Btn";
|
||||
this.emptyTank3Btn.UseVisualStyleBackColor = false;
|
||||
this.emptyTank3Btn.Click += new System.EventHandler(this.emptyTank3Btn_Click);
|
||||
//
|
||||
// otherGroupBox
|
||||
//
|
||||
this.otherGroupBox.Controls.Add(this.customButton);
|
||||
this.otherGroupBox.Controls.Add(this.sensitivityTestBtn);
|
||||
this.otherGroupBox.Controls.Add(this.nextButton);
|
||||
this.otherGroupBox.Controls.Add(this.cameraTestBtn);
|
||||
this.otherGroupBox.Controls.Add(this.breakBtn);
|
||||
resources.ApplyResources(this.otherGroupBox, "otherGroupBox");
|
||||
this.otherGroupBox.Name = "otherGroupBox";
|
||||
this.otherGroupBox.TabStop = false;
|
||||
//
|
||||
// nextButton
|
||||
//
|
||||
resources.ApplyResources(this.nextButton, "nextButton");
|
||||
this.nextButton.Name = "nextButton";
|
||||
this.nextButton.UseVisualStyleBackColor = true;
|
||||
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.acceptResultsBtn);
|
||||
this.groupBox1.Controls.Add(this.resetResultsBtn);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// acceptResultsBtn
|
||||
//
|
||||
this.acceptResultsBtn.BackColor = System.Drawing.Color.ForestGreen;
|
||||
resources.ApplyResources(this.acceptResultsBtn, "acceptResultsBtn");
|
||||
this.acceptResultsBtn.Name = "acceptResultsBtn";
|
||||
this.acceptResultsBtn.UseVisualStyleBackColor = false;
|
||||
this.acceptResultsBtn.Click += new System.EventHandler(this.acceptResultsBtn_Click);
|
||||
//
|
||||
// customButton
|
||||
//
|
||||
resources.ApplyResources(this.customButton, "customButton");
|
||||
this.customButton.Name = "customButton";
|
||||
this.customButton.UseVisualStyleBackColor = true;
|
||||
this.customButton.Click += new System.EventHandler(this.customButton_Click);
|
||||
//
|
||||
// BenchControlPanel
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.otherGroupBox);
|
||||
this.Controls.Add(this.emptyGroupBox);
|
||||
this.Controls.Add(this.purgeGroupBox);
|
||||
this.Controls.Add(this.testGroupBox);
|
||||
this.Name = "BenchControlPanel";
|
||||
this.Load += new System.EventHandler(this.BenchControlPanel_Load);
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.purgeGroupBox.ResumeLayout(false);
|
||||
this.emptyGroupBox.ResumeLayout(false);
|
||||
this.otherGroupBox.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -316,5 +308,6 @@ namespace TBF.UiControls
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Button acceptResultsBtn;
|
||||
private System.Windows.Forms.Button emptyTank3Btn;
|
||||
private System.Windows.Forms.Button customButton;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.UiBridge;
|
||||
@@ -210,6 +209,8 @@ namespace TBF.UiControls
|
||||
private void button1_Click(object sender, EventArgs e) { Bridge.Ui2Bench(UI2BenchCmd.B1); }
|
||||
private void button2_Click(object sender, EventArgs e) { Bridge.Ui2Bench(UI2BenchCmd.B2); }
|
||||
private void nextButton_Click(object sender, EventArgs e) { Bridge.Ui2Bench(UI2BenchCmd.Next); }
|
||||
private void customButton_Click(object sender, EventArgs e) { Bridge.Ui2Bench(UI2BenchCmd.Custom); }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Processes a pressed keys.
|
||||
@@ -280,7 +281,11 @@ namespace TBF.UiControls
|
||||
startCycleBtn.Enabled = ((args.Flags & ButtonsEtc.StartCycleBtnEn) != 0);
|
||||
startCycleBtn.BackColor = startCycleBtn.Enabled ? colorCycleEn : colorCycleDis;
|
||||
|
||||
purgeBeginBtn.Enabled = ((args.Flags & ButtonsEtc.PurgeBeginBtnEn) != 0);
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
customButton.Visible = ((args.Flags & ButtonsEtc.StartCycleBtnEn) != 0);
|
||||
customButton.BackColor = customButton.Visible ? colorCycleEn : colorCycleDis;
|
||||
#endif
|
||||
purgeBeginBtn.Enabled = ((args.Flags & ButtonsEtc.PurgeBeginBtnEn) != 0);
|
||||
purgeBeginBtn.BackColor = purgeBeginBtn.Enabled ? colorPurgeEn : colorPurgeDis;
|
||||
|
||||
purgeEndBtn.Enabled = ((args.Flags & ButtonsEtc.PurgeEndBtnEn) != 0);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -194,7 +194,7 @@ namespace Users.Forms
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception exc)
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show(Strings.Copying_remote_users_failed,
|
||||
Strings.Confirmation,
|
||||
|
||||
Reference in New Issue
Block a user