//Show Monitor window in modal public void OpenMonitorWindow() { if (ppWinMonitor != null) { //ppWinMonitor.Close(); ppWinMonitor.Top = ppWinMonitor.PixTop; ppWinMonitor.Left = ppWinMonitor.PixLeft; } else { ppWinMonitor = new MonitorWindow(); ppWinMonitor.Owner = this; Boolean blnExit = (Boolean)ppWinMonitor.ShowDialog(); if (blnExit) { //Shut application down. Application.Current.Shutdown(); } } }
private void ShowMonitorWindow() { Boolean blnExit = false; MonitorWindow ppWin; while (!blnExit) { ppWin = new MonitorWindow(); ppWin.Owner = this.Owner; blnExit = (Boolean)ppWin.ShowDialog(); } Application.Current.Shutdown(); }