private static void Show(Action action) { var dispatcher = WpfDispatcher.Create(); dispatcher !.Invoke(action); dispatcher.InvokeShutdown(); _ = dispatcher.Thread.Join(1000); }
public static void Show(Bitmap?expected, Bitmap actual) { if (actual is null) { throw new System.ArgumentNullException(nameof(actual)); } var dispatcher = WpfDispatcher.Create(); dispatcher !.Invoke(() => { var window = new ImageDiffWindow(expected, actual); _ = window.ShowDialog(); }); dispatcher.InvokeShutdown(); _ = dispatcher.Thread.Join(1000); }