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.

24 lines
674 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace connor_zwcadm.util {
public class UIUtil {
public static void SetOwnerWindow(Window window) {
System.Windows.Interop.WindowInteropHelper helper = new System.Windows.Interop.WindowInteropHelper(window);
helper.Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
}
public static void DispatcherShow(Window win, string msg) {
win.Dispatcher.Invoke(new Action(delegate {
System.Windows.MessageBox.Show(win, msg);
}));
}
}
}