コード例 #1
0
        /// <summary>
        /// Reload Settings
        /// </summary>
        public static void LoadSettings()
        {
            CheckSetUp();

            _settings.LoadUserSettings();
            _settings.SetQuickAccessProperties();
        }
コード例 #2
0
        /// <summary>
        /// SetUp Settings in this Project - needs Type of Setting to Set Up
        /// </summary>
        /// <typeparam name="T">Setting to set up</typeparam>
        public static void SetUp <T>() where T : SettingsTemplate
        {
            //Create a Setting instance, apply default settings, look for user settings. if they exist, load them.
            //Save everything to be safe & Set up QuickAccess Properties
            _settings = Activator.CreateInstance <T>();

            _settings.SetDefaultSettings();

            if (_settings.CheckForUserSettings())
            {
                _settings.LoadUserSettings();
            }

            _settings.SaveUserSettings();

            _isSetUp = true;

            _settings.SetQuickAccessProperties();
        }