AppEx.cs 473 B

123456789101112131415161718192021222324
  1. using Sunny.UI;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows.Forms;
  8. class AppEx
  9. {
  10. public static event EventHandler RootFormNeedClose;
  11. public static bool NeedCloseApp()
  12. {
  13. if (RootFormNeedClose == null)
  14. return false;
  15. else
  16. {
  17. RootFormNeedClose?.Invoke(null, EventArgs.Empty);
  18. return true;
  19. }
  20. }
  21. }