mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-12 22:10:44 -05:00
Merge pull request 'Ask to copy live settings on first run' (!24) from waffle.lord/Launcher:master into master
Reviewed-on: SPT-AKI/Launcher#24
This commit is contained in:
commit
e103d14d04
@ -14,8 +14,6 @@ using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Aki.Launcher.Helpers
|
||||
{
|
||||
|
@ -177,6 +177,7 @@ namespace Aki.Launcher.Helpers
|
||||
englishLocale.profile_mods = "Profile Mods";
|
||||
englishLocale.author = "Author";
|
||||
englishLocale.wipe_on_start = "Wipe profile on game start";
|
||||
englishLocale.copy_live_settings_question = "Would you like to copy your live game settings to spt";
|
||||
#endregion
|
||||
|
||||
Directory.CreateDirectory(LocalizationProvider.DefaultLocaleFolderPath);
|
||||
@ -1622,6 +1623,22 @@ namespace Aki.Launcher.Helpers
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region copy_live_settings_question
|
||||
private string _copy_live_settings_question;
|
||||
public string copy_live_settings_question
|
||||
{
|
||||
get => _copy_live_settings_question;
|
||||
set
|
||||
{
|
||||
if (_copy_live_settings_question != value)
|
||||
{
|
||||
_copy_live_settings_question = value;
|
||||
RaisePropertyChanged(nameof(copy_live_settings_question));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
||||
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Wczytaj ustawienia EFT",
|
||||
"load_live_settings_succeeded": "Ustawienia gry skopiowane z EFT",
|
||||
"load_live_settings_failed": "Nie udało się skopiować ustawień EFT",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Загрузить настройкий онлайн-версии",
|
||||
"load_live_settings_succeeded": "Настройки игры скопированы из онлайн-версии",
|
||||
"load_live_settings_failed": "Не удалось скопировать настройки онлайн-версии",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -86,5 +86,6 @@
|
||||
"load_live_settings": "Load Live Settings",
|
||||
"load_live_settings_succeeded": "Game settings copied from live",
|
||||
"load_live_settings_failed": "Failed to copy live settings",
|
||||
"wipe_on_start": "Wipe profile on game start"
|
||||
"wipe_on_start": "Wipe profile on game start",
|
||||
"copy_live_settings_question": "Would you like to copy your live game settings to spt"
|
||||
}
|
@ -64,9 +64,31 @@ namespace Aki.Launcher.ViewModels
|
||||
{
|
||||
this.WhenActivated((CompositeDisposable disposables) =>
|
||||
{
|
||||
Task.Run(() =>
|
||||
Task.Run(async () =>
|
||||
{
|
||||
GameVersionCheck();
|
||||
await GameVersionCheck();
|
||||
|
||||
await Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
if (LauncherSettingsProvider.Instance.FirstRun)
|
||||
{
|
||||
LauncherSettingsProvider.Instance.FirstRun = false;
|
||||
|
||||
LauncherSettingsProvider.Instance.SaveSettings();
|
||||
|
||||
var confirmCopySettings = await ShowDialog(new ConfirmationDialogViewModel(Host,
|
||||
LocalizationProvider.Instance.copy_live_settings_question,
|
||||
LocalizationProvider.Instance.yes,
|
||||
LocalizationProvider.Instance.no));
|
||||
|
||||
if (confirmCopySettings != null && confirmCopySettings is bool confirmed && confirmed)
|
||||
{
|
||||
var settingsVM = new SettingsViewModel(Host);
|
||||
|
||||
await settingsVM.ResetGameSettingsCommand();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user