OSDN Git Service

RAD-162: debug console window
authorLatif Khalifa <latifer@streamgrid.net>
Thu, 20 May 2010 09:46:32 +0000 (09:46 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Thu, 20 May 2010 09:46:32 +0000 (09:46 +0000)
Activated via Alt-Ctrl-D keyboard shortcut or via Help -> Debug Console...

git-svn-id: https://radegast.googlecode.com/svn/trunk@642 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Consoles/DebugConsole.Designer.cs [new file with mode: 0644]
Radegast/GUI/Consoles/DebugConsole.cs [new file with mode: 0644]
Radegast/GUI/Consoles/DebugConsole.resx [new file with mode: 0644]
Radegast/GUI/Dialogs/MainForm.Designer.cs
Radegast/GUI/Dialogs/MainForm.cs
Radegast/Radegast.csproj

diff --git a/Radegast/GUI/Consoles/DebugConsole.Designer.cs b/Radegast/GUI/Consoles/DebugConsole.Designer.cs
new file mode 100644 (file)
index 0000000..281082f
--- /dev/null
@@ -0,0 +1,95 @@
+// 
+// Radegast Metaverse Client
+// Copyright (c) 2009, Radegast Development Team
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// 
+//     * Redistributions of source code must retain the above copyright notice,
+//       this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of the application "Radegast", nor the names of its
+//       contributors may be used to endorse or promote products derived from
+//       this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// $Id$
+//
+
+namespace Radegast
+{
+    partial class DebugConsole
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.rtbLog = new System.Windows.Forms.RichTextBox();
+            this.SuspendLayout();
+            // 
+            // rtbLog
+            // 
+            this.rtbLog.AccessibleName = "Debug Log";
+            this.rtbLog.BackColor = System.Drawing.SystemColors.Window;
+            this.rtbLog.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.rtbLog.HideSelection = false;
+            this.rtbLog.Location = new System.Drawing.Point(0, 0);
+            this.rtbLog.Name = "rtbLog";
+            this.rtbLog.ReadOnly = true;
+            this.rtbLog.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
+            this.rtbLog.Size = new System.Drawing.Size(551, 364);
+            this.rtbLog.TabIndex = 0;
+            this.rtbLog.Text = "";
+            this.rtbLog.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtbLog_LinkClicked);
+            // 
+            // DebugConsole
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.rtbLog);
+            this.Name = "DebugConsole";
+            this.Size = new System.Drawing.Size(551, 364);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        public System.Windows.Forms.RichTextBox rtbLog;
+    }
+}
diff --git a/Radegast/GUI/Consoles/DebugConsole.cs b/Radegast/GUI/Consoles/DebugConsole.cs
new file mode 100644 (file)
index 0000000..b031b41
--- /dev/null
@@ -0,0 +1,98 @@
+// 
+// Radegast Metaverse Client
+// Copyright (c) 2009, Radegast Development Team
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// 
+//     * Redistributions of source code must retain the above copyright notice,
+//       this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of the application "Radegast", nor the names of its
+//       contributors may be used to endorse or promote products derived from
+//       this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// $Id$
+//
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using log4net.Core;
+
+namespace Radegast
+{
+    public partial class DebugConsole : RadegastTabControl
+    {
+        public DebugConsole()
+            : this(null)
+        {
+        }
+
+        public DebugConsole(RadegastInstance instance)
+            :base(instance)
+        {
+            InitializeComponent();
+            Disposed += new EventHandler(DebugConsole_Disposed);
+            RadegastAppender.Log += new EventHandler<LogEventArgs>(RadegastAppender_Log);
+        }
+
+        void DebugConsole_Disposed(object sender, EventArgs e)
+        {
+            RadegastAppender.Log -= new EventHandler<LogEventArgs>(RadegastAppender_Log);
+        }
+
+        void RadegastAppender_Log(object sender, LogEventArgs e)
+        {
+            if (InvokeRequired)
+            {
+                if (IsHandleCreated)
+                    BeginInvoke(new MethodInvoker(() => RadegastAppender_Log(sender, e)));
+                return;
+            }
+
+            rtbLog.SelectionColor = Color.FromKnownColor(KnownColor.WindowText);
+            rtbLog.AppendText(string.Format("{0} [", e.LogEntry.TimeStamp.ToString("HH:mm:ss")));
+
+            if (e.LogEntry.Level == Level.Error)
+            {
+                rtbLog.SelectionColor = Color.Red;
+            }
+            else if (e.LogEntry.Level == Level.Warn)
+            {
+                rtbLog.SelectionColor = Color.Yellow;
+            }
+            else if (e.LogEntry.Level == Level.Info)
+            {
+                rtbLog.SelectionColor = Color.Green;
+            }
+            else
+            {
+                rtbLog.SelectionColor = Color.Gray;
+            }
+
+            rtbLog.AppendText(e.LogEntry.Level.Name);
+            rtbLog.SelectionColor = Color.FromKnownColor(KnownColor.WindowText);
+            rtbLog.AppendText(string.Format("]: - {0}{1}", e.LogEntry.MessageObject.ToString(), Environment.NewLine));
+        }
+
+        private void rtbLog_LinkClicked(object sender, LinkClickedEventArgs e)
+        {
+            instance.MainForm.ProcessLink(e.LinkText);
+        }
+
+    }
+}
diff --git a/Radegast/GUI/Consoles/DebugConsole.resx b/Radegast/GUI/Consoles/DebugConsole.resx
new file mode 100644 (file)
index 0000000..ff31a6d
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
index 513e4ad..567f85b 100644 (file)
@@ -116,13 +116,14 @@ namespace Radegast
             this.lblTime = new System.Windows.Forms.ToolStripLabel();
             this.tbtnMedia = new System.Windows.Forms.ToolStripButton();
             this.tbtnVoice = new System.Windows.Forms.ToolStripButton();
