| 85 | |
| 86 | |
| 87 | BOOL CFsInfoDialog::OnInitDialog() |
| 88 | { |
| 89 | CDialog::OnInitDialog(); |
| 90 | |
| 91 | CString strMsgYes, strMsgNo, strMsgNA, strMsgReverse, strMsgForward, strMsgKB, strMsgSec, strMsgInfinite, strMsgNone; |
| 92 | strMsgYes = LocUtils::GetStringFromResources(IDS_FSINFO_YES).c_str(); |
| 93 | strMsgNo = LocUtils::GetStringFromResources(IDS_FSINFO_NO).c_str(); |
| 94 | strMsgNA = LocUtils::GetStringFromResources(IDS_FSINFO_NA).c_str(); |
| 95 | strMsgReverse = LocUtils::GetStringFromResources(IDS_FSINFO_REVERSE).c_str(); |
| 96 | strMsgForward = LocUtils::GetStringFromResources(IDS_FSINFO_FORWARD).c_str(); |
| 97 | strMsgInfinite = LocUtils::GetStringFromResources(IDS_FSINFO_INFINITE).c_str(); |
| 98 | strMsgNone = LocUtils::GetStringFromResources(IDS_FSINFO_NAME_ENCRYPTION_NO).c_str(); |
| 99 | |
| 100 | LPCWSTR yes = strMsgYes; |
| 101 | LPCWSTR no = strMsgNo; |
| 102 | LPCWSTR na = strMsgNA; |
| 103 | LPCWSTR path = m_info.path.c_str(); |
| 104 | if (!wcsncmp(path, L"\\\\?\\", wcslen(L"\\\\?\\"))) { |
| 105 | path += wcslen(L"\\\\?\\"); |
| 106 | } |
| 107 | SetDlgItemText(IDC_PATH, m_info.path.c_str()); |
| 108 | SetDlgItemText(IDC_MOUNT_POINT, m_mountPoint); |
| 109 | SetDlgItemText(IDC_CONFIG_PATH, m_info.configPath.c_str()); |
| 110 | |
| 111 | //To display localized text in the GUI |
| 112 | LPCWSTR none = strMsgNone; |
| 113 | if (m_info.fileNameEncryption == L"none") { |
| 114 | SetDlgItemText(IDC_FILE_NAME_ENCRYPTION, none); |
| 115 | } |
| 116 | else { |
| 117 | SetDlgItemText(IDC_FILE_NAME_ENCRYPTION, m_info.fileNameEncryption.c_str()); |
| 118 | } |
| 119 | |
| 120 | SetDlgItemText(IDC_DATA_ENCRYPTION, m_info.dataEncryption.c_str()); |
| 121 | SetDlgItemText(IDC_READ_ONLY, m_info.readOnly ? yes : no); |
| 122 | SetDlgItemText(IDC_MODE, m_info.reverse ? strMsgReverse : strMsgForward); |
| 123 | SetDlgItemText(IDC_MOUNT_MANAGER, m_info.mountManager ? yes : no); |
| 124 | SetDlgItemText(IDC_CASE_INSENSITIVE, m_info.caseInsensitive ? yes : no); |
| 125 | SetDlgItemText(IDC_LONG_FILE_NAMES, m_info.longFileNames ? yes : no); |
| 126 | SetDlgItemText(IDC_ENCRYPT_KEYS_IN_MEM, m_info.encryptKeysInMemory ? yes : no); |
| 127 | SetDlgItemText(IDC_CACHE_KEYS_IN_MEM, m_info.encryptKeysInMemory ? (m_info.cacheKeysInMemory ? yes : no) : na); |
| 128 | SetDlgItemText(IDC_DENY_OTHER_SESSIONS_TXT, m_info.denyOtherSessions ? yes : no); |
| 129 | SetDlgItemText(IDC_DENY_SERVICES_TXT, m_info.denyServices ? yes : no); |
| 130 | SetDlgItemText(IDC_FLUSH_AFTER_WRITE_TXT, m_info.flushAfterWrite ? yes : no); |
| 131 | SetDlgItemText(IDC_DELETE_SPURRIOUS_FILES, m_info.deleteSpurriousFiles ? yes : no); |
| 132 | |
| 133 | wstring txt; |
| 134 | txt = to_wstring(m_info.ioBufferSize); |
| 135 | strMsgKB.Format(LocUtils::GetStringFromResources(IDS_FSINFO_KB).c_str(), txt); |
| 136 | SetDlgItemText(IDC_IO_BUF_SIZE, strMsgKB); |
| 137 | txt = m_info.multhreaded ? yes : no; |
| 138 | SetDlgItemText(IDC_THREADS, txt.c_str()); |
| 139 | if (m_info.cacheTTL > 0) { |
| 140 | txt = to_wstring(m_info.cacheTTL); |
| 141 | strMsgSec.Format(LocUtils::GetStringFromResources(IDS_FSINFO_SEC).c_str(), txt); |
| 142 | SetDlgItemText(IDC_CACHE_TTL, strMsgSec); |
| 143 | } else { |
| 144 | SetDlgItemText(IDC_CACHE_TTL, strMsgInfinite); |
nothing calls this directly
no outgoing calls
no test coverage detected