Example #1
0
        private void RestoreDefaults()
        {
            var prefs = UserPreferences.GetDefault();

            this.GamePathField.Value       = Environment.ExpandEnvironmentVariables(prefs.ValheimGamePath);
            this.ServerPathField.Value     = Environment.ExpandEnvironmentVariables(prefs.ValheimServerPath);
            this.SaveDataFolderField.Value = Environment.ExpandEnvironmentVariables(prefs.ValheimSaveDataFolder);
        }
        private void ButtonDefaults_Click(object sender, EventArgs e)
        {
            var prefs = UserPreferences.GetDefault();

            this.WindowsStartField.Value       = prefs.StartWithWindows;
            this.ServerStartField.Value        = prefs.StartServerAutomatically;
            this.StartMinimizedField.Value     = prefs.StartMinimized;
            this.CheckServerRunningField.Value = prefs.CheckServerRunning;
            this.CheckForUpdatesField.Value    = prefs.CheckForUpdates;
        }