tbf/GenericTest/ActivityEventArgs.cs

53 lines
1.7 KiB
C#

///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
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
NoRecordAtAll, /// No record with this S/N in tracing DB
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;
}
}
}