private void GitUiCommandsPreBrowse(object sender, GitUIBaseEventArgs e) { //Only check at startup when plugin is enabled if (!Settings.GetSetting("Enabled (true / false)").Equals("true", StringComparison.InvariantCultureIgnoreCase)) return; int days; if (!int.TryParse(Settings.GetSetting("Check every # days"), out days)) days = 7; try { if (DateTime.ParseExact( Settings.GetSetting("Last check (yyyy/M/dd)"), "yyyy/M/dd", CultureInfo.InvariantCulture).AddDays(days) >= DateTime.Now) return; } catch (FormatException) { } finally { Settings.SetSetting("Last check (yyyy/M/dd)", DateTime.Now.ToString("yyyy/M/dd", CultureInfo.InvariantCulture)); } var updateForm = new Updates(e.GitVersion) {AutoClose = true}; updateForm.ShowDialog(); }
void gitUICommands_PreBrowse(IGitUIEventArgs e) { //Only check at startup when plugin is enabled if (Settings.GetSetting("Enabled (true / false)").Equals("true", StringComparison.InvariantCultureIgnoreCase)) { int days = 0; if (!int.TryParse(Settings.GetSetting("Check every # days"), out days)) days = 0; if (DateTime.ParseExact(Settings.GetSetting("Last check (yyyy/M/dd)"), "yyyy/M/dd", CultureInfo.InvariantCulture).AddDays(7) < DateTime.Now) { Settings.SetSetting("Last check (yyyy/M/dd)", DateTime.Now.ToString("yyyy/M/dd", CultureInfo.InvariantCulture)); Updates updateForm = new Updates(e.GitVersion); updateForm.AutoClose = true; updateForm.ShowDialog(); } } }
private void GitUiCommandsPreBrowse(object sender, GitUIBaseEventArgs e) { //Only check at startup when plugin is enabled if (!Settings.GetSetting("Enabled (true / false)").Equals("true", StringComparison.InvariantCultureIgnoreCase)) { return; } int days; if (!int.TryParse(Settings.GetSetting("Check every # days"), out days)) { days = 7; } try { if (DateTime.ParseExact( Settings.GetSetting("Last check (yyyy/M/dd)"), "yyyy/M/dd", CultureInfo.InvariantCulture).AddDays(days) >= DateTime.Now) { return; } } catch (FormatException) { } finally { Settings.SetSetting("Last check (yyyy/M/dd)", DateTime.Now.ToString("yyyy/M/dd", CultureInfo.InvariantCulture)); } var updateForm = new Updates(e.GitVersion) { AutoClose = true }; updateForm.ShowDialog(); }
public void Execute(GitUIBaseEventArgs e) { var updateForm = new Updates(e.GitVersion) {AutoClose = false}; updateForm.ShowDialog(); }
public bool Execute(GitUIBaseEventArgs e) { var updateForm = new Updates(e.GitVersion) {AutoClose = false}; updateForm.ShowDialog(e.OwnerForm as IWin32Window); return false; }
public void Execute(IGitUIEventArgs e) { Updates updateForm = new Updates(e.GitVersion); updateForm.AutoClose = false; updateForm.ShowDialog(); }
public override bool Execute(GitUIBaseEventArgs e) { using (var updateForm = new Updates(e.GitModule.GitVersion) { AutoClose = false }) updateForm.ShowDialog(e.OwnerForm); return false; }