You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
492 B

1 month ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Windows.Forms;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace ShenTun.ImageCollection.Instance
  8. {
  9. internal static class DialogExt
  10. {
  11. public static async Task<DialogResult> ShowDialogAsync(this Form @this)
  12. {
  13. await Task.Yield();
  14. if (@this.IsDisposed)
  15. return DialogResult.Cancel;
  16. return @this.ShowDialog();
  17. }
  18. }
  19. }