| 174 | } |
| 175 | |
| 176 | CString CDeviceManagerView::GetDeviceProperty(DeviceInfo& di, int index) const { |
| 177 | CString result; |
| 178 | auto& prop = m_Items[index]; |
| 179 | switch (prop.Type) { |
| 180 | case ItemType::String: |
| 181 | result = m_DevMgr->GetDeviceRegistryPropertyString(di, prop.PropertyType).c_str(); |
| 182 | break; |
| 183 | |
| 184 | case ItemType::MultiString: |
| 185 | for (auto& str : m_DevMgr->GetDeviceRegistryPropertyMultiString(di, prop.PropertyType)) |
| 186 | result += str.c_str() + CString(L", "); |
| 187 | if (!result.IsEmpty()) |
| 188 | result = result.Left(result.GetLength() - 2); |
| 189 | break; |
| 190 | |
| 191 | case ItemType::Dword: |
| 192 | result.Format(L"%08X", m_DevMgr->GetDeviceRegistryProperty<DWORD>(di, prop.PropertyType)); |
| 193 | break; |
| 194 | |
| 195 | case ItemType::Boolean: |
| 196 | result = m_DevMgr->GetDeviceRegistryProperty<DWORD>(di, prop.PropertyType) ? L"Yes" : L"No"; |
| 197 | break; |
| 198 | |
| 199 | } |
| 200 | |
| 201 | return result; |
| 202 | } |
| 203 | |
| 204 | bool CDeviceManagerView::CompareItems(const CString& i1, const CString& i2, bool asc) { |
| 205 | return SortHelper::SortStrings(i1, i2, asc); |
nothing calls this directly
no test coverage detected