private void BtnSQLWindow_Click(object sender, RoutedEventArgs e) { if (SQLWindow == null) { SQLWindow = new SQLWindow(this); SQLWindow.Closed += SQLWindow_Closed; SQLWindow.Activated += AnyWindow_Activated; SQLWindow.Show(); SQLWindow.Owner = null; } else if (SQLWindow.WindowState == WindowState.Minimized) { SQLWindow.WindowState = App.Settings.SQLWindow.WindowState; } }
private void SQLWindow_Closed(object sender, EventArgs e) { SQLWindow = null; WindowClose(); }