using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Text; using System.Threading.Tasks; namespace ShenTun.Camera { internal static class DialogExt { public static async Task ShowDialogAsync(this Form @this) { await Task.Yield(); if (@this.IsDisposed) return DialogResult.Cancel; return @this.ShowDialog(); } } }