// Will be called if failed connecting (due to bad app id or anything else) private void ClientOnError(object sender, DiscordRPC.Message.ErrorMessage args) { connectionState = 2; Invoke(new MethodInvoker(() => { textBoxID.BackColor = System.Drawing.Color.FromArgb(255, 192, 192); toolStripStatusLabelStatus.Text = Strings.statusError; })); }
private static void Client_OnError(object sender, DiscordRPC.Message.ErrorMessage e) { if (!DisableLogging) { string output = string.Format("[Discord RPC] Failed Update! {0}", e.Message); System.Diagnostics.Debug.Print(output); ManiacEditor.Extensions.ConsoleExtensions.Print(output); } }
/// <summary> /// Will be called if failed connecting (due to bad app id or anything else). /// </summary> private void ClientOnError(object sender, DiscordRPC.Message.ErrorMessage args) { ConnectionManager.State = ConnectionType.Error; Invoke(new MethodInvoker(() => { if (buttonConnect.Enabled) // Ignore if the user disconnected before connection was established { return; } textBoxID.BackColor = CurrentColors.BgTextFieldsError; toolStripStatusLabelStatus.Text = Strings.statusError; })); if (ConnectionManager.HasChanged()) // Ignore repeated calls caused by auto reconnect { Analytics.TrackEvent("Connection error"); } restartTimer.Start(); }
private void ErrorCallback(Object sender, DiscordRPC.Message.ErrorMessage e) { Debug.WriteLine("Errored: " + e.Code + " Msg: " + e.Message); }
private static void Client_OnError(object sender, DiscordRPC.Message.ErrorMessage args) { Log.Error("RPC", $"({args.Code}) {args.Message}"); }
private void Client_OnError(object sender, DiscordRPC.Message.ErrorMessage args) { SetStateText($"Error: {args.Code} {args.Message}"); }