From: Caisking <3449750381@qq.com> Date: Mon, 9 Sep 2024 14:07:37 +0000 (+0800) Subject: 安全模式:优化资源校验提示语 X-Git-Tag: release_V1.2.70_20241020_135402~502^2~6 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=9e7cd6e590ee39bbaa2dd55f9dfe8394c791a0cc;p=mirrors%2FFD230.git 安全模式:优化资源校验提示语 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/ResourceCheckView.cpp b/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/ResourceCheckView.cpp index e359e032b..e3c1947c5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/ResourceCheckView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/ResourceCheckView.cpp @@ -1,9 +1,3 @@ -/*** - * @Date: 2024-09-09 17:47:36 - * @LastEditors: Caisking 3449750381@qq.com - * @LastEditTime: 2024-09-09 18:56:07 - * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/ResourceCheckView.cpp - */ #include "safemodemanager/include/ResourceCheckView.h" #include "safemodemanager/include/SafeModeManagerPresenter.h" #include "safemodemanager/include/SafeModeManagerModel.h" @@ -80,7 +74,7 @@ namespace OHOS notelabel->SetViewId("label4"); notelabel->SetStyle(STYLE_TEXT_FONT, 30); - notelabel->SetText("file verification..."); + notelabel->SetText("File verification..."); notelabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); notelabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); notelabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); @@ -90,11 +84,11 @@ namespace OHOS } void ResourceCheckView::UpdateView(int date) { - std::string display = "file verification"; + std::string display = "File verification"; if (date == -1) { - notelabel->SetText("file verification is error..."); + notelabel->SetText("File verification is error..."); return; } else if (date >= 0 && date <= 60) @@ -109,12 +103,12 @@ namespace OHOS } else if (date == 61) { - notelabel->SetText("file verification is ok..."); + notelabel->SetText("File verification is ok..."); return; } else { - notelabel->SetText("file verification is unkown..."); + notelabel->SetText("File verification is unkown..."); return; } @@ -123,34 +117,32 @@ namespace OHOS } void ResourceCheckView::UpdateView() { - printf("开始显示校验结果\r\n"); - // 进行文件读取 + printf("Start showing verification results.\r\n"); if (SafeModeManagerModel::GetInstance()->ReadCheckFile()) { - // 读取数组 + // Read the array std::vector filenames = SafeModeManagerModel::GetInstance()->GetCheckDifferentialFiles(); - // 清空 notelabel 的文本 + // Clear the text of notelabel std::string allFilenames; - #if 0 - // 更新 notelabel 的文本为文件名列表 +#if 0 for (const auto &filename : filenames) { - allFilenames += filename + "\n"; // 逐行添加文件名 + allFilenames += filename + "\n"; // Add filenames line by line } printf("allFilenames %s\r\n", allFilenames.c_str()); - notelabel->SetText(allFilenames.c_str()); // 一次性设置文本 - #endif + notelabel->SetText(allFilenames.c_str()); // Set the text at once +#endif int num = SafeModeManagerModel::GetInstance()->GetCheckFileCount(); - allFilenames = "本次校验结果校验成功:校验文件:"+ std::to_string(num) ; - notelabel->SetText(allFilenames.c_str()); // 一次性设置文本 - printf("file verification num is %d\r\n", num); + allFilenames = "This verification result is successful. Number of verified files: " + std::to_string(num); + notelabel->SetText(allFilenames.c_str()); // Set the text at once + printf("Number of verified files is %d\r\n", num); } else { - notelabel->SetText("file verification is same"); - printf("校验结果校验失败\r\n"); + notelabel->SetText("File verification is the same."); + printf("Verification result is failure.\r\n"); } - printf("校验结果校验完成\r\n"); + printf("Verification result is completed.\r\n"); } -} \ No newline at end of file +}