Ejemplo n.º 1
0
 public InternalCommand(TextBoxShell shellTextBoxCmder, ShellCmder cmdshell)
 {
     this.shellTextBoxCmder = shellTextBoxCmder;
     this.cmdshell = cmdshell;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 回车执行事件
 /// </summary>
 private void shellTextBox_Cmder_CommandEntered(object sender, TextBoxShell.CommandEnteredEventArgs e)
 {
     string command = e.Command;
     Thread thread = new Thread(() => this.ExecuteCmd(command));
     thread.SetApartmentState(ApartmentState.STA);
     thread.IsBackground = true;
     thread.Start();
 }