Exemplo n.º 1
0
        /// <summary>
        /// saves the new setting into configuration
        /// </summary>
        /// <param name="seconds">new refresh interval in seconds</param>
        private void SaveRecentChangesRefreshInterval(int seconds)
        {
            AnkhConfig cfg = Config;

            cfg.RecentChangesRefreshInterval = seconds;
            ConfigSvc.SaveConfig(cfg);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Saves the settings.
        /// </summary>
        public void SaveSettings()
        {
            // Load in case something changed in the mean time, other page/other VS instance
            ConfigSvc.LoadConfig();

            SaveSettingsCore();

            try
            {
                ConfigSvc.SaveConfig(Config);
            }
            catch (Exception ex)
            {
                IAnkhErrorHandler eh = Context.GetService <IAnkhErrorHandler>();

                if (eh != null && eh.IsEnabled(ex))
                {
                    eh.OnError(ex);
                    return;
                }

                throw;
            }
        }