Exemplo n.º 1
0
 /// <summary>
 /// Saves the stored data
 /// </summary>
 public static void Save()
 {
     // Save all the settings one by one
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "ShowPreviewButton", ShowPreviewButton);
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "ShowCopyButton", ShowCopyButton);
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "ShowHamButton", ShowHamButton);
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "ShowSelectButton", ShowSelectButton);
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "SuppressConfirm", SuppressConfirm);
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "DefaultSpamProfileId", DefaultSpamProfileId);
     SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "DefaultHamProfileId", DefaultHamProfileId);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Resets the default Ham / Spam profile
        /// </summary>
        /// <param name="dftProfile">Which profile type to reset</param>
        public static void ResetDefaultProfile(DefaultType pdftProfile)
        {
            switch (pdftProfile)
            {
            case DefaultType.Ham:
                SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "DefaultHamProfileId", string.Empty);
                break;

            case DefaultType.Spam:
                SGGlobals.SaveSetting(SGGlobals.BaseRegistryKey, "DefaultSpamProfileId", string.Empty);
                break;
            }
        }