예제 #1
0
        /// <summary>
        /// Runs the program on button click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">Contains information for current event</param>
        private void button1_Click(object sender, EventArgs e)
        {
            String       command    = cmdLine.Text.Trim().ToLower();
            String       mulCommand = ProgramWindow.Text.Trim().ToLower();
            parseCommand cmd        = new parseCommand();

            cmd.Command(command, mulCommand, MyCanvass);
            Refresh();
        }
예제 #2
0
 /// <summary>
 /// Function which runs on user key press in cmdLine within the form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">The key which is pressed by user in current context</param>
 private void cmdLine_KeyDown(object sender, KeyEventArgs e)
 {
     //Only runs when the Enter key is pressed
     if (e.KeyCode == Keys.Enter)
     {
         String       command    = cmdLine.Text.Trim().ToLower();
         String       mulCommand = ProgramWindow.Text.Trim().ToLower();
         parseCommand cmd        = new parseCommand();
         cmd.Command(command, mulCommand, MyCanvass);
         Refresh();
     }
 }