Permalink
Browse files

Added "clear" button

  • Loading branch information...
1 parent cf7ca43 commit 89ec4d915e6fc86d2e821c8183d754b3c3b6a47e @NiceCircuits committed Apr 24, 2015
View
@@ -1 +1,2 @@
-DualTerminal/obj
+DualTerminal/obj
+/DualTerminal/bin/Debug
View
Binary file not shown.
@@ -42,6 +42,7 @@ private void InitializeComponent()
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.serialPort2 = new System.IO.Ports.SerialPort(this.components);
+ this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
@@ -69,7 +70,8 @@ private void InitializeComponent()
this.refreshToolStripMenuItem,
this.toolStripComboBoxBaud,
this.openToolStripMenuItem,
- this.closeToolStripMenuItem});
+ this.closeToolStripMenuItem,
+ this.clearToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1095, 27);
@@ -158,6 +160,13 @@ private void InitializeComponent()
//
this.serialPort2.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort2_DataReceived);
//
+ // clearToolStripMenuItem
+ //
+ this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
+ this.clearToolStripMenuItem.Size = new System.Drawing.Size(46, 23);
+ this.clearToolStripMenuItem.Text = "Clear";
+ this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
+ //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -194,6 +203,7 @@ private void InitializeComponent()
private System.IO.Ports.SerialPort serialPort2;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
+ private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
}
}
@@ -131,5 +131,10 @@ private void serialPort2_DataReceived(object sender, SerialDataReceivedEventArgs
{
Invoke(new MethodInvoker(delegate() { AppendText(Color.Blue, serialPort2.ReadExisting()); }));
}
+
+ private void clearToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ richTextBox1.Clear();
+ }
}
}
Binary file not shown.

0 comments on commit 89ec4d9

Please sign in to comment.