Added IRC error output event and it will show red in output tab

This commit is contained in:
Jaex 2015-09-09 19:21:31 +03:00
parent df46d14a22
commit 77d90b136d
6 changed files with 167 additions and 231 deletions

View file

@ -40,6 +40,7 @@ public class IRC : IDisposable
public const int DefaultPortSSL = 6697;
public event Action<MessageInfo> Output;
public event Action<Exception> ErrorOutput;
public event Action Connected, Disconnected;
public delegate void MessageEventHandler(UserInfo user, string channel, string message);
public event MessageEventHandler Message;
@ -150,6 +151,7 @@ public void Connect()
{
IsWorking = false;
DebugHelper.WriteLine(e.ToString());
OnErrorOutput(e);
}
}
@ -171,6 +173,7 @@ public void Disconnect()
catch (Exception e)
{
DebugHelper.WriteLine(e.ToString());
OnErrorOutput(e);
}
}
@ -195,15 +198,17 @@ private void ConnectionThread()
catch (Exception e)
{
DebugHelper.WriteLine(e.ToString());
OnErrorOutput(e);
}
}
}
catch (IOException)
{
}
catch (Exception e)
{
DebugHelper.WriteLine(e.ToString());
if (!disconnecting)
{
DebugHelper.WriteLine(e.ToString());
OnErrorOutput(e);
}
}
OnDisconnected();
@ -334,6 +339,14 @@ private void OnOutput(MessageInfo messageInfo)
//Console.WriteLine($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {messageInfo.Content}");
}
private void OnErrorOutput(Exception e)
{
if (ErrorOutput != null)
{
ErrorOutput(e);
}
}
protected void OnConnected()
{
IsConnected = true;

View file

@ -41,7 +41,6 @@ private void InitializeComponent()
this.tsmiColorGrey = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiColorLightGrey = new System.Windows.Forms.ToolStripMenuItem();
this.btnMessageSend = new System.Windows.Forms.Button();
this.txtOutput = new System.Windows.Forms.TextBox();
this.tcMain = new System.Windows.Forms.TabControl();
this.tpMain = new System.Windows.Forms.TabPage();
this.btnConnect = new System.Windows.Forms.Button();
@ -50,6 +49,7 @@ private void InitializeComponent()
this.txtCommand = new System.Windows.Forms.TextBox();
this.lblCommand = new System.Windows.Forms.Label();
this.btnCommandSend = new System.Windows.Forms.Button();
this.rtbOutput = new System.Windows.Forms.RichTextBox();
this.tpMessages = new System.Windows.Forms.TabPage();
this.tcMessages = new System.Windows.Forms.TabControl();
this.btnMessagesMenu = new System.Windows.Forms.Button();
@ -262,13 +262,6 @@ private void InitializeComponent()
this.btnMessageSend.UseVisualStyleBackColor = true;
this.btnMessageSend.Click += new System.EventHandler(this.btnMessageSend_Click);
//
// txtOutput
//
resources.ApplyResources(this.txtOutput, "txtOutput");
this.txtOutput.BackColor = System.Drawing.Color.White;
this.txtOutput.Name = "txtOutput";
this.txtOutput.ReadOnly = true;
//
// tcMain
//
this.tcMain.Controls.Add(this.tpMain);
@ -307,7 +300,7 @@ private void InitializeComponent()
this.tpOutput.Controls.Add(this.txtCommand);
this.tpOutput.Controls.Add(this.lblCommand);
this.tpOutput.Controls.Add(this.btnCommandSend);
this.tpOutput.Controls.Add(this.txtOutput);
this.tpOutput.Controls.Add(this.rtbOutput);
resources.ApplyResources(this.tpOutput, "tpOutput");
this.tpOutput.Name = "tpOutput";
this.tpOutput.UseVisualStyleBackColor = true;
@ -330,6 +323,14 @@ private void InitializeComponent()
this.btnCommandSend.UseVisualStyleBackColor = true;
this.btnCommandSend.Click += new System.EventHandler(this.btnCommandSend_Click);
//
// rtbOutput
//
resources.ApplyResources(this.rtbOutput, "rtbOutput");
this.rtbOutput.BackColor = System.Drawing.Color.White;
this.rtbOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.rtbOutput.Name = "rtbOutput";
this.rtbOutput.ReadOnly = true;
//
// tpMessages
//
this.tpMessages.Controls.Add(this.tcMessages);
@ -393,7 +394,6 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtMessage;
private System.Windows.Forms.Button btnMessageSend;
private System.Windows.Forms.TextBox txtOutput;
private System.Windows.Forms.TabControl tcMain;
private System.Windows.Forms.TabPage tpOutput;
private System.Windows.Forms.TabPage tpMessages;
@ -430,6 +430,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem tsmiColorGrey;
private System.Windows.Forms.ToolStripMenuItem tsmiColorLightGrey;
private System.Windows.Forms.TabControl tcMessages;
private System.Windows.Forms.RichTextBox rtbOutput;
}
}

