Author: gschneider
Date: Wed Aug 26 20:22:34 2009
New Revision: 42945

URL: http://svn.reactos.org/svn/reactos?rev=42945&view=rev
Log:
- Remove built in commands from the input control like other commands after 
execution
- Append control character to commands in KDBG, not in the input control
- Re-add previously removed code to allow typing commands while the log is 
highlighted; modify to allow input all the time

Modified:
    trunk/tools/reactosdbg/DebugProtocol/KDBG.cs
    trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs
    trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs
    trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs

Modified: trunk/tools/reactosdbg/DebugProtocol/KDBG.cs
URL: 
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/DebugProtocol/KDBG.cs?rev=42945&r1=42944&r2=42945&view=diff
==============================================================================
--- trunk/tools/reactosdbg/DebugProtocol/KDBG.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/DebugProtocol/KDBG.cs [iso-8859-1] Wed Aug 26 
20:22:34 2009
@@ -427,7 +427,7 @@
             /* Forward user input from RawTraffic if connected to kdbg */
             if (!mRunning)
             {
-                mConnection.Write(wr);
+                mConnection.Write(wr + "\r");
             }
         }
 

Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs
URL: 
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%20Objects/RawTraffic.Designer.cs?rev=42945&r1=42944&r2=42945&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs 
[iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.Designer.cs 
[iso-8859-1] Wed Aug 26 20:22:34 2009
@@ -62,6 +62,7 @@
             this.RawTrafficText.Size = new System.Drawing.Size(425, 268);
             this.RawTrafficText.TabIndex = 0;
             this.RawTrafficText.WordWrap = false;
+            this.RawTrafficText.KeyPress += new 
System.Windows.Forms.KeyPressEventHandler(this.RawTrafficText_KeyPress);
             this.RawTrafficText.MouseUp += new 
System.Windows.Forms.MouseEventHandler(this.RawTrafficText_MouseUp);
             // 
             // menuStrip1

Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs
URL: 
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%20Objects/RawTraffic.cs?rev=42945&r1=42944&r2=42945&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] 
(original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] 
Wed Aug 26 20:22:34 2009
@@ -52,17 +52,17 @@
 
         private void ParseBuiltinCommand(string command)
         {
+            AddCommandToList(command);
             if (command == ".cls")
             {
-                AddCommandToList(command);
                 RawTrafficText.Text = string.Empty;
             }
+            RawTrafficTextBox.Text = string.Empty;
         }
 
         private void ParseGdbCommand(string command)
         {
             AddCommandToList(command);
-            RawTrafficTextBox.Text += '\r'; //FIXME: remove this
             SendCommandToDebugger();
             RawTrafficTextBox.Text = string.Empty;
         }
@@ -141,7 +141,7 @@
             {
                 String cmd = RawTrafficTextBox.Text;
                 RawTrafficText.AppendText(kdbPrompt);
-                if (cmd == "cont\r")
+                if (cmd == "cont")
                 {
                     mConnection.Running = true;
                 }
@@ -248,6 +248,26 @@
 
         }
 
+        private void RawTrafficText_KeyPress(object sender, KeyPressEventArgs 
e)
+        {
+            switch ((int)e.KeyChar)
+            {
+                case 8: /* Backspace */
+                    if (RawTrafficTextBox.Text.Length > 0)
+                        RawTrafficTextBox.Text = 
RawTrafficTextBox.Text.Substring(0, RawTrafficTextBox.Text.Length - 1);
+                    break;
+                case 13: /* Return */
+                    if (RawTrafficTextBox.Text.Length > 0)
+                    {
+                        ParseCommand(RawTrafficTextBox.Text);
+                    }
+                    break;
+                default:
+                    RawTrafficTextBox.Text += e.KeyChar;
+                    break;
+            }
+        }
+
         private void RawTrafficText_MouseUp(object sender, MouseEventArgs e)
         {
             copyToolStripMenuItem.Enabled = (RawTrafficText.SelectionLength > 
0);

Modified: trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
URL: 
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs?rev=42945&r1=42944&r2=42945&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] 
(original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] Wed 
Aug 26 20:22:34 2009
@@ -39,5 +39,5 @@
 // will be increased as well. MSI installers must not be generated with the 
same Build Number
 // otherwise they won't upgrade the old installation!
 
-[assembly: AssemblyVersion("1.0.2.80")]
-[assembly: AssemblyFileVersion("1.0.2.80")]
+[assembly: AssemblyVersion("1.0.2.81")]
+[assembly: AssemblyFileVersion("1.0.2.81")]


Reply via email to