private void Save_Click(object sender, RoutedEventArgs e) { AdvancedSettings.Default.QualityLevel = Convert.ToInt32(QualitySlider.Value); if (AdvancedPageViewModel.IsFileformatCorrect(FileNameTextbox.Text.ToArray())) { AdvancedSettings.Default.FileNameFormat = FileNameTextbox.Text; } AdvancedSettings.Default.KeepMetadata = KeepMetadata.IsChecked.Value; AdvancedSettings.Default.Save(); this.Close(); }
private void FilenameFormatChanged(object sender, TextChangedEventArgs e) { char[] NewFilename = FileNameTextbox.Text.ToArray(); if (AdvancedPageViewModel.IsFileformatCorrect(NewFilename)) { FileNameExample.Content = RenamingService.GetNewFilename(FileNameTextbox.Text, AdvancedPageViewModel.ReplacementItemsExample) + ".jpg"; } else { FileNameExample.Content = "Unregular format"; } }