internal void OnError(Events.ErrorEventArgs e) { if (Error != null) { Error(this, e); } }
private void IRC_Error(object sender, Events.ErrorEventArgs e) { Action act = delegate() { lbx_Chats.Items.Add(new ChatMsg(Brushes.Red, $"[{DateTime.Now.ToString("HH:mm:ss.fff")}] [Warn] {e.Error.Message}")); IsConn = false; }; this.BeginInvoke(act); IRC.ConnectToServer(); }