/// <summary> /// To runs the application when button is clicked /// </summary> /// <param name="sender"></param> /// <param name="e">Event Arguements</param> private void RUN_Click(object sender, EventArgs e) { String command = CommandLine.Text.Trim().ToLower(); String multicmd = InputWindow.Text.Trim().ToLower(); cmdReader cmd = new cmdReader(); cmd.Cmd(command, multicmd, NewCanvass); Refresh(); }
/// <summary> /// When enter key is pressed, it will excute some action /// </summary> /// <param name="sender"></param> /// <param name="e">Key Event Arguments</param> private void CommandLine_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { String command = CommandLine.Text.Trim().ToLower(); String multicmd = InputWindow.Text.Trim().ToLower(); cmdReader cmd = new cmdReader(); cmd.Cmd(command, multicmd, NewCanvass); } }