iPerlSpecial: Changes done on the system while testing Output.FileWriters.Enhanced protocol, ver.2.7.296
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.7.283.0")]
|
[assembly: AssemblyVersion("2.7.296.0")]
|
||||||
[assembly: AssemblyFileVersion("2.7.283.0")]
|
[assembly: AssemblyFileVersion("2.7.296.0")]
|
||||||
|
|||||||
@@ -113,10 +113,8 @@ namespace Results
|
|||||||
AllItems.Add(new WMeterRsltItemSpec(11, "Uncertainty", "Uncertainty()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(11, "Uncertainty", "Uncertainty()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||||
|
|
||||||
/// Test results
|
/// Test results
|
||||||
AllItems.Add(new WMeterRsltItemSpec(12, "Test start time", "Test start date/time()",(w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetTestRslt(t).StartTime.ToShortTimeString()
|
AllItems.Add(new WMeterRsltItemSpec(12, "Test start time", "Test start date/time()",(w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime))));
|
||||||
: w.GetTestRslt(t).StartTime.ToString(p))));
|
AllItems.Add(new WMeterRsltItemSpec(13, "Test end time", "Test end date/time()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime))));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(13, "Test end time", "Test end date/time()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetTestRslt(t).EndTime.ToShortTimeString()
|
|
||||||
: w.GetTestRslt(t).EndTime.ToString(p))));
|
|
||||||
AllItems.Add(new WMeterRsltItemSpec(14, "Test time", "Test time()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(14, "Test time", "Test time()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(15, "Flow", "Flow()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
|
AllItems.Add(new WMeterRsltItemSpec(15, "Flow", "Flow()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(16, "T in", "T in()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempInAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(16, "T in", "T in()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempInAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||||
@@ -129,14 +127,18 @@ namespace Results
|
|||||||
AllItems.Add(new WMeterRsltItemSpec(23, "P down start", "P down start()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(23, "P down start", "P down start()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(24, "P down end", "P down end()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(24, "P down end", "P down end()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(25, "Reference error", "Reference error()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(25, "Reference error", "Reference error()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(26, "Ambient temperature","Ambient temperature()",(w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientTempAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(26, "Ambient temperature","Ambient temperature()",(w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientTempAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(27, "Ambient pressure", "Ambient pressure()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientPressAve).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(27, "Ambient pressure", "Ambient pressure()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientPressAve).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(28, "Ambient humidity", "Ambient humidity()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientHumiAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(28, "Ambient humidity", "Ambient humidity()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientHumiAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||||
|
|
||||||
/// Single and combined meter results
|
/// Single and combined meter results
|
||||||
AllItems.Add(new WMeterRsltItemSpec(29, "Volume", "Volume()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(29, "Volume", "Volume()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(30, "Reference volume", "Reference volume()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
AllItems.Add(new WMeterRsltItemSpec(30, "Reference volume", "Reference volume()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(31, "Error", "Error()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
#if IPERLST || IPERLST_SPECIAL
|
||||||
|
AllItems.Add(new WMeterRsltItemSpec(31, "Error", "Error()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||||
|
#else
|
||||||
|
AllItems.Add(new WMeterRsltItemSpec(31, "Error", "Error()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||||
|
#endif
|
||||||
AllItems.Add(new WMeterRsltItemSpec(32, "Passed", "Passed()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr()));
|
AllItems.Add(new WMeterRsltItemSpec(32, "Passed", "Passed()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr()));
|
||||||
|
|
||||||
/// Water meter info
|
/// Water meter info
|
||||||
@@ -208,10 +210,8 @@ namespace Results
|
|||||||
AllItems.Add(new WMeterRsltItemSpec(68, "Procedure name", "Procedure name", (w, t, u, f, p) => w.Batch.ProcedureName));
|
AllItems.Add(new WMeterRsltItemSpec(68, "Procedure name", "Procedure name", (w, t, u, f, p) => w.Batch.ProcedureName));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(69, "Watermeters", "Watermeters", (w, t, u, f, p) => w.Batch.WatermetersStr));
|
AllItems.Add(new WMeterRsltItemSpec(69, "Watermeters", "Watermeters", (w, t, u, f, p) => w.Batch.WatermetersStr));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(70, "Protocol title", "Protocol title", (w, t, u, f, p) => w.Batch.ProtocolTitle));
|
AllItems.Add(new WMeterRsltItemSpec(70, "Protocol title", "Protocol title", (w, t, u, f, p) => w.Batch.ProtocolTitle));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(71, "Batch start time", "Batch start date/time", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.Batch.StartTime.ToShortDateString()
|
AllItems.Add(new WMeterRsltItemSpec(71, "Batch start time", "Batch start date/time", (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
|
||||||
: w.Batch.StartTime.ToString(p)));
|
AllItems.Add(new WMeterRsltItemSpec(72, "Batch end time", "Batch end date/time", (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(72, "Batch end time", "Batch end date/time", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.Batch.EndTime.ToShortDateString()
|
|
||||||
: w.Batch.EndTime.ToString(p)));
|
|
||||||
AllItems.Add(new WMeterRsltItemSpec(73, null, "1 / PlsPerLtr_Read", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString()
|
AllItems.Add(new WMeterRsltItemSpec(73, null, "1 / PlsPerLtr_Read", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString()
|
||||||
: ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString(p)));
|
: ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString(p)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
|||||||
groupBox4.Text = Strings.Water_Meter + " 4";
|
groupBox4.Text = Strings.Water_Meter + " 4";
|
||||||
groupBox5.Text = Strings.Water_Meter + " 5";
|
groupBox5.Text = Strings.Water_Meter + " 5";
|
||||||
groupBox6.Text = Strings.Water_Meter + " 6";
|
groupBox6.Text = Strings.Water_Meter + " 6";
|
||||||
snLabel1.Text = Strings.WMSN;
|
snLabel1.Text = Strings.SerialNr;
|
||||||
snLabel2.Text = Strings.WMSN;
|
snLabel2.Text = Strings.SerialNr;
|
||||||
snLabel3.Text = Strings.WMSN;
|
snLabel3.Text = Strings.SerialNr;
|
||||||
snLabel4.Text = Strings.WMSN;
|
snLabel4.Text = Strings.SerialNr;
|
||||||
snLabel5.Text = Strings.WMSN;
|
snLabel5.Text = Strings.SerialNr;
|
||||||
snLabel6.Text = Strings.WMSN;
|
snLabel6.Text = Strings.SerialNr;
|
||||||
wmStateLabel1.Text = Strings.WMState;
|
wmStateLabel1.Text = Strings.WMState;
|
||||||
wmStateLabel2.Text = Strings.WMState;
|
wmStateLabel2.Text = Strings.WMState;
|
||||||
wmStateLabel3.Text = Strings.WMState;
|
wmStateLabel3.Text = Strings.WMState;
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
return string.Format("{0}{1:yyMMdd}-{1:hhss}.txt", directory, time);
|
return string.Format("{0}{1:yyMMdd-HHmm}.txt", directory, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
return string.Format("{0}{1:yyMMdd}-{1:hhss}.txt", directory, time);
|
return string.Format("{0}{1:yyMMdd-HHmm}.txt", directory, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,16 +187,20 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Start this operation</summary>
|
/// <summary>Start this operation</summary>
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
if (writer == null) return;
|
if (writer != null) WriteRslts(writer);
|
||||||
|
if (writer2 != null) WriteRslts(writer2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WriteRslts(StreamWriter wr)
|
||||||
|
{
|
||||||
///----------
|
///----------
|
||||||
/// Header
|
/// Header
|
||||||
///----------
|
///----------
|
||||||
if (!string.IsNullOrEmpty(writerCfg.Header)) writer.Write(writerCfg.Header);
|
if (!string.IsNullOrEmpty(writerCfg.Header)) wr.Write(header);
|
||||||
writer.WriteLine(batch.ProtocolTitle);
|
wr.WriteLine(batch.ProtocolTitle);
|
||||||
writer.WriteLine(string.Empty);
|
wr.WriteLine(string.Empty);
|
||||||
|
|
||||||
///----------------
|
///----------------
|
||||||
/// Common items
|
/// Common items
|
||||||
@@ -207,7 +211,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
foreach (var v in commonItems)
|
foreach (var v in commonItems)
|
||||||
{
|
{
|
||||||
leftColumn[cnt] = v.Caption + ": ";
|
leftColumn[cnt] = v.Caption;
|
||||||
rightColumn[cnt] = v.Print(batch.WaterMeters[0]);
|
rightColumn[cnt] = v.Print(batch.WaterMeters[0]);
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
@@ -219,30 +223,44 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
/// Write aligned columns
|
/// Write aligned columns
|
||||||
for (int i = 0; i < Math.Min(leftColumn.Length, rightColumn.Length); i++)
|
for (int i = 0; i < Math.Min(leftColumn.Length, rightColumn.Length); i++)
|
||||||
{
|
{
|
||||||
writer.Write(leftColumn[i]);
|
wr.Write(leftColumn[i]);
|
||||||
writer.Write(new string(' ', maxLen - leftColumn[i].Length + 3));
|
wr.Write(new string(' ', maxLen - leftColumn[i].Length + 3));
|
||||||
writer.WriteLine(rightColumn[i]);
|
wr.WriteLine(rightColumn[i]);
|
||||||
}
|
}
|
||||||
writer.WriteLine(string.Empty);
|
|
||||||
|
|
||||||
///--------
|
///--------
|
||||||
/// Body
|
/// Body
|
||||||
///--------
|
///--------
|
||||||
foreach (var wm in batch.WaterMeters) WriteWM(wm);
|
foreach (var wm in batch.WaterMeters) WriteWM(wr, wm);
|
||||||
|
|
||||||
///----------
|
///----------
|
||||||
/// Footer
|
/// Footer
|
||||||
///----------
|
///----------
|
||||||
if (!string.IsNullOrEmpty(writerCfg.Footer)) writer.Write(writerCfg.Footer);
|
if (!string.IsNullOrEmpty(writerCfg.Footer)) wr.Write(footer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write one water meter results
|
/// Write one water meter results
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="wmNr">Water meter number (0-based)</param>
|
/// <param name="wmNr">Water meter number (0-based)</param>
|
||||||
void WriteWM(Results.Entities.WaterMeter wm)
|
void WriteWM(StreamWriter wr, Results.Entities.WaterMeter wm)
|
||||||
{
|
{
|
||||||
/// Determine column widths
|
wr.WriteLine(string.Empty);
|
||||||
|
|
||||||
|
/// Write water meter number and s/n
|
||||||
|
wr.Write(string.Format(Strings.Water_Meter_nr, wm.WMPosition));
|
||||||
|
if (!wm.Compound())
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(wm.SerialNr)) wr.Write(string.Format(", {0} {1}", Strings.SerialNr, wm.SerialNr));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(wm.SerialNr)) wr.Write(string.Format(", {0} {1}", Strings.Main_WM_SerialNr, wm.SerialNr));
|
||||||
|
if (!string.IsNullOrEmpty(wm.SerialNrAux)) wr.Write(string.Format(", {0} {1}", Strings.Aux_WM_SerialNr, wm.SerialNrAux));
|
||||||
|
}
|
||||||
|
wr.WriteLine(string.Empty);
|
||||||
|
|
||||||
|
/// Determine column widths
|
||||||
int[] columnWidths = new int[testItems.Count];
|
int[] columnWidths = new int[testItems.Count];
|
||||||
int totalWidth = 0;
|
int totalWidth = 0;
|
||||||
for (int i = 0; i < testItems.Count; i++)
|
for (int i = 0; i < testItems.Count; i++)
|
||||||
@@ -282,45 +300,31 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
}
|
}
|
||||||
totalWidth += 3 * (testItems.Count - 1);
|
totalWidth += 3 * (testItems.Count - 1);
|
||||||
if (totalWidth < 0) totalWidth = 0;
|
if (totalWidth < 0) totalWidth = 0;
|
||||||
|
|
||||||
/// Write water meter number and s/n
|
|
||||||
writer.Write(string.Format("Water meter {0}", wm.WMPosition));
|
|
||||||
if (!wm.Compound())
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(wm.SerialNr)) writer.Write(string.Format(", s/n: {0}", wm.SerialNr));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(wm.SerialNr)) writer.Write(string.Format(", Main s/n: {0}", wm.SerialNr));
|
|
||||||
if (!string.IsNullOrEmpty(wm.SerialNrAux)) writer.Write(string.Format(", Aux s/n: {0}", wm.SerialNrAux));
|
|
||||||
}
|
|
||||||
writer.WriteLine(string.Empty);
|
|
||||||
|
|
||||||
|
|
||||||
writer.WriteLine(new String('-', totalWidth)); /// Horizontal line above the header
|
wr.WriteLine(new String('-', totalWidth)); /// Horizontal line above the header
|
||||||
|
|
||||||
|
|
||||||
/// Write column headers
|
/// Write column headers
|
||||||
for (int i = 0; i < testItems.Count; i++)
|
for (int i = 0; i < testItems.Count; i++)
|
||||||
{
|
{
|
||||||
writer.Write(ElSpaces(testItems[i].ClmnHeaderText));
|
wr.Write(ElSpaces(testItems[i].ClmnHeaderText));
|
||||||
|
|
||||||
if (i < testItems.Count - 1)
|
if (i < testItems.Count - 1)
|
||||||
{
|
{
|
||||||
if (!writerCfg.EliminateSpaces)
|
if (!writerCfg.EliminateSpaces)
|
||||||
{
|
{
|
||||||
writer.Write(new string(' ', columnWidths[i] - testItems[i].ClmnHeaderText.Length + 3));
|
wr.Write(new string(' ', columnWidths[i] - testItems[i].ClmnHeaderText.Length + 3));
|
||||||
}
|
}
|
||||||
writer.Write(separatorStr);
|
wr.Write(separatorStr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
writer.WriteLine(string.Empty);
|
wr.WriteLine(string.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
writer.WriteLine(new String('-', totalWidth)); /// Horizontal line between the header and the body
|
wr.WriteLine(new String('-', totalWidth)); /// Horizontal line between the header and the body
|
||||||
|
|
||||||
|
|
||||||
/// Write table data
|
/// Write table data
|
||||||
@@ -357,27 +361,25 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
string[] texts = itemText.Split(new char[] { '|' });
|
string[] texts = itemText.Split(new char[] { '|' });
|
||||||
if (texts.Length == 2) { itemText = texts[0]; } /// Strip color information
|
if (texts.Length == 2) { itemText = texts[0]; } /// Strip color information
|
||||||
|
|
||||||
writer.Write(ElSpaces(itemText));
|
wr.Write(ElSpaces(itemText));
|
||||||
|
|
||||||
if (i < testItems.Count - 1)
|
if (i < testItems.Count - 1)
|
||||||
{
|
{
|
||||||
if (!writerCfg.EliminateSpaces)
|
if (!writerCfg.EliminateSpaces)
|
||||||
{
|
{
|
||||||
writer.Write(new string(' ', columnWidths[i] - itemText.Length + 3));
|
wr.Write(new string(' ', columnWidths[i] - itemText.Length + 3));
|
||||||
}
|
}
|
||||||
writer.Write(separatorStr);
|
wr.Write(separatorStr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
writer.WriteLine(string.Empty);
|
wr.WriteLine(string.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.WriteLine(new String('-', totalWidth)); /// Horizontal line below the body
|
wr.WriteLine(new String('-', totalWidth)); /// Horizontal line below the body
|
||||||
|
|
||||||
writer.WriteLine(string.Empty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -392,8 +394,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
/// <summary>Stop this operation</summary>
|
/// <summary>Stop this operation</summary>
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
if (writer != null) writer.Close();
|
if (writer != null) writer.Close();
|
||||||
writer = null;
|
if (writer2 != null) writer2.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
YearFolders = YearFolders.FourDigit;
|
YearFolders = YearFolders.FourDigit;
|
||||||
MonthFolders = MonthFolders.Digit;
|
MonthFolders = MonthFolders.Digit;
|
||||||
DayFolders = DayFolders.Digit;
|
DayFolders = DayFolders.Digit;
|
||||||
FileNameFormat = "{0:yyMMdd}-{0:hhss}.txt";
|
FileNameFormat = "{0:yyMMdd-HHmm}.txt";
|
||||||
Separator = Separator.None;
|
Separator = Separator.None;
|
||||||
EliminateSpaces = false;
|
EliminateSpaces = false;
|
||||||
Header = string.Empty;
|
Header = string.Empty;
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.7.293.1")]
|
[assembly: AssemblyVersion("2.7.296.1")]
|
||||||
[assembly: AssemblyFileVersion("2.7.293.1")]
|
[assembly: AssemblyFileVersion("2.7.296.1")]
|
||||||
|
|||||||
+28
-10
@@ -277,7 +277,7 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to @temperature [degC].
|
/// Looks up a localized string similar to @temperature [°C].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string AtTemperature_C {
|
internal static string AtTemperature_C {
|
||||||
get {
|
get {
|
||||||
@@ -285,6 +285,15 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Aux.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Aux {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Aux", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Aux:.
|
/// Looks up a localized string similar to Aux:.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1437,6 +1446,15 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Main.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Main {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Main", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Main:.
|
/// Looks up a localized string similar to Main:.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2787,6 +2805,15 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Serial Nr..
|
||||||
|
/// </summary>
|
||||||
|
internal static string SerialNr {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SerialNr", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Set flow.
|
/// Looks up a localized string similar to Set flow.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -3717,15 +3744,6 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to S/N:.
|
|
||||||
/// </summary>
|
|
||||||
internal static string WMSN {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("WMSN", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to State [liter].
|
/// Looks up a localized string similar to State [liter].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1143,7 +1143,7 @@
|
|||||||
<data name="Water_meters" xml:space="preserve">
|
<data name="Water_meters" xml:space="preserve">
|
||||||
<value>Vodoměry</value>
|
<value>Vodoměry</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMSN" xml:space="preserve">
|
<data name="SerialNr" xml:space="preserve">
|
||||||
<value>S/N</value>
|
<value>S/N</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMState" xml:space="preserve">
|
<data name="WMState" xml:space="preserve">
|
||||||
|
|||||||
@@ -933,8 +933,8 @@
|
|||||||
<data name="Water_Meter_SNs_States" xml:space="preserve">
|
<data name="Water_Meter_SNs_States" xml:space="preserve">
|
||||||
<value>WZ-Serienummer_Stand</value>
|
<value>WZ-Serienummer_Stand</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMSN" xml:space="preserve">
|
<data name="SerialNr" xml:space="preserve">
|
||||||
<value>WZ-Typ</value>
|
<value>Seriennummer</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMState" xml:space="preserve">
|
<data name="WMState" xml:space="preserve">
|
||||||
<value>WZ_Stand</value>
|
<value>WZ_Stand</value>
|
||||||
|
|||||||
@@ -1044,7 +1044,7 @@
|
|||||||
<data name="Water_meters" xml:space="preserve">
|
<data name="Water_meters" xml:space="preserve">
|
||||||
<value>Wodomierze</value>
|
<value>Wodomierze</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMSN" xml:space="preserve">
|
<data name="SerialNr" xml:space="preserve">
|
||||||
<value>S / N:</value>
|
<value>S / N:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMState" xml:space="preserve">
|
<data name="WMState" xml:space="preserve">
|
||||||
|
|||||||
@@ -835,8 +835,8 @@
|
|||||||
<data name="Water_Meter_States" xml:space="preserve">
|
<data name="Water_Meter_States" xml:space="preserve">
|
||||||
<value>Water Meter States</value>
|
<value>Water Meter States</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMSN" xml:space="preserve">
|
<data name="SerialNr" xml:space="preserve">
|
||||||
<value>S/N:</value>
|
<value>Serial Nr.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMState" xml:space="preserve">
|
<data name="WMState" xml:space="preserve">
|
||||||
<value>State [liter]</value>
|
<value>State [liter]</value>
|
||||||
@@ -1031,7 +1031,7 @@
|
|||||||
<value>Start</value>
|
<value>Start</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AtTemperature_C" xml:space="preserve">
|
<data name="AtTemperature_C" xml:space="preserve">
|
||||||
<value>@temperature [degC]</value>
|
<value>@temperature [°C]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Density_kg_m3" xml:space="preserve">
|
<data name="Density_kg_m3" xml:space="preserve">
|
||||||
<value>Density [kg/m3]</value>
|
<value>Density [kg/m3]</value>
|
||||||
@@ -1354,4 +1354,10 @@
|
|||||||
<data name="Year_of_production" xml:space="preserve">
|
<data name="Year_of_production" xml:space="preserve">
|
||||||
<value>Year of production</value>
|
<value>Year of production</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Aux" xml:space="preserve">
|
||||||
|
<value>Aux</value>
|
||||||
|
</data>
|
||||||
|
<data name="Main" xml:space="preserve">
|
||||||
|
<value>Main</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1140,7 +1140,7 @@
|
|||||||
<data name="Water_meters" xml:space="preserve">
|
<data name="Water_meters" xml:space="preserve">
|
||||||
<value>水表</value>
|
<value>水表</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMSN" xml:space="preserve">
|
<data name="SerialNr" xml:space="preserve">
|
||||||
<value>序列号:</value>
|
<value>序列号:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WMState" xml:space="preserve">
|
<data name="WMState" xml:space="preserve">
|
||||||
|
|||||||
Reference in New Issue
Block a user