BatchNr of restored session fixed, ver. 2.12.544
This commit is contained in:
parent
5a88e8909f
commit
45869401ad
@ -234,14 +234,14 @@ namespace TBF.BenchControl.Sequences
|
||||
/// Procedure selected at this point, a new batch was started
|
||||
///
|
||||
StateMachine.LoadProcedureParams(StateMachine.Procedure);
|
||||
|
||||
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Enable STOP button
|
||||
int newBatchNr = Program.LocalSettings.BatchNr;
|
||||
log.FatalFormat("New measurement session started: batch = {0}, procedure = {1}", newBatchNr, StateMachine.Procedure.Name);
|
||||
|
||||
if (selection == Selection.RestoreBatch)
|
||||
{
|
||||
BatchRslts = RestoreBatchResults(TBF.UiBridge.Bridge.BatchNr, /// Original batch number
|
||||
Program.LocalSettings.BatchNr, /// New batch number
|
||||
StateMachine.Procedure);
|
||||
newBatchNr); /// New batch number
|
||||
}
|
||||
else if (selection == Selection.Custom)
|
||||
{
|
||||
@ -254,7 +254,7 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
}
|
||||
|
||||
BatchRslts = CreateNewBatchResults(Program.LocalSettings.BatchNr, StateMachine.Procedure);
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
|
||||
for (int i = StateMachine.Procedure.Tests.Count - 1; i >= 0; i--)
|
||||
{
|
||||
@ -266,7 +266,7 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
else
|
||||
{
|
||||
BatchRslts = CreateNewBatchResults(Program.LocalSettings.BatchNr, StateMachine.Procedure);
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
}
|
||||
|
||||
|
||||
@ -897,11 +897,13 @@ namespace TBF.BenchControl.Sequences
|
||||
summaryResults.Info(TestResult2CsvLine(tr));
|
||||
}
|
||||
|
||||
|
||||
Program.LocalSettings.BatchNr++;
|
||||
Program.LocalSettings.Save();
|
||||
log.FatalFormat("BatchNr = {0} (incremented)", Program.LocalSettings.BatchNr);
|
||||
|
||||
log.FatalFormat("Measurement session saved: batch = {0}, procedure = {1}, next batch nr. = {2}",
|
||||
ProcessData.BatchRslts.Batch.BatchNr,
|
||||
ProcessData.BatchRslts.Batch.ProcedureName,
|
||||
Program.LocalSettings.BatchNr);
|
||||
|
||||
if (simultWithEvacuationCount > 0)
|
||||
{
|
||||
@ -1356,9 +1358,11 @@ namespace TBF.BenchControl.Sequences
|
||||
/// <param name="newBatchNr">New unique batch number</param>
|
||||
/// <param name="procedure">Reloaded procedure</param>
|
||||
/// <returns></returns>
|
||||
Results.BatchResults RestoreBatchResults(int oriBatchNr, int newBatchNr, Procedure procedure)
|
||||
Results.BatchResults RestoreBatchResults(int oriBatchNr, int newBatchNr)
|
||||
{
|
||||
return Results.BatchResults.FromBatch(Results.DB.LoadBatch(oriBatchNr));
|
||||
Batch batch = Results.DB.LoadBatch(oriBatchNr);
|
||||
batch.BatchNr = newBatchNr;
|
||||
return Results.BatchResults.FromBatch(batch);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -53,12 +53,12 @@ namespace TBF.Forms
|
||||
sentCheckBox.Text = Strings.Printed;
|
||||
sentCheckBox.Checked = Sent;
|
||||
sendReloadButton.Enabled = true; /// 'Print again' function always available
|
||||
sendReloadButton.Text = reloadEn ? Strings.Reload : Strings.Print_again;
|
||||
sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Print_again;
|
||||
#elif ORACLE_DB
|
||||
sentCheckBox.Text = Strings.Sent;
|
||||
sentCheckBox.Checked = Sent;
|
||||
sendReloadButton.Enabled = reloadEn || !Sent;
|
||||
sendReloadButton.Text = reloadEn ? Strings.Reload : Strings.Save_again;
|
||||
sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Save_again;
|
||||
#else
|
||||
sentCheckBox.Visible = false;
|
||||
sendReloadButton.Enabled = reloadEn;
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.12.543.1")]
|
||||
[assembly: AssemblyFileVersion("2.12.543.1")]
|
||||
[assembly: AssemblyVersion("2.12.544.1")]
|
||||
[assembly: AssemblyFileVersion("2.12.544.1")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user