View file

@ -46,6 +46,7 @@ public IRCClientForm() : this(new IRCInfo())
public IRCClientForm(IRCInfo info)
{
InitializeComponent();
rtbOutput.AddContextMenu();
((ToolStripDropDownMenu)tsmiColors.DropDown).ShowImageMargin = false;
tabManager = new TabManager(tcMessages);
@ -56,6 +57,7 @@ public IRCClientForm(IRCInfo info)
IRC = new IRC(Info);
IRC.Disconnected += IRC_Disconnected;
IRC.Output += IRC_Output;
IRC.ErrorOutput += IRC_ErrorOutput;
IRC.Message += IRC_Message;
IRC.UserJoined += IRC_UserJoined;
}
@ -78,6 +80,16 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}
private void AppendOutput(string output, Color color)
{
this.InvokeSafe(() =>
{
rtbOutput.Select(rtbOutput.TextLength, 0);
rtbOutput.SelectionColor = color;
rtbOutput.AppendText($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {output}\r\n");
});
}
private void AppendMessage(string message)
{
txtMessage.AppendTextToSelection(message);
@ -394,10 +406,12 @@ private void IRC_Disconnected()
private void IRC_Output(MessageInfo messageInfo)
{
this.InvokeSafe(() =>
{
txtOutput.AppendText($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {messageInfo.Content}\r\n");
});
AppendOutput(messageInfo.Content, Color.Black);
}
private void IRC_ErrorOutput(Exception e)
{
AppendOutput(e.ToString(), Color.Red);
}
private void IRC_Message(UserInfo user, string channel, string message)
@ -409,7 +423,7 @@ private void IRC_Message(UserInfo user, string channel, string message)
channel = user.Nickname;
}
tabManager.AddMessage(channel, $"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {user.Nickname}: {message}");
tabManager.AddMessage(channel, $"{user.Nickname}: {message}");
});
}

View file

