2022-01-06 22:58:51 +00:00
|
|
|
|
///
|
2022-01-12 06:56:56 +00:00
|
|
|
|
/// Copyright (c) 2019-2022 Sensus Slovensko a.s.
|
2022-01-06 22:58:51 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
|
|
|
|
|
|
namespace GenericTest
|
|
|
|
|
|
{
|
|
|
|
|
|
public enum VerifState
|
|
|
|
|
|
{
|
|
|
|
|
|
Undefined = 0, /// Undefined (only used in OnActivity(..) when start/stop info message is issued)
|
|
|
|
|
|
SNisMissing, /// S/N is missing in the parsed record
|
|
|
|
|
|
SNisInvalid, /// S/N in the parsed record is invalid
|
2022-01-12 06:56:56 +00:00
|
|
|
|
NoRefRecordOrNoMatchingWorkflow, /// No record with this S/N in tracing DB or no matching workflow for this record
|
2022-01-06 22:58:51 +00:00
|
|
|
|
VerificationIsDisabled, /// ...
|
|
|
|
|
|
NoVerificationForThisProcess,
|
|
|
|
|
|
VerificationPassed, /// Verification of a previous record passed
|
|
|
|
|
|
VerificationFailed, /// Verification of a previous record failed, no matching record found
|
|
|
|
|
|
TracingDBReadOrWriteFailed,
|
|
|
|
|
|
PrintingFailed,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum ActivityCode
|
|
|
|
|
|
{
|
|
|
|
|
|
Undefined,
|
|
|
|
|
|
StartStop,
|
|
|
|
|
|
Passed,
|
|
|
|
|
|
Failed,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class ActivityEventArgs : EventArgs
|
|
|
|
|
|
{
|
|
|
|
|
|
public DateTime TimeStamp;
|
|
|
|
|
|
public string SN;
|
|
|
|
|
|
public string Message; /// message text
|
|
|
|
|
|
public ActivityCode ActivityCode; /// to print an appropriate message
|
|
|
|
|
|
public Color Color;
|
|
|
|
|
|
public int Interval;
|
|
|
|
|
|
public Color FadedColor;
|
|
|
|
|
|
|
|
|
|
|
|
public ActivityEventArgs(string sn, string message, ActivityCode activityCode, Color color, int interval, Color fadedColor)
|
|
|
|
|
|
{
|
|
|
|
|
|
TimeStamp = DateTime.Now;
|
|
|
|
|
|
this.SN = sn;
|
|
|
|
|
|
this.Message = message;
|
|
|
|
|
|
this.ActivityCode = activityCode;
|
|
|
|
|
|
this.Color = color;
|
|
|
|
|
|
this.Interval = interval;
|
|
|
|
|
|
this.FadedColor = fadedColor;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|