/// <summary>
 /// Displays a warning about the Start With Windows functionality
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void StartWithWindows_CheckedChanged(object sender, RoutedEventArgs e)
 {
     if (StartWithWindows.IsChecked == true && !StartupController.IsAddedToStartup() && !Properties.Settings.Default.DisableWarningPopups)
     {
         MessageBox.Show(Strings.AutoStartWarning, Strings.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
        /// <summary>
        /// Saves the settings before the backup window closes
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BackupSettings_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (BackUpChatLogAutomatically.IsChecked == true && (string.IsNullOrWhiteSpace(BackupPath.Text) || !Directory.Exists(BackupPath.Text)))
            {
                e.Cancel = true;
                MessageBox.Show(Strings.BadBackupPathSave, Strings.Error, MessageBoxButton.OK, MessageBoxImage.Error);

                return;
            }

            if (StartWithWindows.IsChecked == true && !StartupController.IsAddedToStartup() || !StartWithWindows.IsChecked == true && StartupController.IsAddedToStartup())
            {
                StartupController.ToggleStartup(StartWithWindows.IsChecked == true);
            }

            SaveSettings();
            _mainWindow.GotKeyboardFocus -= GainFocus;
        }