StepChangeEventArgs.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. namespace Terminal.Gui {
  3. public partial class Wizard {
  4. /// <summary>
  5. /// <see cref="EventArgs"/> for <see cref="WizardStep"/> events.
  6. /// </summary>
  7. public class StepChangeEventArgs : EventArgs {
  8. /// <summary>
  9. /// The current (or previous) <see cref="WizardStep"/>.
  10. /// </summary>
  11. public WizardStep OldStep { get; }
  12. /// <summary>
  13. /// The <see cref="WizardStep"/> the <see cref="Wizard"/> is changing to or has changed to.
  14. /// </summary>
  15. public WizardStep NewStep { get; }
  16. /// <summary>
  17. /// Event handlers can set to true before returning to cancel the step transition.
  18. /// </summary>
  19. public bool Cancel { get; set; }
  20. /// <summary>
  21. /// Initializes a new instance of <see cref="StepChangeEventArgs"/>
  22. /// </summary>
  23. /// <param name="oldStep">The current <see cref="WizardStep"/>.</param>
  24. /// <param name="newStep">The new <see cref="WizardStep"/>.</param>
  25. public StepChangeEventArgs (WizardStep oldStep, WizardStep newStep)
  26. {
  27. OldStep = oldStep;
  28. NewStep = newStep;
  29. Cancel = false;
  30. }
  31. }
  32. }
  33. }