From 03ff92ba7d9f06583f3a292ecb2077cf01e5a5ca Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 10 一月 2020 12:00:15 +0800
Subject: [PATCH] 2019.1.10
---
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 50 insertions(+), 5 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs
index 3688714..8a72fa4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs
@@ -69,7 +69,11 @@
var btnSwicth = frameAuto.AddMostRightSwitchIcon();
btnSwicth.ButtonClickEvent += (sender, e) =>
{
- btnSwicth.IsSelected = !btnSwicth.IsSelected;
+ //璁剧疆鐘舵��
+ if (HdlGatewayLogic.Current.SetGatewayAutoBackupStatu(this.realGateway, !btnSwicth.IsSelected) == true)
+ {
+ btnSwicth.IsSelected = !btnSwicth.IsSelected;
+ }
};
//涓婁紶鏁版嵁鑷充簯绔�
@@ -88,8 +92,7 @@
return;
}
//鐢熸垚涓�涓脊绐楃敾闈�
- var dialogForm = new DialogInputForm();
- dialogForm.AddForm(DialogFrameMode.OnlyInput);
+ var dialogForm = new DialogInputControl();
//涓婁紶鏁版嵁
dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uUploadData));
//璇疯緭鍏ュ娉ㄥ悕绉�
@@ -98,7 +101,7 @@
dialogForm.ComfirmClickEvent += ((textValue) =>
{
//鐢婚潰鍏抽棴
- dialogForm.CloseForm();
+ dialogForm.CloseDialog();
HdlThreadLogic.Current.RunThread(() =>
{
//涓婁紶澶囦唤
@@ -114,16 +117,58 @@
frameDown.AddRightArrow();
frameDown.ButtonClickEvent += (sender, e) =>
{
+ if (this.realGateway == null)
+ {
+ //閿欒:缃戝叧瀵硅薄涓㈠け
+ string msg = Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg);
+ this.ShowMassage(ShowMsgType.Error, msg);
+ return;
+ }
var form = new GatewayBackUpListForm();
form.AddForm(this.realGateway);
};
//璋冩暣鐪熷疄楂樺害
listView.AdjustRealHeight(Application.GetRealHeight(23));
+
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ //鑾峰彇缃戝叧鏁版嵁
+ this.GetGatewayData(btnSwicth);
+ });
}
#endregion
- #region 鈻� 涓�鑸柟娉昣__________________________
+ #region 鈻� 鑾峰彇鏁版嵁___________________________
+
+ /// <summary>
+ /// 鑾峰彇缃戝叧鏁版嵁
+ /// </summary>
+ /// <param name="btnSwitch"></param>
+ private void GetGatewayData(MostRightIconControl btnSwitch)
+ {
+ //鎵撳紑杩涘害鏉�
+ this.ShowProgressBar();
+
+ //鑾峰彇缃戝叧鑷姩璁剧疆鐘舵��
+ var statu = HdlGatewayLogic.Current.GetGatewayAutoBackupStatu(realGateway);
+ if (statu == -1)
+ {
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar(ShowReLoadMode.YES);
+ return;
+ }
+ if (statu == 1)
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ btnSwitch.IsSelected = true;
+ });
+ }
+
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar();
+ }
#endregion
}
--
Gitblit v1.8.0