From bd46c57c77c276014db3192a4e2cc96e23c93202 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 21 二月 2020 13:08:47 +0800
Subject: [PATCH] 先上传个版本吧

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs |   75 ++++++++++++++++++++++++++++++++-----
 1 files changed, 65 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index 80a3619..df44068 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -30,27 +30,68 @@
             this.curDeviceBindType = deviceBindType;
         }
 
-        #region 鈼� 鍙橀噺鐢虫槑__________________________
+        #region 鍙橀噺鐢虫槑
+        /// <summary>
+        /// 褰撳墠鎸夐敭
+        /// </summary>
         ZigBee.Device.Panel currentKey;
-        //鏄剧ず琚粦瀹氳澶囨垨鍦烘櫙鐨剉iew
+        /// <summary>
+        /// 鏄剧ず琚粦瀹氳澶囨垨鍦烘櫙鐨剉iew
+        /// </summary>
         VerticalScrolViewLayout midVerticalScrolViewLayout;
+        /// <summary>
+        /// 鏄剧ず鎴块棿鐨剉iew
+        /// </summary>
         HorizontalScrolViewLayout btnHorizontalScrolViewLayout;
         /// <summary>
         /// 鎸夐敭閰嶇疆鐨勭洰鏍囧垪琛�
         /// </summary>
         List<CommonDevice> targetList = new List<CommonDevice>();
+        /// <summary>
+        /// 鎴块棿鍒楄〃
+        /// </summary>
         List<Room> roomList = new List<Room>();
+        /// <summary>
+        /// 娣诲姞璁惧鍚庣殑鍥炶皟
+        /// </summary>
         public Action<List<BindListResponseObj>> actionAddDevicePage;
+        /// <summary>
+        /// 褰撳墠璁惧绫诲瀷鍒楄〃
+        /// </summary>
         List<DeviceUI> curTypeDeviceList = new List<DeviceUI> { };
+        /// <summary>
+        /// 褰撳墠璁惧缁戝畾绫诲瀷
+        /// </summary>
         string curDeviceBindType = "";
+        /// <summary>
+        /// 妤煎眰鏂囨湰
+        /// </summary>
         Button btnFloorText;
+        /// <summary>
+        /// 妤煎眰琛�
+        /// </summary>
         Dictionary<string, string> dicFloor;
+        /// <summary>
+        /// 褰撳墠閫夋嫨鐨勬寜閿ā寮�
+        /// </summary>
         Button btnChooseKeyMode;
-        bool IsInitEntry = false;//鏄惁棣栨杩涘叆璇ラ〉
+        /// <summary>
+        /// 鏄惁棣栨杩涘叆璇ラ〉
+        /// </summary>
+        bool IsInitEntry = false;
+        /// <summary>
+        /// 褰撳墠鎸夐敭鐨勬墍鏈夋埧闂磋澶囧垪琛�
+        /// </summary>
         List<DeviceUI> currentKeyAllRoomDeviceList = new List<DeviceUI>();
+        /// <summary>
+        /// 涓存椂瀛樺偍鐨勭洰鏍囧垪琛�
+        /// </summary>
         Dictionary<string, CommonDevice> oldTargetList = new Dictionary<string, CommonDevice> { };
         #endregion
 
+        /// <summary>
+        /// 娣诲姞璁惧鏄剧ず
+        /// </summary>
         public void Show()
         {
             targetList.Clear();
@@ -90,7 +131,8 @@
                 X = Application.GetRealWidth(15),
                 Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
-                TextSize = 15,
+                TextSize = 14,
+                IsBold = true,
                 TextAlignment = TextAlignment.CenterRight,
             };
             btnAddFrameLayout.AddChidren(btnFloorText);
@@ -125,6 +167,9 @@
             MidFrameLayoutContent(btnFloorText);
         }
 
+        /// <summary>
+        /// 涓儴甯冨眬
+        /// </summary>
         async void MidFrameLayoutContent(Button btnFloorText)
         {
             #region UI
@@ -169,6 +214,7 @@
                 BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 TextSize = 16,
+                IsBold = true,
             };
             bottomFrameLayout.AddChidren(btnChooseKeyMode);
             #endregion
@@ -403,7 +449,10 @@
             RefreshDeviceList(curRoom);
         }
 
-        //褰撳墠鎸夐敭鎵�鏈夋樉绀烘埧闂寸殑鎵�鏈夎澶囧鐞�
+        /// <summary>
+        /// 褰撳墠鎸夐敭鎵�鏈夋樉绀烘埧闂寸殑鎵�鏈夎澶囧鐞�
+        /// </summary>
+        /// <returns></returns>
         List<DeviceUI> GetALlDispalyRoomDeviceList()
         {
             currentKeyAllRoomDeviceList.Clear();
@@ -566,11 +615,12 @@
 
                 var btnBindName = new Button()
                 {
-                    Width = Application.GetRealWidth(500 - 120),
+                    Width = Application.GetRealWidth(790),
                     X = devicePic.Right + Application.GetRealWidth(20),
                     TextColor = Shared.Common.ZigbeeColor.Current.TextBlack,
                     TextAlignment = TextAlignment.CenterLeft,
                     Tag = device.CommonDevice?.DeviceEpointName,
+                    TextSize = 15,
                 };
                 rowLayout.AddChidren(btnBindName);
 
@@ -597,7 +647,7 @@
                 };
                 rowLayout.AddChidren(line2);
 
-                if (curIndex == curRoom.DeviceUIList.Count - 1)
+                if (curIndex == curTypeDeviceList.Count)
                 {
                     line2.Visible = false;
                 }
@@ -642,7 +692,7 @@
                 btnBindName.MouseUpEventHandler += hander;
                 btnChoose.MouseUpEventHandler += hander;
 
-                if (device.CommonDevice?.DeviceEpointName == "")
+                if (string.IsNullOrEmpty(device.CommonDevice?.DeviceEpointName))
                 {
                     btnBindName.Text = device.CommonDevice?.DeviceAddr + "_" + device.CommonDevice?.DeviceEpoint;
                 }
@@ -672,7 +722,9 @@
             }
         }
 
-        // 渚ц竟瀵艰埅鏍�
+        /// <summary>
+        /// 閫夋嫨妤煎眰鐨勪晶杈规爮
+        /// </summary>
         void SideslipFramelayout()
         {
             var dialog = new Dialog
@@ -703,10 +755,11 @@
                 Height = Application.GetRealHeight(58),
                 X = Application.GetRealWidth(81),
                 Y = Application.GetRealHeight(81),
-                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
+                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                 TextSize = 14,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.SelectFloor,
+                IsBold = true,
             };
             sidelipFrameLayout.AddChidren(btnSelectFloor);
 
@@ -755,6 +808,7 @@
                 if (currentKey.currentSelectFloorId == floorId)
                 {
                     btnAllMethod.IsSelected = true;
+                    btnAllMethod.IsBold = true;
                     btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                 }
 
@@ -783,6 +837,7 @@
                         oldbuttonText = btnMethodText;
                         btnMethodText.IsSelected = true;
                         oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                        oldbuttonText.IsBold = true;
                     }
 
                     //鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂�

--
Gitblit v1.8.0