void DownloadCompleted(bool cancelled) { client.Dispose(); client = null; if (cancelled) { try { OnDownloadCancelled?.Invoke(this, EventArgs.Empty); } catch { } return; } setting.SendLog(string.Format("{0}", I18N("DownloadCompleted"))); if (UpdateCore()) { try { OnDownloadCompleted?.Invoke(this, EventArgs.Empty); } catch { } } else { try { OnDownloadFail?.Invoke(this, EventArgs.Empty); } catch { } } }
void NotifyDownloadResults(bool status) { try { if (status) { OnDownloadCompleted?.Invoke(this, EventArgs.Empty); } else { OnDownloadFail?.Invoke(this, EventArgs.Empty); } } catch { } }