Пример #1
0
    private SavedGameData GetUpversionedSaveData()
    {
        if (_currentSave == null)
        {
            Init();
        }

        var save       = _currentSave.Get();
        var isOutdated = !save.SaveDataVersion.Equals(SavedGameData.CurrentDataVersion);

        if (isOutdated)
        {
            _currentSave.Write(s =>
            {
                s.SaveDataVersion = SavedGameData.CurrentDataVersion;
                if (string.IsNullOrWhiteSpace(save.SelectedCharacter) || save.SelectedCharacter.Equals("None"))
                {
                    s.SelectedCharacter = _store.GetOrDefault("UseFemale", false) ? "Female" : "Male";
                }
            });
            return(_currentSave.Get());
        }

        return(save);
    }
Пример #2
0
        private void OnButtonClick(object sender, RoutedEventArgs e)
        {
            Stored.Get <bool>("surveyHide").Value = !Stored.Get <bool>("surveyHide").Value;

            /*if (Application.Current.MainWindow is MainWindow window) {
             *  window.ShortSurveyLink.IsShown = false;
             * }*/
        }