public void Show() { if (mWindow != null) { mWindow.AddToQueue(this, NotificationFinished); } else { ((App)App.Current).AddProcessCount(); mWindow = new NotificationWindow(); mWindow.Closed += mWindow_Closed; mWindow.AddToQueue(this, NotificationFinished); mWindow.Show(); } }
private static void mWindow_Closed(object sender, EventArgs e) { mWindow = null; ((App)App.Current).RemoveProcessCount(); }