| 15 | } |
| 16 | |
| 17 | void CEnvironmentDlg::DoSort(const SortInfo* si) { |
| 18 | if (!si) |
| 19 | return; |
| 20 | |
| 21 | std::sort(m_Vars.begin(), m_Vars.end(), [&](auto const& v1, auto const& v2) { |
| 22 | switch (si->SortColumn) |
| 23 | { |
| 24 | case 0: return SortHelper::SortStrings(v1.first, v2.first,si->SortAscending); |
| 25 | case 1: return SortHelper::SortStrings(v1.second, v2.second, si->SortAscending); |
| 26 | } |
| 27 | return false; |
| 28 | }); |
| 29 | } |
| 30 | |
| 31 | LRESULT CEnvironmentDlg::OnInitDialog(UINT, WPARAM, LPARAM, BOOL&) { |
| 32 | InitDynamicLayout(); |