示例#1
0
        private static void InitLauncherSettings()
        {
            if (AreLauncherSettingsInitialized)
            {
                return;
            }

            LauncherSettings = new LauncherSettings();

            if (File.Exists(HLVRPaths.VRLauncherSettingsFile))
            {
                AreLauncherSettingsInitialized =
                    TryLoadSettings(HLVRPaths.VRLauncherSettingsFile) &&
                    TryStoreSettings(LauncherSettings, HLVRPaths.VRLauncherSettingsFile);
            }
            else
            {
                AreLauncherSettingsInitialized = TryStoreSettings(LauncherSettings, HLVRPaths.VRLauncherSettingsFile);
            }

            if (string.IsNullOrEmpty(HLVRPaths.HLDirectory))
            {
                HLVRPaths.RestoreLastHLDirectory();
            }
        }
示例#2
0
        public static void RestoreLauncherSettings()
        {
            LauncherSettings defaultSettings = new LauncherSettings();

            LauncherSettings.GeneralSettings = defaultSettings.GeneralSettings;
            DelayedStoreLauncherSettings();
        }