diff --git a/AppCore/StringKey.cs b/AppCore/StringKey.cs index c8e702d4..8bc9b464 100644 --- a/AppCore/StringKey.cs +++ b/AppCore/StringKey.cs @@ -119,7 +119,8 @@ public enum StringKey EnterNameForCatalog, GeneralSettingsHaveBeenUpdated, SettingsNotValid, - MissingFf7ExePath, + MissingFf7ExePath, + Ff7ExePathChanged, MissingLibraryPath, MissingTexturesPath, MissingMoviePath, diff --git a/AppUI/Resources/Languages/StringResources.br.xaml b/AppUI/Resources/Languages/StringResources.br.xaml index 48b5c0a5..a93ada91 100644 --- a/AppUI/Resources/Languages/StringResources.br.xaml +++ b/AppUI/Resources/Languages/StringResources.br.xaml @@ -796,6 +796,7 @@ Mais tarde, se quiser utilizar os arquivos de alta qualidade .OGG, mude a config Verificando ff7 exe ... Verifying FF7_Launcher exe ... + Alteração no caminho do jogo detectada, recomendamos fortemente que você reinicie o 7th Heaven. Você gostaria de fazer isso agora? ff7.exe detectado como diferente. Criando backup e copiando .exe correto ... Não foi possível copiar ff7.exe. Abortando ... Não foi possível criar backup de ff7.exe. Abortando ... diff --git a/AppUI/Resources/Languages/StringResources.es.xaml b/AppUI/Resources/Languages/StringResources.es.xaml index f2d53de7..9a60b563 100644 --- a/AppUI/Resources/Languages/StringResources.es.xaml +++ b/AppUI/Resources/Languages/StringResources.es.xaml @@ -488,6 +488,7 @@ Haz clic en 'Cancelar' para detener el proceso. Configuración no válida Falta la ruta del FF7 Exe. + Se detectó un cambio en la ruta del juego, recomendamos encarecidamente que reinicies 7th Heaven. ¿Te gustaría hacerlo ahora? Falta la ruta de la Biblioteca. Falta la ruta de las Texturas (Aali OpenGL). Falta la ruta para las Cinemáticas. diff --git a/AppUI/Resources/Languages/StringResources.fr.xaml b/AppUI/Resources/Languages/StringResources.fr.xaml index bfc41ba6..480aacb1 100644 --- a/AppUI/Resources/Languages/StringResources.fr.xaml +++ b/AppUI/Resources/Languages/StringResources.fr.xaml @@ -791,6 +791,7 @@ Plus tard, si vous souhaitez utiliser des fichiers .OGG de haute qualité, remet Vérification de ff7 exe... Verifying FF7_Launcher exe ... + Changement de chemin de jeu détecté, nous vous recommandons vivement de redémarrer 7th Heaven. Souhaitez-vous le faire maintenant ? ff7.exe détecté comme étant différent. création d'une sauvegarde et copie du bon fichier .exe... échec de la copie de ff7.exe. Abandon... échec de la création d'une sauvegarde de ff7.exe. Abandon... diff --git a/AppUI/Resources/Languages/StringResources.gr.xaml b/AppUI/Resources/Languages/StringResources.gr.xaml index 0581a04b..01afc951 100644 --- a/AppUI/Resources/Languages/StringResources.gr.xaml +++ b/AppUI/Resources/Languages/StringResources.gr.xaml @@ -485,6 +485,7 @@ Οι ρυθμίσεις δεν είναι έγκυρες Λείπει η διαδρομή FF7 Exe. + Änderung des Spielpfads erkannt, wir empfehlen dringend, dass Sie 7th Heaven neu starten. Möchten Sie dies jetzt tun? Λείπει η διαδρομή βιβλιοθήκης. Λείπει η διαδρομή για Υφές (Aali OpenGL). Λείπει η διαδρομή για αρχεία βίντεο. diff --git a/AppUI/Resources/Languages/StringResources.ja.xaml b/AppUI/Resources/Languages/StringResources.ja.xaml index a87dad74..b8ebe149 100644 --- a/AppUI/Resources/Languages/StringResources.ja.xaml +++ b/AppUI/Resources/Languages/StringResources.ja.xaml @@ -476,6 +476,7 @@ Click 'Cancel' to stop the process. Settings Not Valid Missing FF7 Exe path. + Game path change detected, we highly recommend you restart 7th heaven would you like to now? Missing Library path. Missing Textures (Aali OpenGL) path. Missing Movie path. diff --git a/AppUI/Resources/StringResources.xaml b/AppUI/Resources/StringResources.xaml index 42603bcb..70246660 100644 --- a/AppUI/Resources/StringResources.xaml +++ b/AppUI/Resources/StringResources.xaml @@ -486,6 +486,7 @@ Click 'Cancel' to stop the process. Settings Not Valid Missing FF7 Exe path. + Game path change detected, we highly recommend you restart 7th heaven would you like to now? Missing Library path. Missing Textures (Aali OpenGL) path. Missing Movie path. diff --git a/AppUI/ViewModels/GeneralSettingsViewModel.cs b/AppUI/ViewModels/GeneralSettingsViewModel.cs index 27cac969..85e0546b 100644 --- a/AppUI/ViewModels/GeneralSettingsViewModel.cs +++ b/AppUI/ViewModels/GeneralSettingsViewModel.cs @@ -4,16 +4,12 @@ using Microsoft.Win32; using AppUI.Classes; using AppUI.Windows; -using AppUI; -using AppUI.ViewModels; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; using System.Windows; namespace AppUI.ViewModels diff --git a/AppUI/Windows/GeneralSettingsWindow.xaml.cs b/AppUI/Windows/GeneralSettingsWindow.xaml.cs index 08b286a2..a119b012 100644 --- a/AppUI/Windows/GeneralSettingsWindow.xaml.cs +++ b/AppUI/Windows/GeneralSettingsWindow.xaml.cs @@ -4,6 +4,9 @@ using AppUI.ViewModels; using System.IO; using System.Windows; +using System.Diagnostics; +using System; +using System.Threading; namespace AppUI.Windows { @@ -20,6 +23,8 @@ public partial class GeneralSettingsWindow : Window private FFNxDriverUpdater FFNxUpdater = new FFNxDriverUpdater(); + private bool PathChanged = false; + public GeneralSettingsWindow() { InitializeComponent(); @@ -41,6 +46,21 @@ private void btnOk_Click(object sender, RoutedEventArgs e) { bool settingsSaved = ViewModel.SaveSettings(); + if (PathChanged) + { + MessageDialogViewModel mdvm = MessageDialogWindow.Show(ResourceHelper.Get(StringKey.Ff7ExePathChanged), + ResourceHelper.Get(StringKey.Ff7ExePathChanged).Split(",")[0], + MessageBoxButton.YesNo, + MessageBoxImage.Warning); + + if (mdvm.Result == MessageBoxResult.Yes) + { + string exePath = Process.GetCurrentProcess().MainModule.FileName; + Process.Start(exePath); + System.Windows.Application.Current.Shutdown(); + } + } + if (settingsSaved) { this.DialogResult = true; @@ -80,6 +100,12 @@ private void btnFf7Exe_Click(object sender, RoutedEventArgs e) ViewModel.FF7ExePathInput = exePath; } + + string original = Sys.Settings.FF7Exe; + if ((original != null || original != "") && original != exePath ) + { + PathChanged = true; + } } private void btnLibrary_Click(object sender, RoutedEventArgs e)