Changes for Xylem Nanjing, ver. 3.1.1676
This commit is contained in:
@@ -5,8 +5,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using Events.Entities;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
@@ -260,17 +261,17 @@ namespace TBF.UiBridge
|
||||
|
||||
public static void TriggerEvent(ISession session, string source, EventClass clss, Severity severity, string message, string moreInfo, SubscriberGroup groups)
|
||||
{
|
||||
Events.Entities.Event evnt = new Event(null, source, clss, severity, message, moreInfo, null);
|
||||
Events.DB.SaveEvent(session, evnt, groups);
|
||||
SharedDatabase.Entities.Event evnt = new Event(null, source, clss, severity, message, moreInfo, null);
|
||||
SharedDatabase.EventsDB.SaveEvent(session, evnt, groups);
|
||||
if (EventHandler != null)
|
||||
{
|
||||
try { EventHandler(null, new EventEventArgs(evnt)); }
|
||||
catch (Exception e) { log.Error("EventHandler(...) failed", e); }
|
||||
}
|
||||
}
|
||||
public static void TriggerEvent(ISession session, Events.Entities.Event evnt)
|
||||
public static void TriggerEvent(ISession session, SharedDatabase.Entities.Event evnt)
|
||||
{
|
||||
Events.DB.SaveEvent(session, evnt, evnt.SubscriberGroups);
|
||||
SharedDatabase.EventsDB.SaveEvent(session, evnt, evnt.SubscriberGroups);
|
||||
if (EventHandler != null)
|
||||
{
|
||||
try { EventHandler(null, new EventEventArgs(evnt)); }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using Events.Entities;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
///
|
||||
using System;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
///
|
||||
using System;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using Config.Entities;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using Dirichlet.Numerics;
|
||||
|
||||
namespace TBF.UiBridge
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2015 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using TBF.Rig;
|
||||
|
||||
Reference in New Issue
Block a user