public async Task InitializeAsync() { Options = await _jsonSavefileManager.LoadAsync <Options>(AppConstants.OPTION_SAVE_NAME).ConfigureAwait(false); if (Options == null) { Options = new Options(); } }
private async Task <HotkeyProfile> LoadProfileFromFileAsync(int profileNum) { var profile = await _jsonSavefileManager.LoadAsync <HotkeyProfile>($"profile{profileNum}").ConfigureAwait(false); if (profile != null) { profile.ProfileNum = profileNum; } return(profile); }
public async Task InitializeAsync() { var table = await _jsonSavefileManager.LoadAsync <ProfileSwitchKeyTable>("profile_switch_key_table").ConfigureAwait(false); if (table == null) { SwitchKeyTable = new ProfileSwitchKeyTable(); ResetToDefault(); } else { SwitchKeyTable = table; } }