public override void LoadSettingsFromStorage()

in src/Microsoft.VisualStudio.SlowCheetah.VS/Options/OptionsDialogPage.cs [97:125]


        public override void LoadSettingsFromStorage()
        {
            try
            {
                this.InitializeDefaults();
                using (RegistryKey userRootKey = SlowCheetahPackage.OurPackage.UserRegistryRoot)
                using (RegistryKey cheetahKey = userRootKey.OpenSubKey(RegOptionsKey))
                {
                    if (cheetahKey != null)
                    {
                        object enablePreview = cheetahKey.GetValue(RegPreviewEnable);
                        if (enablePreview != null && (enablePreview is int))
                        {
                            this.EnablePreview = ((int)enablePreview) == 1;
                        }

                        object addDependentUpon = cheetahKey.GetValue(RegDependentUpon);
                        if (addDependentUpon != null && (addDependentUpon is int))
                        {
                            this.AddDependentUpon = ((int)addDependentUpon) == 1;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Debug.Assert(false, "Error reading Slow Cheetah settings from the registry: " + e.Message);
            }
        }