internal static void CMYKExecuted(Window mainWindow, ExecutedRoutedEventArgs e) { if (cmykWindow == null) { cmykWindow = new CMYKWindow(mainWindow); cmykWindow.OnClosedOnce = () => cmykWindow = null; } cmykWindow.Show(); cmykWindow.Activate(); e.Handled = true; }