コード例 #1
0
        // Returns the static instance or creates one if none is available.
        public static SettingsHandler GetInstance()
        {
            // No previous instance is available - Create one.
            if (Instance == null)
            {
                Instance = new SettingsHandler();

                // Attempt to load saved settings from a file.
                Instance.LoadSettings();
            }

            return(Instance);
        }
コード例 #2
0
        // Returns the static instance or creates one if none is available.
        public static SettingsHandler GetInstance()
        {
            // No previous instance is available - Create one.
            if (Instance == null)
            {
                Instance = new SettingsHandler();

                // Attempt to load saved settings from a file.
                Instance.LoadSettings();
            }

            return Instance;
        }