123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- using System;
- namespace Wayne.ForecourtControl
- {
- /// <summary>
- /// Event argument for an Alarm event.
- /// </summary>
- public sealed class AlarmEventArgs : EventArgs, Wayne.ForecourtControl.Com.IAlarmEventArgs
- {
- #region Fields
- int deviceId;
- int deviceType;
- int alarmCode;
- int alarmCategory;
- string debugText;
- #endregion
- #region Construction
- /// <summary>
- /// Initializes a new instance of the AlarmEventArgs class.
- /// </summary>
- /// <param name="deviceId">Device id for the device that the alarm is about</param>
- /// <param name="deviceType">Type of device</param>
- /// <param name="alarmCode">Alarm code.</param>
- /// <param name="alarmCategory">Category of the alarm.</param>
- /// <param name="debugText">Debug text.</param>
- public AlarmEventArgs(int deviceId, int deviceType, int alarmCode, int alarmCategory, string debugText)
- {
- this.deviceId = deviceId;
- this.deviceType = deviceType;
- this.alarmCode = alarmCode;
- this.alarmCategory = alarmCategory;
- this.debugText = debugText;
- }
- #endregion
- #region Properties
- /// <summary>
- /// Device id for the device that the alarm was about.
- /// </summary>
- public int DeviceId
- {
- get { return deviceId; }
- }
- /// <summary>
- /// Type of device.
- /// </summary>
- public int DeviceType
- {
- get { return deviceType; }
- set { deviceType = value; }
- }
- /// <summary>
- /// Alarm code.
- /// </summary>
- public int AlarmCode
- {
- get { return alarmCode; }
- set { alarmCode = value; }
- }
- /// <summary>
- /// Category of the alarm
- /// </summary>
- public int AlarmCategory
- {
- get { return alarmCategory; }
- set { alarmCategory = value; }
- }
- /// <summary>
- /// Debug text for the alarm.
- /// </summary>
- public string DebugText
- {
- get { return debugText; }
- set { debugText = value; }
- }
- #endregion
- #region Methods
- /// <summary>
- /// ToString
- /// </summary>
- /// <returns></returns>
- public override string ToString()
- {
- return string.Format(System.Globalization.CultureInfo.InvariantCulture, "AlarmEventArgs(DeviceId={0},DeviceType={1},AlarmCode={2},AlarmCategory={3},DebugText={4})", deviceId, deviceType, alarmCode, alarmCategory, debugText);
- }
- #endregion
- }
- }
|