mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Added IRC error output event and it will show red in output tab
This commit is contained in:
parent
df46d14a22
commit
77d90b136d
6 changed files with 167 additions and 231 deletions
|
@ -40,6 +40,7 @@ public class IRC : IDisposable
|
||||||
public const int DefaultPortSSL = 6697;
|
public const int DefaultPortSSL = 6697;
|
||||||
|
|
||||||
public event Action<MessageInfo> Output;
|
public event Action<MessageInfo> Output;
|
||||||
|
public event Action<Exception> ErrorOutput;
|
||||||
public event Action Connected, Disconnected;
|
public event Action Connected, Disconnected;
|
||||||
public delegate void MessageEventHandler(UserInfo user, string channel, string message);
|
public delegate void MessageEventHandler(UserInfo user, string channel, string message);
|
||||||
public event MessageEventHandler Message;
|
public event MessageEventHandler Message;
|
||||||
|
@ -150,6 +151,7 @@ public void Connect()
|
||||||
{
|
{
|
||||||
IsWorking = false;
|
IsWorking = false;
|
||||||
DebugHelper.WriteLine(e.ToString());
|
DebugHelper.WriteLine(e.ToString());
|
||||||
|
OnErrorOutput(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +173,7 @@ public void Disconnect()
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
DebugHelper.WriteLine(e.ToString());
|
DebugHelper.WriteLine(e.ToString());
|
||||||
|
OnErrorOutput(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,15 +198,17 @@ private void ConnectionThread()
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
DebugHelper.WriteLine(e.ToString());
|
DebugHelper.WriteLine(e.ToString());
|
||||||
|
OnErrorOutput(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
if (!disconnecting)
|
||||||
{
|
{
|
||||||
DebugHelper.WriteLine(e.ToString());
|
DebugHelper.WriteLine(e.ToString());
|
||||||
|
OnErrorOutput(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OnDisconnected();
|
OnDisconnected();
|
||||||
|
@ -334,6 +339,14 @@ private void OnOutput(MessageInfo messageInfo)
|
||||||
//Console.WriteLine($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {messageInfo.Content}");
|
//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()
|
protected void OnConnected()
|
||||||
{
|
{
|
||||||
IsConnected = true;
|
IsConnected = true;
|
||||||
|
|
21
ShareX.IRCLib/IRCClient/IRCClientForm.Designer.cs
generated
21
ShareX.IRCLib/IRCClient/IRCClientForm.Designer.cs
generated
|
@ -41,7 +41,6 @@ private void InitializeComponent()
|
||||||
this.tsmiColorGrey = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsmiColorGrey = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tsmiColorLightGrey = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsmiColorLightGrey = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.btnMessageSend = new System.Windows.Forms.Button();
|
this.btnMessageSend = new System.Windows.Forms.Button();
|
||||||
this.txtOutput = new System.Windows.Forms.TextBox();
|
|
||||||
this.tcMain = new System.Windows.Forms.TabControl();
|
this.tcMain = new System.Windows.Forms.TabControl();
|
||||||
this.tpMain = new System.Windows.Forms.TabPage();
|
this.tpMain = new System.Windows.Forms.TabPage();
|
||||||
this.btnConnect = new System.Windows.Forms.Button();
|
this.btnConnect = new System.Windows.Forms.Button();
|
||||||
|
@ -50,6 +49,7 @@ private void InitializeComponent()
|
||||||
this.txtCommand = new System.Windows.Forms.TextBox();
|
this.txtCommand = new System.Windows.Forms.TextBox();
|
||||||
this.lblCommand = new System.Windows.Forms.Label();
|
this.lblCommand = new System.Windows.Forms.Label();
|
||||||
this.btnCommandSend = new System.Windows.Forms.Button();
|
this.btnCommandSend = new System.Windows.Forms.Button();
|
||||||
|
this.rtbOutput = new System.Windows.Forms.RichTextBox();
|
||||||
this.tpMessages = new System.Windows.Forms.TabPage();
|
this.tpMessages = new System.Windows.Forms.TabPage();
|
||||||
this.tcMessages = new System.Windows.Forms.TabControl();
|
this.tcMessages = new System.Windows.Forms.TabControl();
|
||||||
this.btnMessagesMenu = new System.Windows.Forms.Button();
|
this.btnMessagesMenu = new System.Windows.Forms.Button();
|
||||||
|
@ -262,13 +262,6 @@ private void InitializeComponent()
|
||||||
this.btnMessageSend.UseVisualStyleBackColor = true;
|
this.btnMessageSend.UseVisualStyleBackColor = true;
|
||||||
this.btnMessageSend.Click += new System.EventHandler(this.btnMessageSend_Click);
|
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
|
// tcMain
|
||||||
//
|
//
|
||||||
this.tcMain.Controls.Add(this.tpMain);
|
this.tcMain.Controls.Add(this.tpMain);
|
||||||
|
@ -307,7 +300,7 @@ private void InitializeComponent()
|
||||||
this.tpOutput.Controls.Add(this.txtCommand);
|
this.tpOutput.Controls.Add(this.txtCommand);
|
||||||
this.tpOutput.Controls.Add(this.lblCommand);
|
this.tpOutput.Controls.Add(this.lblCommand);
|
||||||
this.tpOutput.Controls.Add(this.btnCommandSend);
|
this.tpOutput.Controls.Add(this.btnCommandSend);
|
||||||
this.tpOutput.Controls.Add(this.txtOutput);
|
this.tpOutput.Controls.Add(this.rtbOutput);
|
||||||
resources.ApplyResources(this.tpOutput, "tpOutput");
|
resources.ApplyResources(this.tpOutput, "tpOutput");
|
||||||
this.tpOutput.Name = "tpOutput";
|
this.tpOutput.Name = "tpOutput";
|
||||||
this.tpOutput.UseVisualStyleBackColor = true;
|
this.tpOutput.UseVisualStyleBackColor = true;
|
||||||
|
@ -330,6 +323,14 @@ private void InitializeComponent()
|
||||||
this.btnCommandSend.UseVisualStyleBackColor = true;
|
this.btnCommandSend.UseVisualStyleBackColor = true;
|
||||||
this.btnCommandSend.Click += new System.EventHandler(this.btnCommandSend_Click);
|
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
|
// tpMessages
|
||||||
//
|
//
|
||||||
this.tpMessages.Controls.Add(this.tcMessages);
|
this.tpMessages.Controls.Add(this.tcMessages);
|
||||||
|
@ -393,7 +394,6 @@ private void InitializeComponent()
|
||||||
|
|
||||||
private System.Windows.Forms.TextBox txtMessage;
|
private System.Windows.Forms.TextBox txtMessage;
|
||||||
private System.Windows.Forms.Button btnMessageSend;
|
private System.Windows.Forms.Button btnMessageSend;
|
||||||
private System.Windows.Forms.TextBox txtOutput;
|
|
||||||
private System.Windows.Forms.TabControl tcMain;
|
private System.Windows.Forms.TabControl tcMain;
|
||||||
private System.Windows.Forms.TabPage tpOutput;
|
private System.Windows.Forms.TabPage tpOutput;
|
||||||
private System.Windows.Forms.TabPage tpMessages;
|
private System.Windows.Forms.TabPage tpMessages;
|
||||||
|
@ -430,6 +430,7 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.ToolStripMenuItem tsmiColorGrey;
|
private System.Windows.Forms.ToolStripMenuItem tsmiColorGrey;
|
||||||
private System.Windows.Forms.ToolStripMenuItem tsmiColorLightGrey;
|
private System.Windows.Forms.ToolStripMenuItem tsmiColorLightGrey;
|
||||||
private System.Windows.Forms.TabControl tcMessages;
|
private System.Windows.Forms.TabControl tcMessages;
|
||||||
|
private System.Windows.Forms.RichTextBox rtbOutput;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ public IRCClientForm() : this(new IRCInfo())
|
||||||
public IRCClientForm(IRCInfo info)
|
public IRCClientForm(IRCInfo info)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
rtbOutput.AddContextMenu();
|
||||||
((ToolStripDropDownMenu)tsmiColors.DropDown).ShowImageMargin = false;
|
((ToolStripDropDownMenu)tsmiColors.DropDown).ShowImageMargin = false;
|
||||||
|
|
||||||
tabManager = new TabManager(tcMessages);
|
tabManager = new TabManager(tcMessages);
|
||||||
|
@ -56,6 +57,7 @@ public IRCClientForm(IRCInfo info)
|
||||||
IRC = new IRC(Info);
|
IRC = new IRC(Info);
|
||||||
IRC.Disconnected += IRC_Disconnected;
|
IRC.Disconnected += IRC_Disconnected;
|
||||||
IRC.Output += IRC_Output;
|
IRC.Output += IRC_Output;
|
||||||
|
IRC.ErrorOutput += IRC_ErrorOutput;
|
||||||
IRC.Message += IRC_Message;
|
IRC.Message += IRC_Message;
|
||||||
IRC.UserJoined += IRC_UserJoined;
|
IRC.UserJoined += IRC_UserJoined;
|
||||||
}
|
}
|
||||||
|
@ -78,6 +80,16 @@ protected override void Dispose(bool disposing)
|
||||||
base.Dispose(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)
|
private void AppendMessage(string message)
|
||||||
{
|
{
|
||||||
txtMessage.AppendTextToSelection(message);
|
txtMessage.AppendTextToSelection(message);
|
||||||
|
@ -394,10 +406,12 @@ private void IRC_Disconnected()
|
||||||
|
|
||||||
private void IRC_Output(MessageInfo messageInfo)
|
private void IRC_Output(MessageInfo messageInfo)
|
||||||
{
|
{
|
||||||
this.InvokeSafe(() =>
|
AppendOutput(messageInfo.Content, Color.Black);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void IRC_ErrorOutput(Exception e)
|
||||||
{
|
{
|
||||||
txtOutput.AppendText($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {messageInfo.Content}\r\n");
|
AppendOutput(e.ToString(), Color.Red);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void IRC_Message(UserInfo user, string channel, string message)
|
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;
|
channel = user.Nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
tabManager.AddMessage(channel, $"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - {user.Nickname}: {message}");
|
tabManager.AddMessage(channel, $"{user.Nickname}: {message}");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,15 +147,6 @@
|
||||||
<metadata name="cmsMessage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="cmsMessage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="cmsMessage.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>101, 114</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>cmsMessage.Name" xml:space="preserve">
|
|
||||||
<value>cmsMessage</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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">
|
<data name="tsmiMessageBold.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
<value>Segoe UI, 9pt, style=Bold</value>
|
<value>Segoe UI, 9pt, style=Bold</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -189,12 +180,6 @@
|
||||||
<data name="tsmiMessageNormal.Text" xml:space="preserve">
|
<data name="tsmiMessageNormal.Text" xml:space="preserve">
|
||||||
<value>Normal</value>
|
<value>Normal</value>
|
||||||
</data>
|
</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">
|
<data name="tsmiColorWhite.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>135, 22</value>
|
<value>135, 22</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -291,6 +276,21 @@
|
||||||
<data name="tsmiColorLightGrey.Text" xml:space="preserve">
|
<data name="tsmiColorLightGrey.Text" xml:space="preserve">
|
||||||
<value>Light Grey</value>
|
<value>Light Grey</value>
|
||||||
</data>
|
</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=">>cmsMessage.Name" xml:space="preserve">
|
||||||
|
<value>cmsMessage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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">
|
<data name="btnMessageSend.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>Bottom, Right</value>
|
<value>Bottom, Right</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -321,38 +321,20 @@
|
||||||
<data name=">>btnMessageSend.ZOrder" xml:space="preserve">
|
<data name=">>btnMessageSend.ZOrder" xml:space="preserve">
|
||||||
<value>6</value>
|
<value>6</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="txtOutput.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
<data name="btnConnect.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>Top, Bottom, Left, Right</value>
|
<value>Bottom, Left</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="txtOutput.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnConnect.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>8, 8</value>
|
<value>8, 500</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="txtOutput.Multiline" type="System.Boolean, mscorlib">
|
<data name="btnConnect.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>True</value>
|
<value>112, 24</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="txtOutput.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
|
<data name="btnConnect.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>Both</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="txtOutput.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="btnConnect.Text" xml:space="preserve">
|
||||||
<value>760, 484</value>
|
<value>Connect</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=">>txtOutput.Name" xml:space="preserve">
|
|
||||||
<value>txtOutput</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>txtOutput.Parent" xml:space="preserve">
|
|
||||||
<value>tpOutput</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>txtOutput.ZOrder" xml:space="preserve">
|
|
||||||
<value>3</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name=">>btnConnect.Name" xml:space="preserve">
|
<data name=">>btnConnect.Name" xml:space="preserve">
|
||||||
<value>btnConnect</value>
|
<value>btnConnect</value>
|
||||||
|
@ -366,6 +348,18 @@
|
||||||
<data name=">>btnConnect.ZOrder" xml:space="preserve">
|
<data name=">>btnConnect.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</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=">>pgSettings.Name" xml:space="preserve">
|
<data name=">>pgSettings.Name" xml:space="preserve">
|
||||||
<value>pgSettings</value>
|
<value>pgSettings</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -489,6 +483,36 @@
|
||||||
<data name=">>btnCommandSend.ZOrder" xml:space="preserve">
|
<data name=">>btnCommandSend.ZOrder" xml:space="preserve">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</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=">>rtbOutput.Name" xml:space="preserve">
|
||||||
|
<value>rtbOutput</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>rtbOutput.Parent" xml:space="preserve">
|
||||||
|
<value>tpOutput</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>rtbOutput.ZOrder" xml:space="preserve">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
<data name="tpOutput.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="tpOutput.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>4, 22</value>
|
<value>4, 22</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -516,168 +540,6 @@
|
||||||
<data name=">>tpOutput.ZOrder" xml:space="preserve">
|
<data name=">>tpOutput.ZOrder" xml:space="preserve">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>tcMessages.Name" xml:space="preserve">
|
|
||||||
<value>tcMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tcMessages.Parent" xml:space="preserve">
|
|
||||||
<value>tpMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>tcMessages.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnMessagesMenu.Name" xml:space="preserve">
|
|
||||||
<value>btnMessagesMenu</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>btnMessagesMenu.Parent" xml:space="preserve">
|
|
||||||
<value>tpMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnMessagesMenu.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>lblMessage.Name" xml:space="preserve">
|
|
||||||
<value>lblMessage</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>lblMessage.Parent" xml:space="preserve">
|
|
||||||
<value>tpMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>lblMessage.ZOrder" xml:space="preserve">
|
|
||||||
<value>2</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>lblChannel.Name" xml:space="preserve">
|
|
||||||
<value>lblChannel</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>lblChannel.Parent" xml:space="preserve">
|
|
||||||
<value>tpMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>lblChannel.ZOrder" xml:space="preserve">
|
|
||||||
<value>3</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>txtChannel.Name" xml:space="preserve">
|
|
||||||
<value>txtChannel</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>txtChannel.Parent" xml:space="preserve">
|
|
||||||
<value>tpMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tpMessages.Name" xml:space="preserve">
|
|
||||||
<value>tpMessages</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tpMessages.Parent" xml:space="preserve">
|
|
||||||
<value>tcMain</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tcMain.Name" xml:space="preserve">
|
|
||||||
<value>tcMain</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>tcMain.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>btnConnect.Name" xml:space="preserve">
|
|
||||||
<value>btnConnect</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>btnConnect.Parent" xml:space="preserve">
|
|
||||||
<value>tpMain</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>pgSettings.Name" xml:space="preserve">
|
|
||||||
<value>pgSettings</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>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=">>pgSettings.Parent" xml:space="preserve">
|
|
||||||
<value>tpMain</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>pgSettings.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name="tcMessages.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
<data name="tcMessages.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>Top, Bottom, Left, Right</value>
|
<value>Top, Bottom, Left, Right</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -716,7 +578,7 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="btnMessagesMenu.Text" xml:space="preserve">
|
<data name="btnMessagesMenu.Text" xml:space="preserve">
|
||||||
<value>...</value>
|
<value>...</value>
|
||||||
<comment>@Invariant</comment></data>
|
</data>
|
||||||
<data name=">>btnMessagesMenu.Name" xml:space="preserve">
|
<data name=">>btnMessagesMenu.Name" xml:space="preserve">
|
||||||
<value>btnMessagesMenu</value>
|
<value>btnMessagesMenu</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -813,6 +675,57 @@
|
||||||
<data name=">>txtChannel.ZOrder" xml:space="preserve">
|
<data name=">>txtChannel.ZOrder" xml:space="preserve">
|
||||||
<value>4</value>
|
<value>4</value>
|
||||||
</data>
|
</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=">>tpMessages.Name" xml:space="preserve">
|
||||||
|
<value>tpMessages</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>tpMessages.Parent" xml:space="preserve">
|
||||||
|
<value>tcMain</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>tcMain.Name" xml:space="preserve">
|
||||||
|
<value>tcMain</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>tcMain.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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">
|
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
|
@ -53,10 +53,5 @@ public TabInfo(string name)
|
||||||
};
|
};
|
||||||
Tab.Controls.Add(TextBox);
|
Tab.Controls.Add(TextBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AppendText(string text)
|
|
||||||
{
|
|
||||||
TextBox.AppendText(text + "\r\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -93,7 +93,7 @@ private void tc_MouseClick(object sender, MouseEventArgs e)
|
||||||
public void AddMessage(string channel, string message)
|
public void AddMessage(string channel, string message)
|
||||||
{
|
{
|
||||||
TabInfo tabInfo = AddChannel(channel);
|
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)
|
public TabInfo AddChannel(string channel)
|
||||||
|
|
Loading…
Reference in a new issue