Problems with 'standrohre' test results (parts) and test names in BenchControlPanel fixed, version 1.6.149.
This commit is contained in:
parent
5b31a94b74
commit
d83b497fa0
@ -32,7 +32,11 @@ namespace ResultsBrowser
|
||||
public static DatabaseSettings CurrentBench;
|
||||
const string SQLiteDbFName = "SQLite.db";
|
||||
|
||||
#if DN100 || MUNICH || BADGER_VELKA_TRAT
|
||||
#if MUNICH
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 1;
|
||||
public const int CompoundWMsCount = 1;
|
||||
#elif DN100 || BADGER_VELKA_TRAT
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
|
||||
@ -387,7 +387,7 @@ namespace TBF.BenchControl
|
||||
{
|
||||
foreach (var test in Tests)
|
||||
{
|
||||
if (test.Name.Equals(TBF.UiBridge.Bridge.SelectedTestName)) return test;
|
||||
if (Utils.TestTitle(test, 1).Equals(UiBridge.Bridge.SelectedTestName)) return test;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -39,7 +39,11 @@ namespace TBF
|
||||
public static DatabaseSettings CurrentBench;
|
||||
const string SQLiteDbFName = "SQLite.db";
|
||||
|
||||
#if DN100 || MUNICH || BADGER_VELKA_TRAT
|
||||
#if MUNICH
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 1;
|
||||
public const int CompoundWMsCount = 1;
|
||||
#elif DN100 || BADGER_VELKA_TRAT
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.6.148.1")]
|
||||
[assembly: AssemblyFileVersion("1.6.148.1")]
|
||||
[assembly: AssemblyVersion("1.6.149.1")]
|
||||
[assembly: AssemblyFileVersion("1.6.149.1")]
|
||||
|
||||
@ -74,18 +74,10 @@ namespace TBF
|
||||
progresses = new List<UiControls.TestProgressCtrl>();
|
||||
foreach (var test in args.Procedure.Tests)
|
||||
{
|
||||
/// Single test
|
||||
if (test.Repeats == 1)
|
||||
{
|
||||
UiControls.TestProgressCtrl prgrs = new UiControls.TestProgressCtrl(test.Id, test.Name);
|
||||
progresses.Add(prgrs);
|
||||
parent.Controls.Add(prgrs);
|
||||
continue;
|
||||
}
|
||||
/// More test repetitions
|
||||
for (int i = 1; i <= test.Repeats; i++)
|
||||
{
|
||||
UiControls.TestProgressCtrl prgrs = new UiControls.TestProgressCtrl(test.Id, test.Name, i, test.Repeats);
|
||||
UiControls.TestProgressCtrl prgrs =
|
||||
new UiControls.TestProgressCtrl(test.Id, Utils.TestTitle(test, i), i, test.Repeats);
|
||||
progresses.Add(prgrs);
|
||||
parent.Controls.Add(prgrs);
|
||||
}
|
||||
|
||||
@ -129,7 +129,13 @@ namespace TBF.UiControls
|
||||
Program.MainWnd.CurrentProcedure = procedures[0];
|
||||
|
||||
testComboBox.Items.Clear();
|
||||
foreach (var test in procedures[0].Tests) testComboBox.Items.Add(test.Name);
|
||||
foreach (var test in procedures[0].Tests)
|
||||
{
|
||||
for (int i = 1; i <= test.Repeats; i++)
|
||||
{
|
||||
testComboBox.Items.Add(Utils.TestTitle(test, i));
|
||||
}
|
||||
}
|
||||
|
||||
if (testComboBox.Items.Contains(oriTestName))
|
||||
{
|
||||
@ -138,8 +144,22 @@ namespace TBF.UiControls
|
||||
}
|
||||
else if (procedures[0].Tests.Count > 0)
|
||||
{
|
||||
testComboBox.Text = procedures[0].Tests[0].Name;
|
||||
TestName = procedures[0].Tests[0].Name;
|
||||
Entities.Test test = procedures[0].Tests[0];
|
||||
string title;
|
||||
if (test.Repeats == 1)
|
||||
{
|
||||
if (test.Part == 0)
|
||||
title = test.Name; /// Single test
|
||||
else
|
||||
title = string.Format("{0} ({1})", test.Name, test.Part); /// A part of a single test
|
||||
}
|
||||
else
|
||||
{
|
||||
title = string.Format("{0} ({1}/{2})", test.Name, 1, test.Repeats); /// More test repetitions
|
||||
}
|
||||
|
||||
testComboBox.Text = title;
|
||||
TestName = title;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -52,19 +52,13 @@ namespace TBF.UiControls
|
||||
this.TestResult = UiControls.TestProgressCtrl.Result.NotDone;
|
||||
}
|
||||
|
||||
public TestProgressCtrl(int testId, string testName, int repetitionNr, int testRepeats)
|
||||
public TestProgressCtrl(int testId, string title, int repetitionNr, int testRepeats)
|
||||
: this()
|
||||
{
|
||||
this.testId = testId;
|
||||
this.testName = testName;
|
||||
this.testName = title;
|
||||
this.repetitionNr = repetitionNr;
|
||||
this.Title = testName + string.Format(" ({0}/{1})", repetitionNr, testRepeats);
|
||||
}
|
||||
|
||||
public TestProgressCtrl(int testId, string testName)
|
||||
: this(testId, testName, 1, 1)
|
||||
{
|
||||
this.Title = testName;
|
||||
this.Title = title;
|
||||
}
|
||||
|
||||
private void TestProgressCtrl_Click(object sender, System.EventArgs e)
|
||||
|
||||
@ -270,6 +270,32 @@ namespace TBF
|
||||
return wmPartSize;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return test title for a given test and repetition number
|
||||
/// </summary>
|
||||
/// <param name="test">Test entity</param>
|
||||
/// <param name="repetitonNr">1 .. Nr. repetitions</param>
|
||||
/// <returns>Test title (string)</returns>
|
||||
public static string TestTitle(Entities.Test test, int repetitonNr)
|
||||
{
|
||||
if (test.Repeats == 1)
|
||||
{
|
||||
if (test.Part == 0)
|
||||
{
|
||||
return test.Name; /// Single test
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format("{0} ({1})", test.Name, test.Part); /// A part of a single test
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// More test repetitions
|
||||
return string.Format("{0} ({1}/{2})", test.Name, repetitonNr, test.Repeats);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts float number to a string with the specified number of valid digits
|
||||
/// </summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user