Stop console process using Ctrl+C.
http://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows https://msdn.microsoft.com/en-us/library/ms686016(VS.85).aspx private void Button1_OnClick(object sender, RoutedEventArgs e) { var file = new FileInfo(@"C:\temp\video.mp4"); if (file.Exists) { file.Delete(); } ct = new CancellationTokenSource(); Task.Factory.StartNew(() => { var pInfo = new ProcessStartInfo("cmd.exe", string.Format("/c {0} \"{1}\"", new object[] {"adb.bat", file.Name})); pInfo.CreateNoWindow = true; pInfo.UseShellExecute = false; pInfo.RedirectStandardError = true; pInfo.RedirectStandardOutput = true; pInfo.RedirectStandardInput = true; var p = Process.Start(pInfo); ...
사용법이 굉장히 심플해 보이군요... 제가 좋아하는 스타일 입니다. 역시 라이브러리는 사용하기 편해야 ㅎㅎ
답글삭제속도도 빠른지 궁금하네요~