示例#1
0
        public async Task InitializeAsync()
        {
            Options = await _jsonSavefileManager.LoadAsync <Options>(AppConstants.OPTION_SAVE_NAME).ConfigureAwait(false);

            if (Options == null)
            {
                Options = new Options();
            }
        }
示例#2
0
        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;
            }
        }