signalLabel_->SetPosition(133, 130);
signalLabel_->Resize(200, 60);
signalLabel_->SetViewId("signalLabel");
- signalLabel_->SetText("Signal: 26");
+ signalLabel_->SetText("Signal: --");
signalLabel_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
signalLabel_->SetAlign(TEXT_ALIGNMENT_CENTER);
signalLabel_->SetFont(GILROY_BOLD_FONT,
operationLabel_->SetPosition(83, 80);
operationLabel_->Resize(300, 60);
operationLabel_->SetViewId("operationLabel");
- operationLabel_->SetText("Operation: CHN_CT");
+ operationLabel_->SetText("Operation: --");
operationLabel_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
operationLabel_->SetAlign(TEXT_ALIGNMENT_CENTER);
operationLabel_->SetFont(GILROY_BOLD_FONT,
versionLabel_->SetPosition(133, 180);
versionLabel_->Resize(200, 60);
versionLabel_->SetViewId("versionLabel");
- versionLabel_->SetText("Version: 1.1.47");
+ versionLabel_->SetText("Version: --");
versionLabel_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
versionLabel_->SetAlign(TEXT_ALIGNMENT_CENTER);
versionLabel_->SetFont(GILROY_BOLD_FONT,
downLabel_->SetPosition(26, 366);
downLabel_->Resize(200, 60);
downLabel_->SetViewId("downLabel");
- downLabel_->SetText("down: 10");
+ downLabel_->SetText("down: --");
downLabel_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
downLabel_->SetAlign(TEXT_ALIGNMENT_CENTER);
downLabel_->SetFont(GILROY_BOLD_FONT,
totalLabel_->SetPosition(230, 366);
totalLabel_->Resize(200, 60);
totalLabel_->SetViewId("totalLabel");
- totalLabel_->SetText("total: 100");
+ totalLabel_->SetText("total: --");
totalLabel_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
totalLabel_->SetAlign(TEXT_ALIGNMENT_CENTER);
totalLabel_->SetFont(GILROY_BOLD_FONT,
totalLabel_->SetVisible(true);
}
+ // 初始化基本数据
+ InitBasicdata();
+
return scrollView_;
}
if (versionLabel_ != nullptr) {
}
if (downLabel_ != nullptr) {
+ int totalcount = SafeModeManagerModel::GetInstance()->GetFilenamesCount();
+ std::string total = "total: " + std::to_string(totalcount);
+ totalLabel_->SetText(total.c_str());
}
}
//更新信号值与下载进度
-void RepairView::UpdateRepairView(int date) {
+void RepairView::UpdateView(int date) {
if (downingLabel_ == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
"ResourceCheckView::downingLabel_ is null");
#include <string>
#include <vector>
+#include "safemodemanager/include/RepairView.h"
#include "safemodemanager/include/ResourceCheckView.h"
#include "safemodemanager/include/SafeModeManagerModel.h"
#include "safemodemanager/include/SafeModeManagerView.h"
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Repair");
return true;
}
-
+// 更新文件下载
+void SafeModeManagerModel::UpdateRepairView(int date) {
+ auto safeModeView = SafeModeManagerView::GetInstance();
+ if (safeModeView != nullptr) {
+ auto RepairView = ResourceCheckView::GetInstance();
+ if (safeModeView->GetSafeScrollView(VIEW_RESOURCE_CHECK) != nullptr) {
+ RepairView->UpdateView(date);
+ }
+ }
+}
} // namespace OHOS
\ No newline at end of file