Small gamechange issue fix

This commit is contained in:
XTigerHyperX
2020-10-16 12:16:21 +01:00
parent 30a50549c8
commit 7e75fa0309

View File

@@ -255,14 +255,23 @@ namespace FModel
var launcher = new FLauncher(); var launcher = new FLauncher();
if ((bool)launcher.ShowDialog()) if ((bool)launcher.ShowDialog())
{ {
string currentvalue = Properties.Settings.Default.PakPath;
Properties.Settings.Default.PakPath = launcher.Path; Properties.Settings.Default.PakPath = launcher.Path;
if (Properties.Settings.Default.PakPath != currentvalue)
{
DarkMessageBoxHelper.Show(Properties.Resources.PathChangedRestart, Properties.Resources.PathChanged, MessageBoxButton.OK, MessageBoxImage.Information);
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Restarting]", "Path(s) changed");
DarkMessageBoxHelper.Show(Properties.Resources.PathChangedRestart, Properties.Resources.PathChanged, MessageBoxButton.OK, MessageBoxImage.Information); Properties.Settings.Default.Save();
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Restarting]", "Path(s) changed"); Process.Start(Process.GetCurrentProcess().MainModule.FileName);
Application.Current.Shutdown();
Properties.Settings.Default.Save(); }
Process.Start(Process.GetCurrentProcess().MainModule.FileName); // well totally not needed but saving again just incase ..
Application.Current.Shutdown(); else
{
Properties.Settings.Default.Save();
}
} }
} }
private void FModel_MI_Help_Trello_Click(object sender, RoutedEventArgs e) => Process.Start(new ProcessStartInfo { FileName = "https://trello.com/b/DfmzkVQB/fmodel", UseShellExecute = true }); private void FModel_MI_Help_Trello_Click(object sender, RoutedEventArgs e) => Process.Start(new ProcessStartInfo { FileName = "https://trello.com/b/DfmzkVQB/fmodel", UseShellExecute = true });