private void FireCallback(UpdateCheckerArgs e) { if (OnUpdateInfoReceived != null) { try { OnUpdateInfoReceived(this, e); } catch { } } }
void OnUpdateInfoReceived(object sender, UpdateCheckerArgs e) { if (InvokeRequired) { BeginInvoke(new MethodInvoker(() => OnUpdateInfoReceived(sender, e))); return; } if (!e.Success) { if (ManualUpdateCheck) tabsConsole.DisplayNotificationInChat("Error: Failed connecting to the update site.", ChatBufferTextStyle.StatusBlue); } else { if (!ManualUpdateCheck && e.Info.DisplayMOTD) { tabsConsole.DisplayNotificationInChat(e.Info.MOTD, ChatBufferTextStyle.StatusBlue); } if (e.Info.UpdateAvailable) { tabsConsole.DisplayNotificationInChat("New version available at " + e.Info.DownloadSite, ChatBufferTextStyle.Alert); } else { if (ManualUpdateCheck) tabsConsole.DisplayNotificationInChat("Your version is up to date.", ChatBufferTextStyle.StatusBlue); } } updateChecker.Dispose(); updateChecker = null; }