MeidoUpdateEventArgs.cs 576 B

123456789101112131415161718192021222324
  1. using System;
  2. namespace MeidoPhotoStudio.Plugin;
  3. public class MeidoUpdateEventArgs : EventArgs
  4. {
  5. public MeidoUpdateEventArgs(int meidoIndex = -1, bool fromMaid = false, bool isBody = true)
  6. {
  7. SelectedMeido = meidoIndex;
  8. IsBody = isBody;
  9. FromMeido = fromMaid;
  10. }
  11. public static new MeidoUpdateEventArgs Empty { get; } = new(-1);
  12. public int SelectedMeido { get; }
  13. public bool IsBody { get; }
  14. public bool FromMeido { get; }
  15. public bool IsEmpty =>
  16. this == Empty || SelectedMeido is -1 && !FromMeido && IsBody;
  17. }