/// <summary> /// Clear things. /// </summary> private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (PlayerConfig.Current.General.ExitWhenClosed == null && !ForceExit) { e.Cancel = true; FramePop.Navigate(new ClosingPage(this)); return; } else if (PlayerConfig.Current.General.ExitWhenClosed == false && !ForceExit) { WindowState = WindowState.Minimized; Hide(); e.Cancel = true; return; } ClearHitsoundPlayer(); ComponentPlayer.DisposeAll(); LyricWindow.Dispose(); NotifyIcon.Dispose(); if (ConfigWindow == null || ConfigWindow.IsClosed) { return; } if (ConfigWindow.IsInitialized) { ConfigWindow.Close(); } }
private void BtnSettings_Click(object sender, RoutedEventArgs e) { if (ConfigWindow == null || ConfigWindow.IsClosed) { ConfigWindow = new ConfigWindow(); ConfigWindow.Show(); } else { if (ConfigWindow.IsInitialized) { ConfigWindow.Focus(); } } }