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"; } }
public MainWindowViewModel() { PlayersPageViewModel = new(); DirectFunctionsPageViewModel = new(); AdvancedPageViewModel = new(); PlayersPageViewModel.RegisterHackInitEvent(); DirectFunctionsPageViewModel.RegisterHackInitEvent(); AdvancedPageViewModel.RegisterHackInitEvent(); AboutPageViewModel = new(); MainPageViewModel = new(); MainPageViewModel.IsSelected = true; AttachedToGame += MainWindowViewModel_AttachedToGame; AttachedToGameWorksFinished += MainWindowViewModel_AttachedToGameWorksFinished; }
public AdvancedPage() { InitializeComponent(); BindingContext = viewModel = new AdvancedPageViewModel(); }