Changes for Xylem Nanjing, ver. 3.1.1676
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
@@ -28,23 +28,23 @@ namespace TBF.UiBridge
|
||||
|
||||
static TestProgressEventArgs()
|
||||
{
|
||||
int[] estTime = new int[(int)Config.Entities.Progress.Count];
|
||||
int[] estTime = new int[(int)Common.Progress.Count];
|
||||
for (int i = 0; i < estTime.Length; i++) estTime[i] = 10;
|
||||
cumulativeSumsOfEstimates = new int[(int)Config.Entities.Progress.Count];
|
||||
cumulativeSumsOfEstimates = new int[(int)Common.Progress.Count];
|
||||
SetEstimatedTimes(estTime);
|
||||
|
||||
currentPhaseStartTime = Rig.StateMachine.Time;
|
||||
currentPhase = Config.Entities.Progress.JustStarted;
|
||||
currentPhase = Common.Progress.JustStarted;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set estimated time of each phase in [s] (see Config.Entities.Progress).
|
||||
/// Set estimated time of each phase in [s] (see Progress).
|
||||
/// </summary>
|
||||
/// <param name="estTime">Array: estimated time of each phase in [s]</param>
|
||||
public static void SetEstimatedTimes(int[] estTime)
|
||||
{
|
||||
if (estTime.Length != (int)Config.Entities.Progress.Count) return;
|
||||
if (estTime.Length != (int)Common.Progress.Count) return;
|
||||
estimatedTime = estTime;
|
||||
for (int i = 0; i < estTime.Length; i++)
|
||||
{
|
||||
@@ -73,11 +73,11 @@ namespace TBF.UiBridge
|
||||
int currentPhaseTime = Math.Min(Rig.StateMachine.Time - currentPhaseStartTime, estimatedTime[phaseNr]);
|
||||
int currentTestTime = currentPhaseTime + ((phaseNr == 0) ? 0 : cumulativeSumsOfEstimates[phaseNr - 1]);
|
||||
|
||||
int add10pct = cumulativeSumsOfEstimates[(int)Config.Entities.Progress.Count - 1] / 9;
|
||||
int add10pct = cumulativeSumsOfEstimates[(int)Common.Progress.Count - 1] / 9;
|
||||
|
||||
|
||||
Progress = 100 * (currentTestTime + add10pct)
|
||||
/ (cumulativeSumsOfEstimates[(int)Config.Entities.Progress.Count - 1] + add10pct);
|
||||
/ (cumulativeSumsOfEstimates[(int)Common.Progress.Count - 1] + add10pct);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -91,7 +91,7 @@ namespace TBF.UiBridge
|
||||
RepetitionNr = repetitionNr;
|
||||
}
|
||||
|
||||
public TestProgressEventArgs(Test test, Progress progress)
|
||||
public TestProgressEventArgs(Config.Entities.Test test, Progress progress)
|
||||
: this(test, 1, progress)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user