private void NeedsUpdate(object sender, EventArgs args) { if (this.Dispatcher.CheckAccess()) { UpdateNotification updateNotification = new UpdateNotification(); updateNotification.MSIURL = MSI_URL; updateNotification.ShowDialog(); } else { this.Dispatcher.Invoke((Action)(() => this.NeedsUpdate(sender, args))); } }
private void NeedsUpdate(object sender, EventArgs args) { if (this.Dispatcher.CheckAccess()) { UpdateNotification updateNotification = new UpdateNotification(); updateNotification.MSIURL = MSI_URL; updateNotification.ShowDialog(); } else this.Dispatcher.Invoke((Action)(() => this.NeedsUpdate(sender, args))); }