示例#1
0
 public void ARMSimForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.O && e.Control)
     {
         if (this.LoadFileButton.Enabled)
         {
             this.LoadFileButton_Click(this.LoadFileButton, EventArgs.Empty);
         }
     }
     if (e.KeyCode == Keys.F5)
     {
         if (this.RunButton.Enabled)
         {
             this.RunButton_Click(this.RunButton, EventArgs.Empty);
         }
     }
     if (e.KeyCode == Keys.F10)
     {
         if (this.StepButton.Enabled)
         {
             this.StepButton_Click(this.StepButton, EventArgs.Empty);
         }
     }
     if (e.KeyCode == Keys.B && e.Control)
     {
         if (this.StopButton.Enabled)
         {
             this.StopButton_Click(this.StopButton, EventArgs.Empty);
         }
     }
     if (e.KeyCode == Keys.T && e.Control)
     {
         if (!this.checkBox1.Checked)
         {
             this.checkBox1.Checked = true;
             myComputer.setTrace(true);
         }
         else
         {
             this.checkBox1.Checked = false;
             myComputer.setTrace(false);
         }
     }
     if (e.KeyCode == Keys.R && e.Control)
     {
         if (this.ResetButton.Enabled)
         {
             this.ResetButton_Click(this.ResetButton, EventArgs.Empty);
         }
     }
 }