(1) Units : Quantity.Enumerated added, (2) LoginDlgWithBenchSelection : List of benches is alphabetically sorted.
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Config
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test bench database settings, contains bench name and settings od several databases
|
/// Test bench database settings, contains bench name and settings od several databases
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DatabaseSettings : ICloneable
|
public class DatabaseSettings : ICloneable, IComparable
|
||||||
{
|
{
|
||||||
// Public fields
|
// Public fields
|
||||||
public string BenchName;
|
public string BenchName;
|
||||||
@@ -45,6 +45,12 @@ namespace Config
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int CompareTo(object dbs2)
|
||||||
|
{
|
||||||
|
if (!(dbs2 is DatabaseSettings)) return 0;
|
||||||
|
return String.Compare(BenchName, (dbs2 as DatabaseSettings).BenchName);
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return string.Format("{0} config={1} results={2} events={3} users={4}",
|
return string.Format("{0} config={1} results={2} events={3} users={4}",
|
||||||
|
|||||||
+5
-1
@@ -122,6 +122,7 @@ namespace Config
|
|||||||
[Description("Text")] String,
|
[Description("Text")] String,
|
||||||
[Description("Boolean")] Boolean,
|
[Description("Boolean")] Boolean,
|
||||||
[Description("Datum und Uhrzeit")] DateTime,
|
[Description("Datum und Uhrzeit")] DateTime,
|
||||||
|
[Description("Aufgezählt")] Enumerated,
|
||||||
#elif LANG_PL
|
#elif LANG_PL
|
||||||
[Description("Objętość")] Volume,
|
[Description("Objętość")] Volume,
|
||||||
[Description("Przepływ")] Flow,
|
[Description("Przepływ")] Flow,
|
||||||
@@ -144,6 +145,7 @@ namespace Config
|
|||||||
[Description("Tekst")] String,
|
[Description("Tekst")] String,
|
||||||
[Description("Boolean")] Boolean,
|
[Description("Boolean")] Boolean,
|
||||||
[Description("Data i czas")] DateTime,
|
[Description("Data i czas")] DateTime,
|
||||||
|
[Description("Wyliczone")] Enumerated,
|
||||||
#elif LANG_CS
|
#elif LANG_CS
|
||||||
[Description("Objem")] Volume,
|
[Description("Objem")] Volume,
|
||||||
[Description("Průtok")] Flow,
|
[Description("Průtok")] Flow,
|
||||||
@@ -166,6 +168,7 @@ namespace Config
|
|||||||
[Description("Text")] String,
|
[Description("Text")] String,
|
||||||
[Description("Boolean")] Boolean,
|
[Description("Boolean")] Boolean,
|
||||||
[Description("Datum a čas")] DateTime,
|
[Description("Datum a čas")] DateTime,
|
||||||
|
[Description("Vyjmenované")] Enumerated,
|
||||||
#elif LANG_IT
|
#elif LANG_IT
|
||||||
[Description("Volume")] Volume,
|
[Description("Volume")] Volume,
|
||||||
[Description("Flusso")] Flow,
|
[Description("Flusso")] Flow,
|
||||||
@@ -188,6 +191,7 @@ namespace Config
|
|||||||
[Description("Stringa")] String,
|
[Description("Stringa")] String,
|
||||||
[Description("Boolean")] Boolean,
|
[Description("Boolean")] Boolean,
|
||||||
[Description("Data e ora")] DateTime,
|
[Description("Data e ora")] DateTime,
|
||||||
|
[Description("Enumerato")] Enumerated,
|
||||||
#else
|
#else
|
||||||
[Description("Volume")] Volume,
|
[Description("Volume")] Volume,
|
||||||
[Description("Flow")] Flow,
|
[Description("Flow")] Flow,
|
||||||
@@ -210,7 +214,7 @@ namespace Config
|
|||||||
[Description("String")] String,
|
[Description("String")] String,
|
||||||
[Description("Boolean")] Boolean,
|
[Description("Boolean")] Boolean,
|
||||||
[Description("Date and time")] DateTime,
|
[Description("Date and time")] DateTime,
|
||||||
[Description("Enum")] Enum,
|
[Description("Enumerated")] Enumerated,
|
||||||
#endif
|
#endif
|
||||||
Count,
|
Count,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ namespace Results
|
|||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr(f)
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr(f)
|
||||||
: ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr(f))));
|
: ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr(f))));
|
||||||
|
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ThreeState, "Three state result", Quantity.Enum, ItemCategory.MeterResult, (w, t, u, f, p) => FormatThreeState(f, w.ThreeStateFromTests())));
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.ThreeState, "Three state result", Quantity.Enumerated, ItemCategory.MeterResult, (w, t, u, f, p) => FormatThreeState(f, w.ThreeStateFromTests())));
|
||||||
|
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.RefFlowmeter, "Ref. flowmeter", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null) ? FormatStr(f, w.GetTestRslt(t).RefFlowmeter()) : string.Empty));
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.RefFlowmeter, "Ref. flowmeter", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null) ? FormatStr(f, w.GetTestRslt(t).RefFlowmeter()) : string.Empty));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ResultOrErrorFlags, "Winiki lub E", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.PassedOrErrorFlagsStr()))); /// PL specific result
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.ResultOrErrorFlags, "Winiki lub E", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.PassedOrErrorFlagsStr()))); /// PL specific result
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ namespace TBF.UI.Shared
|
|||||||
userNameTextBox.Text = "milan";
|
userNameTextBox.Text = "milan";
|
||||||
passwordTextBox.Text = "kremik";
|
passwordTextBox.Text = "kremik";
|
||||||
#endif
|
#endif
|
||||||
|
Array.Sort(Program.LocalSettings.TestBenches);
|
||||||
for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
||||||
{
|
{
|
||||||
testBenchComboBox.Items.Add(Program.LocalSettings.TestBenches[i].BenchName);
|
testBenchComboBox.Items.Add(Program.LocalSettings.TestBenches[i].BenchName);
|
||||||
|
|||||||
Reference in New Issue
Block a user