protected virtual void OnHandledException(HandledExceptionEventArgs e) { if (this.HandledException != null) { WebClientPool.SynchronizationContext?.Post(new System.Threading.SendOrPostCallback(delegate { this.HandledException.Invoke(this, e); }), null); } }
private void OnHandledException(HandledExceptionEventArgs e) { this._IsBusy = this.myWebClient.IsBusy; if (this.HandledException != null) { this.syncContext?.Post(new SendOrPostCallback(delegate { this.HandledException.Invoke(this, e); }), null); } else { Leayal.Log.LogManager.GeneralLog.Print(e.Error); System.Windows.Forms.MessageBox.Show(string.Format(LanguageManager.GetMessageText("MyMainMenu_FailedCheckLauncherUpdates", "Failed to check for PSO2Launcher updates. Reason: {0}"), e.Error.Message), "Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } }
private void PSO2Plugin_HandledException(object sender, HandledExceptionEventArgs e) { this.OnHandledException(e); this.OnPluginStatusChanged(new PSO2PluginStatusChanged(e.Error, sender as PSO2Plugin)); }