public void NotifyReconnect(object sender, AfterReconnectEventArgs eventArgs) { if (eventArgs.ReturnValue == ErrorCode.Success) { WriteInfo(sender, String.Format(">> Error: {0}", eventArgs.ReturnValue)); } else { WriteWarning(sender, String.Format(">> Error: {0}", eventArgs.ReturnValue)); } }
public void NotifyReconnect(object sender, AfterReconnectEventArgs eventArgs) { Gui.InvokeOnUiThread(() => { if (eventArgs.ReturnValue == ErrorCode.Success) { Gui.SetLogForeColor(Colors.LogDefaultColor); WriteLogLine(LogLevel.Info, sender, $"<= {eventArgs.ReturnValue}"); Gui.UpdateChannelStatus(ChannelStatusType.Connected); } else { Gui.SetLogForeColor(Colors.LogErrorColor); WriteLogLine(LogLevel.Error, sender, $"<= {eventArgs.ReturnValue}"); Gui.UpdateChannelStatus(ChannelStatusType.Error); } Gui.UpdateLastError(eventArgs.ReturnValue); }); }