@ -147,15 +147,6 @@
<metadata name="cmsMessage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="cmsMessage.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 114</value>
</data>
<data name="&gt;&gt;cmsMessage.Name" xml:space="preserve">
<value>cmsMessage</value>
</data>
<data name="&gt;&gt;cmsMessage.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="tsmiMessageBold.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt, style=Bold</value>
</data>
@ -189,12 +180,6 @@
<data name="tsmiMessageNormal.Text" xml:space="preserve">
<value>Normal</value>
</data>
<data name="tsmiColors.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 22</value>
</data>
<data name="tsmiColors.Text" xml:space="preserve">
<value>Colors</value>
</data>
<data name="tsmiColorWhite.Size" type="System.Drawing.Size, System.Drawing">
<value>135, 22</value>
</data>
@ -291,6 +276,21 @@
<data name="tsmiColorLightGrey.Text" xml:space="preserve">
<value>Light Grey</value>
</data>
<data name="tsmiColors.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 22</value>
</data>
<data name="tsmiColors.Text" xml:space="preserve">
<value>Colors</value>
</data>
<data name="cmsMessage.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 114</value>
</data>
<data name="&gt;&gt;cmsMessage.Name" xml:space="preserve">
<value>cmsMessage</value>
</data>
<data name="&gt;&gt;cmsMessage.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="btnMessageSend.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
@ -321,38 +321,20 @@
<data name="&gt;&gt;btnMessageSend.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtOutput.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
<data name="btnConnect.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="txtOutput.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
<data name="btnConnect.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 500</value>
</data>
<data name="txtOutput.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
<data name="btnConnect.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 24</value>
</data>
<data name="txtOutput.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Both</value>
<data name="btnConnect.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="txtOutput.Size" type="System.Drawing.Size, System.Drawing">
<value>760, 484</value>
</data>
<data name="txtOutput.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="txtOutput.WordWrap" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;txtOutput.Name" xml:space="preserve">
<value>txtOutput</value>
</data>
<data name="&gt;&gt;txtOutput.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtOutput.Parent" xml:space="preserve">
<value>tpOutput</value>
</data>
<data name="&gt;&gt;txtOutput.ZOrder" xml:space="preserve">
<value>3</value>
<data name="btnConnect.Text" xml:space="preserve">
<value>Connect</value>
</data>
<data name="&gt;&gt;btnConnect.Name" xml:space="preserve">
<value>btnConnect</value>
@ -366,6 +348,18 @@
<data name="&gt;&gt;btnConnect.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="pgSettings.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="pgSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
</data>
<data name="pgSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>760, 484</value>
</data>
<data name="pgSettings.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;pgSettings.Name" xml:space="preserve">
<value>pgSettings</value>
</data>
@ -489,6 +483,36 @@
<data name="&gt;&gt;btnCommandSend.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="rtbOutput.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="rtbOutput.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
</data>
<data name="rtbOutput.Size" type="System.Drawing.Size, System.Drawing">
<value>760, 484</value>
</data>
<data name="rtbOutput.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="rtbOutput.Text" xml:space="preserve">
<value />
</data>
<data name="rtbOutput.WordWrap" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;rtbOutput.Name" xml:space="preserve">
<value>rtbOutput</value>
</data>
<data name="&gt;&gt;rtbOutput.Type" xml:space="preserve">
<value>System.Windows.Forms.RichTextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rtbOutput.Parent" xml:space="preserve">
<value>tpOutput</value>
</data>
<data name="&gt;&gt;rtbOutput.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tpOutput.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
@ -516,168 +540,6 @@
<data name="&gt;&gt;tpOutput.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;tcMessages.Name" xml:space="preserve">
<value>tcMessages</value>
</data>
<data name="&gt;&gt;tcMessages.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tcMessages.Parent" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;tcMessages.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnMessagesMenu.Name" xml:space="preserve">
<value>btnMessagesMenu</value>
</data>
<data name="&gt;&gt;btnMessagesMenu.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnMessagesMenu.Parent" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;btnMessagesMenu.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;lblMessage.Name" xml:space="preserve">
<value>lblMessage</value>
</data>
<data name="&gt;&gt;lblMessage.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblMessage.Parent" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;lblMessage.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;lblChannel.Name" xml:space="preserve">
<value>lblChannel</value>
</data>
<data name="&gt;&gt;lblChannel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblChannel.Parent" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;lblChannel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;txtChannel.Name" xml:space="preserve">
<value>txtChannel</value>
</data>
<data name="&gt;&gt;txtChannel.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtChannel.Parent" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;txtChannel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tpMessages.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tpMessages.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpMessages.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 535</value>
</data>
<data name="tpMessages.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tpMessages.Text" xml:space="preserve">
<value>Messages</value>
</data>
<data name="&gt;&gt;tpMessages.Name" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;tpMessages.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tpMessages.Parent" xml:space="preserve">
<value>tcMain</value>
</data>
<data name="&gt;&gt;tpMessages.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tcMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tcMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tcMain.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 561</value>
</data>
<data name="tcMain.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tcMain.Name" xml:space="preserve">
<value>tcMain</value>
</data>
<data name="&gt;&gt;tcMain.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tcMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tcMain.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnConnect.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="btnConnect.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 500</value>
</data>
<data name="btnConnect.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 24</value>
</data>
<data name="btnConnect.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="btnConnect.Text" xml:space="preserve">
<value>Connect</value>
</data>
<data name="&gt;&gt;btnConnect.Name" xml:space="preserve">
<value>btnConnect</value>
</data>
<data name="&gt;&gt;btnConnect.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnConnect.Parent" xml:space="preserve">
<value>tpMain</value>
</data>
<data name="&gt;&gt;btnConnect.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="pgSettings.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="pgSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
</data>
<data name="pgSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>760, 484</value>
</data>
<data name="pgSettings.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;pgSettings.Name" xml:space="preserve">
<value>pgSettings</value>
</data>
<data name="&gt;&gt;pgSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.PropertyGrid, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pgSettings.Parent" xml:space="preserve">
<value>tpMain</value>
</data>
<data name="&gt;&gt;pgSettings.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tcMessages.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
@ -716,7 +578,7 @@
</data>
<data name="btnMessagesMenu.Text" xml:space="preserve">
<value>...</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;btnMessagesMenu.Name" xml:space="preserve">
<value>btnMessagesMenu</value>
</data>
@ -813,6 +675,57 @@
<data name="&gt;&gt;txtChannel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tpMessages.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tpMessages.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpMessages.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 535</value>
</data>
<data name="tpMessages.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tpMessages.Text" xml:space="preserve">
<value>Messages</value>
</data>
<data name="&gt;&gt;tpMessages.Name" xml:space="preserve">
<value>tpMessages</value>
</data>
<data name="&gt;&gt;tpMessages.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tpMessages.Parent" xml:space="preserve">
<value>tcMain</value>
</data>
<data name="&gt;&gt;tpMessages.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tcMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tcMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tcMain.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 561</value>
</data>
<data name="tcMain.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tcMain.Name" xml:space="preserve">
<value>tcMain</value>
</data>
<data name="&gt;&gt;tcMain.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tcMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tcMain.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -53,10 +53,5 @@ public TabInfo(string name)
};
Tab.Controls.Add(TextBox);
}
public void AppendText(string text)
{
TextBox.AppendText(text + "\r\n");
}
}
}

View file

@ -93,7 +93,7 @@ private void tc_MouseClick(object sender, MouseEventArgs e)
public void AddMessage(string channel, string message)
{
TabInfo tabInfo = AddChannel(channel);
tabInfo.AppendText(message);
tabInfo.TextBox.AppendText($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {message}\r\n");
}
public TabInfo AddChannel(string channel)