(1) Bug fixes in Results.ItemID.Flow_ctv and Strings.Tooltip_Q_v_r, (2) FileWriters.Enhanced modification for CSV-format, ver. 2.18.939

This commit is contained in:
Milan Hanajik 2018-06-22 12:21:42 +02:00
parent 41c662f053
commit fce2fcf293
6 changed files with 31 additions and 10 deletions

View File

@ -1303,7 +1303,7 @@ namespace Results.Resources {
}
/// <summary>
/// Looks up a localized string similar to Flow calculated from conventional true volume and the time.
/// Looks up a localized string similar to Flow measured by the reference flow meter.
/// </summary>
internal static string Tooltip_Q_v_r {
get {

View File

@ -514,7 +514,7 @@
<value>Flow obtained from the master meter - mean</value>
</data>
<data name="Tooltip_Q_v_r" xml:space="preserve">
<value>Flow calculated from conventional true volume and the time</value>
<value>Flow measured by the reference flow meter</value>
</data>
<data name="Tooltip_T_di_ac" xml:space="preserve">
<value>Actual temperature at the diverter</value>

View File

@ -132,7 +132,10 @@ namespace Results
/// Static list of all available items
public static readonly IList<WMeterRsltItemSpec> AllItems;
/// Static constructor that initializes the list of all items
/// <summary>
/// Initializes the <see cref="WMeterRsltItemSpec"/> class.
/// </summary>
/// Static constructor that initializes the list of all items
static WMeterRsltItemSpec()
{
AllItems = new List<WMeterRsltItemSpec>();
@ -209,7 +212,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_max, string.Format("{0} ref max ()", Strings.VName_Flow), Strings.Tooltip_Q_max, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMax)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_start, string.Format("{0} ref start ()",Strings.VName_Flow),Strings.Tooltip_Q_start, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowStart)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_end, string.Format("{0} ref end ()", Strings.VName_Flow), Strings.Tooltip_Q_end, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv, string.Format("{0} ctv min ()", Strings.VName_Flow), "Mean CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TestTime == 0) ? 0 : w.GetTestRslt(t).VolumeCTV / w.GetTestRslt(t).TestTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv, string.Format("{0} ctv ()", Strings.VName_Flow), "CTV of the flow (mean val.)",Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TestTime == 0) ? 0 : 3.6 * w.GetTestRslt(t).VolumeCTV / w.GetTestRslt(t).TestTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_min, string.Format("{0} ctv min ()", Strings.VName_Flow), "Min. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowMin / w.GetTestRslt(t).VolumeMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_max, string.Format("{0} ctv max ()", Strings.VName_Flow), "Max. CTV of the flow", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowMax / w.GetTestRslt(t).VolumeMaster)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_ctv_start, string.Format("{0} ctv start ()", Strings.VName_Flow), "Start flow CTV", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).VolumeMaster == 0) ? 0 : w.GetTestRslt(t).VolumeCTV * w.GetTestRslt(t).FlowStart / w.GetTestRslt(t).VolumeMaster)));

View File

@ -291,7 +291,13 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
if (abort) return;
wrtr.Write(leftColumn[i]);
wrtr.Write(new string(' ', maxLen - leftColumn[i].Length + 3));
if (!writerCfg.EliminateSpaces)
{
wrtr.Write(new string(' ', maxLen - leftColumn[i].Length + 3));
}
wrtr.Write(separatorStr);
wrtr.WriteLine(rightColumn[i]);
}
@ -376,7 +382,10 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
string horizontalLine = new String('-', totalWidth);
wr.WriteLine(horizontalLine); /// Horizontal line above the header
if (!writerCfg.EliminateSpaces)
{
wr.WriteLine(horizontalLine); /// Horizontal line above the header
}
/// Write column headers
for (int i = 0; i < testItems.Count; i++)
@ -400,7 +409,10 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
}
}
wr.WriteLine(horizontalLine); /// Horizontal line between the header and the body
if (!writerCfg.EliminateSpaces)
{
wr.WriteLine(horizontalLine); /// Horizontal line between the header and the body
}
/// Write table data
int rowsCount = 0;
@ -443,7 +455,10 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
}
}
wr.WriteLine(horizontalLine); /// Horizontal line below the body
if (!writerCfg.EliminateSpaces)
{
wr.WriteLine(horizontalLine); /// Horizontal line below the body
}
}
}
}

View File

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

View File

@ -1596,4 +1596,7 @@
<data name="Correction" xml:space="preserve">
<value>Коррекция</value>
</data>
<data name="Resetting_scales" xml:space="preserve">
<value>Сброс весов</value>
</data>
</root>