private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e) { try { if (_timerCheckForUpdates != null) _timerCheckForUpdates.Stop(); } catch { } using (var form = new CheckForUpdates(this)) { form.ShowDialog(this); } Configuration.Settings.General.LastCheckForUpdates = DateTime.Now; }
private void TimerCheckForUpdatesTick(object sender, EventArgs e) { _timerCheckForUpdates.Stop(); if (_checkForUpdatesHelper.IsUpdateAvailable()) { using (var form = new CheckForUpdates(this, _checkForUpdatesHelper)) { form.ShowDialog(this); } } _checkForUpdatesHelper = null; _timerCheckForUpdates = null; }