static void Show(NormalNotificatorViewModel dataContext) { DispatcherHelper.UIDispatcher.InvokeAsync(() => { var mwnd = Application.Current.MainWindow; if (mwnd != null && (Setting.NotifyWhenWindowIsActive.Value || !mwnd.IsActive)) { new NormalNotificatorView { DataContext = dataContext }.Show(); } else { dataContext.ReleaseSlot(); } }); }