| 460 | } |
| 461 | |
| 462 | void CMainFrame::HandleDroppedFile(const std::wstring& file) |
| 463 | { |
| 464 | if (!IsPaused()) Pause(); |
| 465 | SetTitle(file); |
| 466 | using boost::algorithm::iequals; |
| 467 | auto ext = std::experimental::filesystem::path(file).extension().wstring(); |
| 468 | if (iequals(ext, L".exe")) |
| 469 | { |
| 470 | m_logSources.AddMessage(stringbuilder() << "Started capturing output of " << Str(file) << "\n"); |
| 471 | Run(file); |
| 472 | } |
| 473 | else if (iequals(ext, L".cmd") || iequals(ext, L".bat")) |
| 474 | { |
| 475 | m_logSources.AddMessage(stringbuilder() << "Started capturing output of " << Str(file) << "\n"); |
| 476 | m_logSources.AddProcessReader(L"cmd.exe", wstringbuilder() << L"/Q /C \"" << file << "\""); |
| 477 | } |
| 478 | else |
| 479 | { |
| 480 | if (IsBinaryFileType(IdentifyFile(file))) |
| 481 | { |
| 482 | m_logSources.AddBinaryFileReader(file); |
| 483 | } |
| 484 | else |
| 485 | { |
| 486 | m_logSources.AddDBLogReader(file); |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | void CMainFrame::OnDropFiles(HDROP hDropInfo) |
| 492 | { |
nothing calls this directly
no test coverage detected