-            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             this.tbtnHelp = new System.Windows.Forms.ToolStripDropDownButton();
             this.keyboardShortcutsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.reportBugsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.checkForUpdatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.debugConsoleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
             this.aboutRadegastToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             this.statusStrip1 = new System.Windows.Forms.StatusStrip();
             this.tlblLoginName = new System.Windows.Forms.ToolStripStatusLabel();
             this.tlblMoneyBalance = new System.Windows.Forms.ToolStripStatusLabel();
@@ -168,8 +169,8 @@ namespace Radegast
             this.lblTime,
             this.tbtnMedia,
             this.tbtnVoice,
-            this.toolStripSeparator2,
-            this.tbtnHelp});
+            this.tbtnHelp,
+            this.toolStripSeparator2});
             this.toolStrip1.Location = new System.Drawing.Point(0, 0);
             this.toolStrip1.Name = "toolStrip1";
             this.toolStrip1.Size = new System.Drawing.Size(738, 25);
@@ -563,11 +564,6 @@ namespace Radegast
             this.tbtnVoice.Text = "Voice";
             this.tbtnVoice.Click += new System.EventHandler(this.tbtnVoice_Click);
             // 
-            // toolStripSeparator2
-            // 
-            this.toolStripSeparator2.Name = "toolStripSeparator2";
-            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
-            // 
             // tbtnHelp
             // 
             this.tbtnHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
@@ -575,6 +571,7 @@ namespace Radegast
             this.keyboardShortcutsToolStripMenuItem,
             this.reportBugsToolStripMenuItem,
             this.checkForUpdatesToolStripMenuItem,
+            this.debugConsoleToolStripMenuItem,
             this.toolStripMenuItem6,
             this.aboutRadegastToolStripMenuItem});
             this.tbtnHelp.Image = ((System.Drawing.Image)(resources.GetObject("tbtnHelp.Image")));
@@ -586,36 +583,49 @@ namespace Radegast
             // keyboardShortcutsToolStripMenuItem
             // 
             this.keyboardShortcutsToolStripMenuItem.Name = "keyboardShortcutsToolStripMenuItem";
-            this.keyboardShortcutsToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
+            this.keyboardShortcutsToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
             this.keyboardShortcutsToolStripMenuItem.Text = "Keyboard Shortcuts";
             this.keyboardShortcutsToolStripMenuItem.Click += new System.EventHandler(this.keyboardShortcutsToolStripMenuItem_Click);
             // 
             // reportBugsToolStripMenuItem
             // 
             this.reportBugsToolStripMenuItem.Name = "reportBugsToolStripMenuItem";
-            this.reportBugsToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
+            this.reportBugsToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
             this.reportBugsToolStripMenuItem.Text = "Bugs/Feature Requests...";
             this.reportBugsToolStripMenuItem.Click += new System.EventHandler(this.reportBugsToolStripMenuItem_Click);
             // 
             // checkForUpdatesToolStripMenuItem
             // 
             this.checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
-            this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
+            this.checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
             this.checkForUpdatesToolStripMenuItem.Text = "Check for Updates...";
             this.checkForUpdatesToolStripMenuItem.Click += new System.EventHandler(this.checkForUpdatesToolStripMenuItem_Click);
             // 
