Output.FileWriters.Basic appends to a file, iPerlSpecial bug fixes, ver.2.6.280
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Config.Entities
|
||||
|
||||
public enum Mounting
|
||||
{
|
||||
[Description("")] Not_specified,
|
||||
[Description("")] NotSpecified,
|
||||
[Description("H")] H, /// horizontal
|
||||
[Description("V")] V, /// vertical
|
||||
[Description("S")] S, /// steig
|
||||
@@ -95,7 +95,7 @@ namespace Config.Entities
|
||||
|
||||
public enum TemperatureClass
|
||||
{
|
||||
[Description("")] Not_specified,
|
||||
[Description("")] NotSpecified,
|
||||
[Description("T30")] T30,
|
||||
[Description("T50")] T50,
|
||||
[Description("T70")] T70,
|
||||
@@ -117,7 +117,7 @@ namespace Config.Entities
|
||||
|
||||
public enum FlowProfileSensitivityClass
|
||||
{
|
||||
[Description("")] Not_specified,
|
||||
[Description("")] NotSpecified,
|
||||
[Description("U0")] U0, /// ?
|
||||
[Description("D0")] D0, /// ?
|
||||
Count
|
||||
@@ -125,7 +125,7 @@ namespace Config.Entities
|
||||
|
||||
public enum PressureLossClass
|
||||
{
|
||||
[Description("")] Not_specified,
|
||||
[Description("")] NotSpecified,
|
||||
[Description("dp63")] dp63, /// 0.063 MPa = 0.63 bar, TODO: Change to "Δp63"
|
||||
[Description("dp40")] dp40, /// 0.040 MPa = 0.40 bar
|
||||
[Description("dp25")] dp25, /// 0.025 MPa = 0.25 bar
|
||||
@@ -137,7 +137,7 @@ namespace Config.Entities
|
||||
/// <summary> Maximum Admissible Pressure </summary>
|
||||
public enum MaxAdmissiblePressure
|
||||
{
|
||||
[Description("")] Not_specified,
|
||||
[Description("")] NotSpecified,
|
||||
[Description("MAP6")] MAP6,
|
||||
[Description("MAP10")] MAP10,
|
||||
[Description("MAP16")] MAP16,
|
||||
|
||||
@@ -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.6.277.0")]
|
||||
[assembly: AssemblyFileVersion("2.6.277.0")]
|
||||
[assembly: AssemblyVersion("2.6.280.0")]
|
||||
[assembly: AssemblyFileVersion("2.6.280.0")]
|
||||
|
||||
@@ -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.6.277.0")]
|
||||
[assembly: AssemblyFileVersion("2.6.277.0")]
|
||||
[assembly: AssemblyVersion("2.6.280.0")]
|
||||
[assembly: AssemblyFileVersion("2.6.280.0")]
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Results
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(36, "L", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(37, "Mounting", (w, t, u, f, p) => w.WaterMeterData.Mounting.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(37, "Mounting", (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription()));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(38, "Q4_Qmax", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p)));
|
||||
@@ -196,10 +196,12 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(68, "Procedure name", (w, t, u, f, p) => w.Batch.ProcedureName));
|
||||
AllItems.Add(new WMeterRsltItemSpec(69, "Watermeters", (w, t, u, f, p) => w.Batch.WatermetersStr));
|
||||
AllItems.Add(new WMeterRsltItemSpec(70, "Protocol title", (w, t, u, f, p) => w.Batch.ProtocolTitle));
|
||||
AllItems.Add(new WMeterRsltItemSpec(71, "Batch start date/time",(w, t, u, f, p) => (string.IsNullOrEmpty(p) ? w.Batch.StartTime.ToShortDateString()
|
||||
: w.Batch.StartTime.ToString(p))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(72, "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(71, "Batch start date/time",(w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.Batch.StartTime.ToShortDateString()
|
||||
: w.Batch.StartTime.ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(72, "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, "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)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
}
|
||||
catch
|
||||
{
|
||||
fileName = string.Format("{1}{2}{3}-{4}{5}.txt", (time.Year % 100).ToString("D2"),
|
||||
fileName = string.Format("{0}{1}{2}-{3}{4}.txt", (time.Year % 100).ToString("D2"),
|
||||
time.Month.ToString("D2"),
|
||||
time.Day.ToString("D2"),
|
||||
time.Hour.ToString("D2"),
|
||||
@@ -158,14 +158,14 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
|
||||
writer = null;
|
||||
if (!string.IsNullOrEmpty(writerCfg.DestinationPath))
|
||||
{
|
||||
try { writer = new StreamWriter(System.IO.File.Create(GetFilename(writerCfg.DestinationPath, batch.EndTime))); }
|
||||
try { writer = File.AppendText(GetFilename(writerCfg.DestinationPath, batch.EndTime)); }
|
||||
catch { };
|
||||
}
|
||||
|
||||
writer2 = null;
|
||||
if (!string.IsNullOrEmpty(writerCfg.DestinationPath2))
|
||||
{
|
||||
try { writer2 = new StreamWriter(System.IO.File.Create(GetFilename(writerCfg.DestinationPath2, batch.EndTime))); }
|
||||
try { writer2 = File.AppendText(GetFilename(writerCfg.DestinationPath2, batch.EndTime)); }
|
||||
catch { };
|
||||
}
|
||||
|
||||
|
||||
@@ -51,16 +51,16 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
|
||||
Producer = string.Empty;
|
||||
DN = 0;
|
||||
L = 0;
|
||||
Mounting = Mounting.Not_specified;
|
||||
Mounting = Mounting.NotSpecified;
|
||||
Qmax = 4.0f;
|
||||
Qn = 2.5f;
|
||||
Qt = 0.005f;
|
||||
Qmin = 0.003125f;
|
||||
MetrologicalClass = "A";
|
||||
TemperatureClass = TemperatureClass.Not_specified;
|
||||
PressureLossClass = PressureLossClass.Not_specified;
|
||||
MaxAdmissiblePressure = MaxAdmissiblePressure.Not_specified;
|
||||
FlowProfileSensitivityClass = FlowProfileSensitivityClass.Not_specified;
|
||||
TemperatureClass = TemperatureClass.NotSpecified;
|
||||
PressureLossClass = PressureLossClass.NotSpecified;
|
||||
MaxAdmissiblePressure = MaxAdmissiblePressure.NotSpecified;
|
||||
FlowProfileSensitivityClass = FlowProfileSensitivityClass.NotSpecified;
|
||||
ApprovalInfo = string.Empty;
|
||||
Certificate = string.Empty;
|
||||
PulsesPerLtr = 1.0f;
|
||||
@@ -111,16 +111,16 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
|
||||
case 1: return Producer;
|
||||
case 2: return DN.ToString();
|
||||
case 3: return L.ToString();
|
||||
case 4: return Mounting.ToString();
|
||||
case 4: return Mounting.ToDescription();
|
||||
case 5: return Qmax.ToString();
|
||||
case 6: return Qn.ToString();
|
||||
case 7: return Qt.ToString();
|
||||
case 8: return Qmin.ToString();
|
||||
case 9: return MetrologicalClass;
|
||||
case 10: return TemperatureClass.ToString();
|
||||
case 11: return PressureLossClass.ToString();
|
||||
case 12: return MaxAdmissiblePressure.ToString();
|
||||
case 13: return FlowProfileSensitivityClass.ToString();
|
||||
case 10: return TemperatureClass.ToDescription();
|
||||
case 11: return PressureLossClass.ToDescription();
|
||||
case 12: return MaxAdmissiblePressure.ToDescription();
|
||||
case 13: return FlowProfileSensitivityClass.ToDescription();
|
||||
case 14: return ApprovalInfo;
|
||||
case 15: return Certificate;
|
||||
case 16: return PulsesPerLtr.ToString();
|
||||
@@ -146,7 +146,7 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
|
||||
case 4:
|
||||
for (Mounting m = 0; m < Mounting.Count; m++)
|
||||
{
|
||||
if (m.ToString().Equals(strValue)) { Mounting = m; return; }
|
||||
if (m.ToDescription().Equals(strValue)) { Mounting = m; return; }
|
||||
}
|
||||
break;
|
||||
case 5: Qmax = Utils.ParseUFloat(strValue); return;
|
||||
@@ -157,25 +157,25 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
|
||||
case 10:
|
||||
for (TemperatureClass tc = 0; tc < TemperatureClass.Count; tc++)
|
||||
{
|
||||
if (tc.ToString().Equals(strValue)) { TemperatureClass = tc; return; }
|
||||
if (tc.ToDescription().Equals(strValue)) { TemperatureClass = tc; return; }
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
for (PressureLossClass dp = 0; dp < PressureLossClass.Count; dp++)
|
||||
{
|
||||
if (dp.ToString().Equals(strValue)) { PressureLossClass = dp; return; }
|
||||
if (dp.ToDescription().Equals(strValue)) { PressureLossClass = dp; return; }
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
for (MaxAdmissiblePressure map = 0; map < MaxAdmissiblePressure.Count; map++)
|
||||
{
|
||||
if (map.ToString().Equals(strValue)) { MaxAdmissiblePressure = map; return; }
|
||||
if (map.ToDescription().Equals(strValue)) { MaxAdmissiblePressure = map; return; }
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
for (FlowProfileSensitivityClass fps = 0; fps < FlowProfileSensitivityClass.Count; fps++)
|
||||
{
|
||||
if (fps.ToString().Equals(strValue)) { FlowProfileSensitivityClass = fps; return; }
|
||||
if (fps.ToDescription().Equals(strValue)) { FlowProfileSensitivityClass = fps; return; }
|
||||
}
|
||||
break;
|
||||
case 14: ApprovalInfo = strValue; return;
|
||||
@@ -220,19 +220,19 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
|
||||
if (Utils.TryParseUFloat(strValue, out dummy)) return true;
|
||||
break;
|
||||
case 4:
|
||||
for (Mounting tc = 0; tc < Mounting.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (Mounting tc = 0; tc < Mounting.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 10:
|
||||
for (TemperatureClass tc = 0; tc < TemperatureClass.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (TemperatureClass tc = 0; tc < TemperatureClass.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 11:
|
||||
for (PressureLossClass tc = 0; tc < PressureLossClass.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (PressureLossClass tc = 0; tc < PressureLossClass.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 12:
|
||||
for (MaxAdmissiblePressure map = 0; map < MaxAdmissiblePressure.Count; map++) if (map.ToString().Equals(strValue)) return true;
|
||||
for (MaxAdmissiblePressure map = 0; map < MaxAdmissiblePressure.Count; map++) if (map.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 13:
|
||||
for (FlowProfileSensitivityClass tc = 0; tc < FlowProfileSensitivityClass.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (FlowProfileSensitivityClass tc = 0; tc < FlowProfileSensitivityClass.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 22:
|
||||
if (strValue.Equals(Strings.cold) || strValue.Equals(Strings.hot)) return true; /// "zimna", "tepla"
|
||||
|
||||
@@ -52,16 +52,16 @@ namespace TBF.BenchControl.WaterMeters.iPerl
|
||||
Producer = string.Empty;
|
||||
DN = 0;
|
||||
L = 0;
|
||||
Mounting = Mounting.Not_specified;
|
||||
Mounting = Mounting.NotSpecified;
|
||||
Q4 = 4.0f;
|
||||
Qn = 2.5f;
|
||||
Q2 = 0.005f;
|
||||
Q1 = 0.003125f;
|
||||
MetrologicalClass = "R800";
|
||||
TemperatureClass = TemperatureClass.Not_specified;
|
||||
PressureLossClass = PressureLossClass.Not_specified;
|
||||
MaxAdmissiblePressure = MaxAdmissiblePressure.Not_specified;
|
||||
FlowProfileSensitivityClass = FlowProfileSensitivityClass.Not_specified;
|
||||
TemperatureClass = TemperatureClass.NotSpecified;
|
||||
PressureLossClass = PressureLossClass.NotSpecified;
|
||||
MaxAdmissiblePressure = MaxAdmissiblePressure.NotSpecified;
|
||||
FlowProfileSensitivityClass = FlowProfileSensitivityClass.NotSpecified;
|
||||
ApprovalInfo = string.Empty;
|
||||
Certificate = string.Empty;
|
||||
PulsesPerLtr = 1.0f;
|
||||
@@ -114,16 +114,16 @@ namespace TBF.BenchControl.WaterMeters.iPerl
|
||||
case 1: return Producer;
|
||||
case 2: return DN.ToString();
|
||||
case 3: return L.ToString();
|
||||
case 4: return Mounting.ToString();
|
||||
case 4: return Mounting.ToDescription();
|
||||
case 5: return Q4.ToString();
|
||||
case 6: return Qn.ToString();
|
||||
case 7: return Q2.ToString();
|
||||
case 8: return Q1.ToString();
|
||||
case 9: return MetrologicalClass;
|
||||
case 10: return TemperatureClass.ToString();
|
||||
case 11: return PressureLossClass.ToString();
|
||||
case 12: return MaxAdmissiblePressure.ToString();
|
||||
case 13: return FlowProfileSensitivityClass.ToString();
|
||||
case 10: return TemperatureClass.ToDescription();
|
||||
case 11: return PressureLossClass.ToDescription();
|
||||
case 12: return MaxAdmissiblePressure.ToDescription();
|
||||
case 13: return FlowProfileSensitivityClass.ToDescription();
|
||||
case 14: return ApprovalInfo;
|
||||
case 15: return Certificate;
|
||||
case 16: return PulsesPerLtr.ToString();
|
||||
@@ -150,7 +150,7 @@ namespace TBF.BenchControl.WaterMeters.iPerl
|
||||
case 4:
|
||||
for (Mounting m = 0; m < Mounting.Count; m++)
|
||||
{
|
||||
if (m.ToString().Equals(strValue)) { Mounting = m; return; }
|
||||
if (m.ToDescription().Equals(strValue)) { Mounting = m; return; }
|
||||
}
|
||||
break;
|
||||
case 5: Q4 = Utils.ParseUFloat(strValue); return;
|
||||
@@ -161,25 +161,25 @@ namespace TBF.BenchControl.WaterMeters.iPerl
|
||||
case 10:
|
||||
for (TemperatureClass tc = 0; tc < TemperatureClass.Count; tc++)
|
||||
{
|
||||
if (tc.ToString().Equals(strValue)) { TemperatureClass = tc; return; }
|
||||
if (tc.ToDescription().Equals(strValue)) { TemperatureClass = tc; return; }
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
for (PressureLossClass dp = 0; dp < PressureLossClass.Count; dp++)
|
||||
{
|
||||
if (dp.ToString().Equals(strValue)) { PressureLossClass = dp; return; }
|
||||
if (dp.ToDescription().Equals(strValue)) { PressureLossClass = dp; return; }
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
for (MaxAdmissiblePressure map = 0; map < MaxAdmissiblePressure.Count; map++)
|
||||
{
|
||||
if (map.ToString().Equals(strValue)) { MaxAdmissiblePressure = map; return; }
|
||||
if (map.ToDescription().Equals(strValue)) { MaxAdmissiblePressure = map; return; }
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
for (FlowProfileSensitivityClass fps = 0; fps < FlowProfileSensitivityClass.Count; fps++)
|
||||
{
|
||||
if (fps.ToString().Equals(strValue)) { FlowProfileSensitivityClass = fps; return; }
|
||||
if (fps.ToDescription().Equals(strValue)) { FlowProfileSensitivityClass = fps; return; }
|
||||
}
|
||||
break;
|
||||
case 14: ApprovalInfo = strValue; return;
|
||||
@@ -226,19 +226,19 @@ namespace TBF.BenchControl.WaterMeters.iPerl
|
||||
if (Utils.TryParseUFloat(strValue, out dummy)) return true;
|
||||
break;
|
||||
case 4:
|
||||
for (Mounting tc = 0; tc < Mounting.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (Mounting tc = 0; tc < Mounting.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 10:
|
||||
for (TemperatureClass tc = 0; tc < TemperatureClass.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (TemperatureClass tc = 0; tc < TemperatureClass.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 11:
|
||||
for (PressureLossClass tc = 0; tc < PressureLossClass.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (PressureLossClass tc = 0; tc < PressureLossClass.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 12:
|
||||
for (MaxAdmissiblePressure map = 0; map < MaxAdmissiblePressure.Count; map++) if (map.ToString().Equals(strValue)) return true;
|
||||
for (MaxAdmissiblePressure map = 0; map < MaxAdmissiblePressure.Count; map++) if (map.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 13:
|
||||
for (FlowProfileSensitivityClass tc = 0; tc < FlowProfileSensitivityClass.Count; tc++) if (tc.ToString().Equals(strValue)) return true;
|
||||
for (FlowProfileSensitivityClass tc = 0; tc < FlowProfileSensitivityClass.Count; tc++) if (tc.ToDescription().Equals(strValue)) return true;
|
||||
break;
|
||||
case 22: /// WMType_ID
|
||||
case 23: /// WMType_Rev
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.6.279.1")]
|
||||
[assembly: AssemblyFileVersion("2.6.279.1")]
|
||||
[assembly: AssemblyVersion("2.6.280.1")]
|
||||
[assembly: AssemblyFileVersion("2.6.280.1")]
|
||||
|
||||
Reference in New Issue
Block a user