NozzleStateChangeEventArgs.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/EventArgs/NozzleStateChangeEventArgs.cs $
  4. *
  5. * 3 07-02-16 9:59 roger.månsson
  6. * FxCop changes
  7. *
  8. * 2 07-01-31 14:00 roger.månsson
  9. * Added ToString() methods
  10. */
  11. #endregion
  12. using System;
  13. namespace Wayne.ForecourtControl
  14. {
  15. /// <summary>
  16. /// Event argument for a PumpStateChange Event.
  17. /// </summary>
  18. public class NozzleStateChangeEventArgs : EventArgs
  19. {
  20. #region Fields
  21. private INozzle nozzle;
  22. private NozzleState nozzleState;
  23. #endregion
  24. #region Constructor
  25. /// <summary>
  26. /// Constructor
  27. /// </summary>
  28. ///<param name="nozzle">The Nozzle which state has changed</param>
  29. ///<param name="nozzleState">The new Nozzle state</param>
  30. public NozzleStateChangeEventArgs(INozzle nozzle, NozzleState nozzleState)
  31. {
  32. this.nozzle = nozzle;
  33. this.nozzleState = nozzleState;
  34. }
  35. #endregion
  36. #region Properties
  37. /// <summary>
  38. /// The Nozzle which state has changed.
  39. /// </summary>
  40. public INozzle Nozzle { get { return nozzle; } }
  41. /// <summary>
  42. /// The new Nozzle state.
  43. /// </summary>
  44. public NozzleState NozzleState { get { return nozzleState; } }
  45. #endregion
  46. #region ToString
  47. /// <summary>
  48. /// Returns a string representation of the class.
  49. /// </summary>
  50. /// <returns></returns>
  51. public override string ToString()
  52. {
  53. return string.Format(System.Globalization.CultureInfo.InvariantCulture, "NozzleStateChangeEventArgs, nozzle={0}:{1}, state={2}", nozzle.ParentEntity.Id, nozzle.Id, nozzleState);
  54. }
  55. #endregion
  56. }
  57. }