+            // debugConsoleToolStripMenuItem
+            // 
+            this.debugConsoleToolStripMenuItem.Name = "debugConsoleToolStripMenuItem";
+            this.debugConsoleToolStripMenuItem.ShortcutKeyDisplayString = "Alt-Ctrl-D";
+            this.debugConsoleToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
+            this.debugConsoleToolStripMenuItem.Text = "Debug Console...";
+            this.debugConsoleToolStripMenuItem.Click += new System.EventHandler(this.debugConsoleToolStripMenuItem_Click);
+            // 
             // toolStripMenuItem6
             // 
             this.toolStripMenuItem6.Name = "toolStripMenuItem6";
-            this.toolStripMenuItem6.Size = new System.Drawing.Size(200, 6);
+            this.toolStripMenuItem6.Size = new System.Drawing.Size(220, 6);
             // 
             // aboutRadegastToolStripMenuItem
             // 
             this.aboutRadegastToolStripMenuItem.Name = "aboutRadegastToolStripMenuItem";
-            this.aboutRadegastToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
+            this.aboutRadegastToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
             this.aboutRadegastToolStripMenuItem.Text = "About Radegast...";
             this.aboutRadegastToolStripMenuItem.Click += new System.EventHandler(this.aboutRadegastToolStripMenuItem_Click);
             // 
+            // toolStripSeparator2
+            // 
+            this.toolStripSeparator2.Name = "toolStripSeparator2";
+            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
+            // 
             // statusStrip1
             // 
             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -825,7 +835,6 @@ namespace Radegast
             this.Name = "frmMain";
             this.Text = "Radegast";
             this.Load += new System.EventHandler(this.frmMain_Load);
-            this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.frmMain_KeyUp);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
             this.Resize += new System.EventHandler(this.frmMain_Resize);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmMain_KeyDown);
@@ -915,6 +924,7 @@ namespace Radegast
         public System.Windows.Forms.ToolStripMenuItem disconnectToolStripMenuItem;
         public System.Windows.Forms.ToolStripMenuItem reconnectToolStripMenuItem;
         public System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem;
+        public System.Windows.Forms.ToolStripMenuItem debugConsoleToolStripMenuItem;
     }
 }
 
index 325e221..3b8c9cd 100644 (file)
@@ -532,6 +532,13 @@ namespace Radegast
                 return;
             }
 
+            // Alt-Ctrl-D Open debug console
+            if (e.Modifiers == (Keys.Control | Keys.Alt) && e.KeyCode == Keys.D)
+            {
+                e.Handled = e.SuppressKeyPress = true;
+                debugConsoleToolStripMenuItem.PerformClick();
+            }
+
             // Alt 1-8: Toggle various tabs
             if (e.Modifiers == Keys.Alt)
             {
@@ -610,10 +617,6 @@ namespace Radegast
             }
         }
 
-        private void frmMain_KeyUp(object sender, KeyEventArgs e)
-        {
-        }
-
         bool firstLoad = true;
 
         private void frmMain_Load(object sender, EventArgs e)
@@ -1227,6 +1230,21 @@ namespace Radegast
             }
         }
 
+        private void debugConsoleToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            if (tabsConsole.TabExists("debug"))
+            {
+                ToggleHidden("debug");
+            }
+            else
+            {
+                RadegastTab tab = tabsConsole.AddTab("debug", "Debug", new DebugConsole(instance));
+                tab.AllowClose = false;
+                tab.AllowHide = true;
+                tab.Select();
+            }
+        }
+
         private void tbnObjects_Click(object sender, EventArgs e)
         {
             if (tabsConsole.TabExists("objects"))
@@ -1359,6 +1377,7 @@ namespace Radegast
         {
             tmnuExit_Click(this, EventArgs.Empty);
         }
+
         #endregion
     }
 }
\ No newline at end of file
index 8fd632b..4a935e8 100644 (file)
     <Compile Include="GUI\Consoles\ConferenceIMTabWindow.Designer.cs">\r
       <DependentUpon>ConferenceIMTabWindow.cs</DependentUpon>\r
     </Compile>\r
+    <Compile Include="GUI\Consoles\DebugConsole.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="GUI\Consoles\DebugConsole.Designer.cs">\r
+      <DependentUpon>DebugConsole.cs</DependentUpon>\r
+    </Compile>\r
     <Compile Include="GUI\Consoles\GroupDetails.cs">\r
       <SubType>UserControl</SubType>\r
     </Compile>\r
       <DependentUpon>ConferenceIMTabWindow.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="GUI\Consoles\DebugConsole.resx">\r
+      <DependentUpon>DebugConsole.cs</DependentUpon>\r
+    </EmbeddedResource>\r
     <EmbeddedResource Include="GUI\Consoles\GroupDetails.resx">\r
       <DependentUpon>GroupDetails.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r