FdcPumpControllerOnStateChangeEventArg.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Edge.Core.IndustryStandardInterface.Pump.Fdc;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Edge.Core.IndustryStandardInterface.Pump
  8. {
  9. /// <summary>
  10. /// Carried with the info for a pump or its nozzles state changed event.
  11. /// </summary>
  12. public class FdcPumpControllerOnStateChangeEventArg : EventArgs
  13. {
  14. public FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState newPumpState)
  15. : this(newPumpState, null)
  16. {
  17. this.NewPumpState = newPumpState;
  18. }
  19. /// <summary>
  20. ///
  21. /// </summary>
  22. /// <param name="newPumpState"></param>
  23. /// <param name="stateChangedNozzle"></param>
  24. public FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState newPumpState, LogicalNozzle stateChangedNozzle)
  25. {
  26. this.NewPumpState = newPumpState;
  27. if (stateChangedNozzle != null)
  28. this.StateChangedNozzles = new LogicalNozzle[] { stateChangedNozzle };
  29. }
  30. /// <summary>
  31. ///
  32. /// </summary>
  33. public LogicalDeviceState NewPumpState { get; }
  34. public IEnumerable<LogicalNozzle> StateChangedNozzles { get; }
  35. }
  36. }