| 796 | } |
| 797 | |
| 798 | void CMainFrame::SaveLogFile(const std::wstring& filename) |
| 799 | { |
| 800 | UISetText(0, WStr(wstringbuilder() << "Saving " << filename)); |
| 801 | Win32::ScopedCursor cursor(::LoadCursor(nullptr, IDC_WAIT)); |
| 802 | |
| 803 | std::ofstream fs; |
| 804 | OpenLogFile(fs, filename); |
| 805 | int count = m_logFile.Count(); |
| 806 | for (int i = 0; i < count; ++i) |
| 807 | { |
| 808 | auto msg = m_logFile[i]; |
| 809 | WriteLogFileMessage(fs, msg.time, msg.systemTime, msg.processId, msg.processName, msg.text); |
| 810 | } |
| 811 | fs.close(); |
| 812 | if (!fs) |
| 813 | Win32::ThrowLastError(filename); |
| 814 | |
| 815 | m_logFileName = filename; |
| 816 | UpdateStatusBar(); |
| 817 | } |
| 818 | |
| 819 | void CMainFrame::SaveViewFile(const std::wstring& filename) |
| 820 | { |
nothing calls this directly
no test coverage detected