diff --git a/RosDBG/Dockable Objects/RawTraffic.Designer.cs b/RosDBG/Dockable Objects/RawTraffic.Designer.cs index ca9609d..892d899 100644 --- a/RosDBG/Dockable Objects/RawTraffic.Designer.cs +++ b/RosDBG/Dockable Objects/RawTraffic.Designer.cs @@ -170,12 +170,14 @@ // // RawTrafficTextBox // + this.RawTrafficTextBox.AcceptsReturn = true; this.RawTrafficTextBox.Dock = System.Windows.Forms.DockStyle.Fill; this.RawTrafficTextBox.Location = new System.Drawing.Point(0, 0); this.RawTrafficTextBox.Name = "RawTrafficTextBox"; this.RawTrafficTextBox.Size = new System.Drawing.Size(385, 20); this.RawTrafficTextBox.TabIndex = 0; this.RawTrafficTextBox.Tag = "0"; + this.RawTrafficTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.RawTrafficTextBox_KeyPress); this.RawTrafficTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.RawTrafficTextBox_KeyUp); // // RawTraffic diff --git a/RosDBG/Dockable Objects/RawTraffic.cs b/RosDBG/Dockable Objects/RawTraffic.cs index 10ebfc9..a5c97f2 100644 --- a/RosDBG/Dockable Objects/RawTraffic.cs +++ b/RosDBG/Dockable Objects/RawTraffic.cs @@ -212,6 +212,13 @@ namespace RosDBG #endregion #region events + private void RawTrafficTextBox_KeyPress(object sender, KeyPressEventArgs e) + { + // Stop the enter key from 'pinging' + if (RawTrafficTextBox.Text.Length > 0 && e.KeyChar == 13) + e.Handled = true; + } + private void RawTrafficTextBox_KeyUp(object sender, KeyEventArgs e) { switch (e.KeyCode) @@ -361,6 +368,5 @@ namespace RosDBG { RawTrafficText.Clear(); } - } }