From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 11 九月 2020 09:16:59 +0800
Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs |   80 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs
new file mode 100755
index 0000000..5411559
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayRebindForm.cs
@@ -0,0 +1,80 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter.GatewayManage
+{
+    /// <summary>
+    /// 閲嶆柊缁戝畾缃戝叧鐨勭晫闈�
+    /// </summary>
+    public class GatewayRebindForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_gateway">鎹㈢粦鐨勭綉鍏冲璞�</param>
+        /// <param name="i_dicZbGatewayDiv">鎼滅储鍒扮殑缃戝叧绫诲埆  0:绗竴娆$粦瀹� 1:宸茬粡缁戝畾 2:闇�瑕佹崲缁�</param>
+        public void ShowForm(ZbGateway i_gateway, Dictionary<string, int> i_dicZbGatewayDiv)
+        {
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway));
+
+            var btnLoading = new LoadingControl();
+            btnLoading.Y = Application.GetRealHeight(656);
+            btnLoading.Gravity = Gravity.CenterHorizontal;
+            bodyFrameLayout.AddChidren(btnLoading);
+            btnLoading.StartAction();
+
+            //姝e湪鎹㈢粦缃戝叧锛岃绋嶅�欌��
+            var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
+            btnMsg.Y = Application.GetRealHeight(979);
+            btnMsg.TextAlignment = TextAlignment.Center;
+            btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnMsg.TextID = R.MyInternationalizationString.uIsReBindingPleaseWaiting;
+            bodyFrameLayout.AddChidren(btnMsg);
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                System.Threading.Thread.Sleep(1000);
+                int value = HdlGatewayLogic.Current.ReBindNewGateway(i_gateway, btnMsg);
+                if (value == 1)
+                {
+                    //鎴愬姛
+                    i_dicZbGatewayDiv[i_gateway.GwId] = 1;
+                    //鎴戣寰楄繖閲岄渶瑕佽幏鍙栦竴涓嬫柊缃戝叧鐨勮澶囧垪琛�
+                    Common.LocalDevice.Current.SetDeviceToMemmoryByGateway(i_gateway, true);
+                    if (i_gateway.IsMainGateWay == true)
+                    {
+                        //濡傛灉瀹冩槸涓荤綉鍏�,鍒欏埛鏂板満鏅垪琛�
+                        HdlSceneLogic.Current.RefreshSceneUIList(true);
+                    }
+                }
+                else if (value == 0)
+                {
+                    //缃戝叧缁戝畾鍦ㄥ綋鍓嶈处鍙蜂笅鐨勫叾浠栦綇瀹呴噷\r\n璇疯В闄ょ粦瀹氬悗鍐嶈瘯
+                    string msg = Language.StringByID(R.MyInternationalizationString.uTheGatewayInOtherResidenceMsg);
+                    if (msg.Contains("{0}") == true)
+                    {
+                        msg = string.Format(msg, "\r\n");
+                    }
+                    this.ShowMassage(ShowMsgType.Tip, msg);
+                }
+
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鎴愬姛鎴栬�呭け璐ラ兘鍏抽棴鐣岄潰
+                    this.CloseForm();
+                });
+            });
+        }
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0