From 580a4715eeb88e13128e65963834b159768444cf Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 08 一月 2020 10:19:39 +0800
Subject: [PATCH] 2019.1.8
---
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs | 50 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
index 86deaa9..58c9eba 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
@@ -93,6 +93,15 @@
//杩涘害鏉�
this.ShowProgressBar();
+ //鑾峰彇鑷姩澶囦唤鐨勬暟鎹�
+ var pageAuto = await HdlBackupLogic.Current.GetBackupListNameFromDB(3, HdlGatewayLogic.Current.GetGatewayId(realGateway));
+ if (pageAuto == null)
+ {
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar(ShowReLoadMode.YES);
+ return;
+ }
+
//浠庝簯绔幏鍙栨暟鎹�
var pageData = await HdlBackupLogic.Current.GetBackupListNameFromDB(2, HdlGatewayLogic.Current.GetGatewayId(realGateway));
if (pageData == null)
@@ -108,14 +117,24 @@
{
listView.RemoveAll();
listView.RecoverHeight();
+
+ //鑷姩澶囦唤鐨処D
+ string autoID = string.Empty;
+ if (pageAuto.Count > 0)
+ {
+ autoID = pageAuto[0].Id;
+ //娣诲姞鑷姩澶囦唤琛�
+ this.AddRowlayout(pageAuto[0], pageData.Count > 0, true);
+ }
+
for (int i = 0; i < pageData.Count; i++)
{
//娣诲姞澶囦唤琛�
- this.AddRowlayout(pageData[i], i != pageData.Count - 1);
+ this.AddRowlayout(pageData[i], i != pageData.Count - 1, false);
}
this.btnDownload?.RemoveFromParent();
- if (pageData.Count > 0)
+ if (pageData.Count > 0 || pageAuto.Count > 0)
{
//涓嬭浇
this.btnDownload = new BottomClickButton();
@@ -134,7 +153,7 @@
HdlThreadLogic.Current.RunThread(() =>
{
//璇诲彇澶囦唤鏂囨。
- bool result = HdlGatewayBackupLogic.Current.RecoverGateway(this.realGateway, this.nowSelectBackId);
+ bool result = HdlGatewayBackupLogic.Current.RecoverGateway(this.realGateway, this.nowSelectBackId, autoID == this.nowSelectBackId ? 1 : 0);
if (result == true)
{
HdlThreadLogic.Current.RunMain(() =>
@@ -149,7 +168,6 @@
//璋冩暣鐪熷疄楂樺害
listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23));
}
-
});
}
@@ -162,7 +180,8 @@
/// </summary>
/// <param name="fileInfo"></param>
/// <param name="addLine"></param>
- private void AddRowlayout(BackupListNameInfo fileInfo, bool addLine)
+ /// <param name="isAuto"></param>
+ private void AddRowlayout(BackupListNameInfo fileInfo, bool addLine, bool isAuto)
{
var rowLayout = new RowLayoutControl(listView.rowSpace / 2);
listView.AddChidren(rowLayout);
@@ -172,6 +191,11 @@
txtText.TextSize = 15;
txtText.Y = Application.GetRealHeight(12) + rowLayout.chidrenYaxis;
rowLayout.frameTable.AddChidren(txtText, ChidrenBindMode.BindEventOnly);
+ if (isAuto == true)
+ {
+ txtText.TextID = R.MyInternationalizationString.uAutoBackup;
+ }
+
//鏃堕棿 2019-11-11T11:31:01
var btnTime = rowLayout.frameTable.AddLeftCaption("", 600, 50, true);
btnTime.Y = Application.GetRealHeight(72) + rowLayout.chidrenYaxis;
@@ -211,13 +235,17 @@
}
};
- //缂栬緫
- var btnEditor = rowLayout.AddEditorControl();
- btnEditor.ButtonClickEvent += (sender, e) =>
+ //鑷姩澶囦唤涓嶅厑璁哥紪杈�
+ if (isAuto == false)
{
- //鏄剧ず缂栬緫澶囪�冨悕鐢婚潰
- this.ShowEditorBackupForm(fileInfo);
- };
+ //缂栬緫
+ var btnEditor = rowLayout.AddEditorControl();
+ btnEditor.ButtonClickEvent += (sender, e) =>
+ {
+ //鏄剧ず缂栬緫澶囪�冨悕鐢婚潰
+ this.ShowEditorBackupForm(fileInfo);
+ };
+ }
//鍒犻櫎
var btnDelete = rowLayout.AddDeleteControl();
--
Gitblit v1.8.0