public void OnExecute(CommandEventArgs e) { IAnkhConfigurationService configSvc = e.GetService <IAnkhConfigurationService>(); if (configSvc != null) { AnkhConfig cfg = configSvc.Instance; using (ConfigureRecentChangesPageDialog dlg = new ConfigureRecentChangesPageDialog()) { int seconds = Math.Max(0, cfg.RecentChangesRefreshInterval); dlg.RefreshInterval = seconds / 60; if (dlg.ShowDialog(e.Context) == System.Windows.Forms.DialogResult.OK) { cfg.RecentChangesRefreshInterval = Math.Max(dlg.RefreshInterval * 60, 0); configSvc.SaveConfig(cfg); RecentChangesPage rcPage = e.GetService <RecentChangesPage>(); if (rcPage != null) { rcPage.RefreshIntervalConfigModified(); } } } } }