示例#1
0
 public InternalCommand(TextBoxShell shellTextBoxCmder, ShellCmder cmdshell)
 {
     this.shellTextBoxCmder = shellTextBoxCmder;
     this.cmdshell = cmdshell;
 }
示例#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();
 }