private void btnSettings_Click(object sender, RoutedEventArgs e) { if (sw == null) { sw = new SettingWindow(); sw.Show(); } else { sw.WindowState = WindowState.Normal; sw.Focus(); } sw.Closed += new EventHandler(sw_Closed); }
private void sw_Closed(object sender, EventArgs e) { sw = null; }