private void button1_Click(object sender, EventArgs e) { String command = textBox1.Text.Trim().ToLower(); string multicommand = richTextBox1.Text.Trim().ToLower(); commandParser commandparser = new commandParser(); commandparser.Commands(command, multicommand, NewDrawing); Refresh(); }
private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { String command = textBox1.Text.Trim().ToLower(); string multicommand = richTextBox1.Text.Trim().ToLower(); commandParser commandparser = new commandParser(); commandparser.Commands(command, multicommand, NewDrawing); Refresh(); } }