private void SaveButton_OnClick(object sender, RoutedEventArgs e) { if (LosslessCheck.IsChecked != null) { Settings.Lossless = LosslessCheck.IsChecked.Value; } if (RemoveAlphaCheck.IsChecked != null) { Settings.RemoveAlpha = RemoveAlphaCheck.IsChecked.Value; } if (EmulateJpegCheck.IsChecked != null) { Settings.EmulateJpeg = EmulateJpegCheck.IsChecked.Value; } Settings.Quality = QualityTextBox.Text; if (DeleteImageCheck.IsChecked != null) { Settings.DeleteImage = DeleteImageCheck.IsChecked.Value; } if (PlaySoundCheck.IsChecked != null) { Settings.PlaySound = PlaySoundCheck.IsChecked.Value; } Settings.SoundToPlay = SoundCombo.SelectedIndex; Settings.Save(); Toaster.SettingsSaved(); SetClosed(); SaveButton.Command.Execute(ControlCommands.Close); }