From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs |  192 ++++++++++++++++++++++++-----------------------
 1 files changed, 99 insertions(+), 93 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs
old mode 100644
new mode 100755
index 9ccdd57..ccb4c64
--- a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs
@@ -23,13 +23,13 @@
         private VerticalListControl listView = null;
         
         private FrameLayout contentLayout = null;
-        /// <summary>
-        /// 褰撳墠妤煎眰鐨勭储寮�
+        /// <summary>
+        /// 褰撳墠妤煎眰鐨勭储寮�
         /// </summary>
-        public int CurrentIndex = 0;
+        public int CurrentIndex = 0;
         private BottomClickButton bottomClickButton = null;
-        /// <summary>
-        /// 褰撳墠妤煎眰鐨勫悕绉�
+        /// <summary>
+        /// 褰撳墠妤煎眰鐨勫悕绉�
         /// </summary>
         private static NormalViewControl pullLayoutText = null;
 
@@ -241,6 +241,12 @@
                             if (device == null)
                                 continue;
 
+                            //鍒ゆ柇璇ヨ澶囨槸鍚﹀彲浠ユ樉绀哄湪涓婚〉
+                            if (LocalDevice.Current.CanShowInHomeHomeMainPage(device) == false)
+                            {
+                                continue;
+                            }
+
                             SmartSound.Device smartDevice = new SmartSound.Device();
                             smartDevice.DeviceAddress = device.DeviceAddr;//璁惧 MAC
                             smartDevice.Epoint = device.DeviceEpoint;//璁惧绔彛
@@ -250,13 +256,13 @@
                             if (smartDevice.DeviceType == 0)
                                 continue;
 
-                            if(ZbGateway.GateWayBaseInfomations.ContainsKey(device.CurrentGateWayId) ==true)
-                            {
-                                smartDevice.GatewayID = ZbGateway.GateWayBaseInfomations[device.CurrentGateWayId].MacMark;//缃戝叧 Id
+                            if(ZbGateway.GateWayBaseInfomations.ContainsKey(device.CurrentGateWayId) ==true)
+                            {
+                                smartDevice.GatewayID = ZbGateway.GateWayBaseInfomations[device.CurrentGateWayId].MacMark;//缃戝叧 Id
                             }
-                            else
-                            {
-                                smartDevice.GatewayID = device.CurrentGateWayId;//缃戝叧 Id
+                            else
+                            {
+                                smartDevice.GatewayID = device.CurrentGateWayId;//缃戝叧 Id
                             }
        
                             if (smartDevice.DeviceName == "" || smartDevice.DeviceName == string.Empty)
@@ -525,68 +531,68 @@
             return TempDatas;
         }
 
-        #region 鈻� 鑷畾涔夋ゼ灞傞�夋嫨鎺т欢_____________________
-
-        /// <summary>
-        /// 鎴块棿鍒楄〃琛�
-        /// </summary>
-        private class MyPullControl : FrameRowControl
+        #region 鈻� 鑷畾涔夋ゼ灞傞�夋嫨鎺т欢_____________________
+
+        /// <summary>
+        /// 鎴块棿鍒楄〃琛�
+        /// </summary>
+        private class MyPullControl : FrameRowControl
         {
 
             private SmartSoundControlContentForm smartSoundDataAdd = null;
             private List<SmartSound.Layer> Layers = null;
-            /// <summary>
-            /// 鎴块棿鍒楄〃
-            /// </summary>
-            private NormalViewControl btnName = null;
-
-            /// <summary>
-            /// 鎴块棿鍒楄〃琛�
-            /// </summary>
-            public MyPullControl(SmartSoundControlContentForm _SmartSoundDataAdd,List<SmartSound.Layer> _layers)
-            {
-                this.smartSoundDataAdd = _SmartSoundDataAdd;
-                this.Layers = _layers;
+            /// <summary>
+            /// 鎴块棿鍒楄〃
+            /// </summary>
+            private NormalViewControl btnName = null;
+
+            /// <summary>
+            /// 鎴块棿鍒楄〃琛�
+            /// </summary>
+            public MyPullControl(SmartSoundControlContentForm _SmartSoundDataAdd,List<SmartSound.Layer> _layers)
+            {
+                this.smartSoundDataAdd = _SmartSoundDataAdd;
+                this.Layers = _layers;
                 this.UseClickStatu = false;
-                this.BackgroundColor = UserCenterColor.Current.White;
-                this.Height = Application.GetRealHeight(173);
+                this.BackgroundColor = UserCenterColor.Current.White;
+                this.Height = Application.GetRealHeight(173);
             }
             
-            /// <summary>
-            /// 鍒濆鍖栨帶浠�
-            /// </summary>
-            public void InitControl()
+            /// <summary>
+            /// 鍒濆鍖栨帶浠�
+            /// </summary>
+            public void InitControl()
             {
                 //鏄剧ず鏂囨湰
-                btnName = this.AddLeftCaption(string.Empty, 700);
-                btnName.Height = Application.GetRealHeight(60);
-                btnName.TextSize = 17;
-                btnName.Y = Application.GetRealHeight(57);
+                btnName = this.AddLeftCaption(string.Empty, 700);
+                btnName.Height = Application.GetRealHeight(60);
+                btnName.TextSize = 17;
+                btnName.Y = Application.GetRealHeight(57);
                 btnName.Text = "鎴块棿鍒楄〃";
 
-                var right_icon=this.AddRightArrow();
-                right_icon.SelectedImagePath = "SmartSound/PullDown.png";
-                right_icon.UnSelectedImagePath = "SmartSound/PullDown.png";
-                right_icon.ButtonClickEvent += (sender, e) =>
+                var right_icon=this.AddRightArrow();
+                right_icon.SelectedImagePath = "SmartSound/PullDown.png";
+                right_icon.UnSelectedImagePath = "SmartSound/PullDown.png";
+                right_icon.ButtonClickEvent += (sender, e) =>
                 {
                     ShowPullList();
-                };
-
-                pullLayoutText = this.AddMostRightView(Layers[smartSoundDataAdd.CurrentIndex].LayerName, 300, false);
+                };
+
+                pullLayoutText = this.AddMostRightView(Layers[smartSoundDataAdd.CurrentIndex].LayerName, 300, false);
                 pullLayoutText.Name = "pullLayout";
-                pullLayoutText.ButtonClickEvent += (sender, e) =>
+                pullLayoutText.ButtonClickEvent += (sender, e) =>
                 {
                     ShowPullList();
-                };
+                };
                 pullLayoutText.Text = Layers[smartSoundDataAdd.CurrentIndex].LayerName;
-
+
                 if (Layers.Count == 1)
-                {
-                    right_icon.Visible = false;
-                    pullLayoutText.Visible = false;
-                }                
-            }
-
+                {
+                    right_icon.Visible = false;
+                    pullLayoutText.Visible = false;
+                }                
+            }
+
             private void ShowPullList()
             {
                 //鎴块棿鍒楄〃琛寋鎴块棿鍒楄〃 textView锛屾ゼ灞備笅鎷夌獥}
@@ -605,55 +611,55 @@
                         smartSoundDataAdd.LoadAllRoomListView();
                     });
                 }
-            }
+            }
         }
         #endregion
                
-        #region 鈻� 鑷畾涔夋埧闂撮�夋嫨鎺т欢_____________________
+        #region 鈻� 鑷畾涔夋埧闂撮�夋嫨鎺т欢_____________________
 
-        /// <summary>
-        /// 鎴块棿鍒楄〃琛�
-        /// </summary>
-        private class RoomRowLayout : FrameRowControl
+        /// <summary>
+        /// 鎴块棿鍒楄〃琛�
+        /// </summary>
+        private class RoomRowLayout : FrameRowControl
         {
             private SmartSoundControlContentForm smartSoundControlContentForm = null;
 
             private SmartSound.Room mRoom = null;
-            /// <summary>
-            /// 鎴块棿鍚嶇О
-            /// </summary>
-            private NormalViewControl btnName = null;
-
-            private MostRightIconControl Right_icon = null;            
-
-            /// <summary>
-            /// 鎴块棿鍒楄〃琛�
-            /// </summary>
-            public RoomRowLayout(SmartSoundControlContentForm _smartSoundControlContentForm,SmartSound.Room _room)
-            {
-                this.smartSoundControlContentForm = _smartSoundControlContentForm;
-                this.mRoom = _room;
+            /// <summary>
+            /// 鎴块棿鍚嶇О
+            /// </summary>
+            private NormalViewControl btnName = null;
+
+            private MostRightIconControl Right_icon = null;            
+
+            /// <summary>
+            /// 鎴块棿鍒楄〃琛�
+            /// </summary>
+            public RoomRowLayout(SmartSoundControlContentForm _smartSoundControlContentForm,SmartSound.Room _room)
+            {
+                this.smartSoundControlContentForm = _smartSoundControlContentForm;
+                this.mRoom = _room;
                 this.UseClickStatu = false;
-                this.BackgroundColor = UserCenterColor.Current.White;
-                this.Height = Application.GetRealHeight(170);
+                this.BackgroundColor = UserCenterColor.Current.White;
+                this.Height = Application.GetRealHeight(170);
             }
 
-            /// <summary>
-            /// 鍒濆鍖栨帶浠�
-            /// </summary>
-            public void InitControl()
+            /// <summary>
+            /// 鍒濆鍖栨帶浠�
+            /// </summary>
+            public void InitControl()
             {
                 //鏄剧ず鏂囨湰
-                btnName = this.AddLeftCaption(string.Empty, 2000);
-                btnName.Height = Application.GetRealHeight(60);
-                btnName.TextSize = 14;
-                btnName.Y = Application.GetRealHeight(57);
+                btnName = this.AddLeftCaption(string.Empty, 2000);
+                btnName.Height = Application.GetRealHeight(60);
+                btnName.TextSize = 14;
+                btnName.Y = Application.GetRealHeight(57);
                 btnName.Text = mRoom.RoomName;
 
-                Right_icon = this.AddMostRightEmptyIcon(58, 58);
+                Right_icon = this.AddMostRightEmptyIcon(58, 58);
                 Right_icon.Gravity = Gravity.CenterVertical;
 
-                btnName.ButtonClickEvent += (sender, e) =>
+                btnName.ButtonClickEvent += (sender, e) =>
                 {
                     mRoom.Checked = true;
                     RefreshRightIconState(mRoom.Checked);
@@ -670,10 +676,10 @@
                 RefreshRightIconState(mRoom.Checked);
                 AddBottomLine();
 
-            }
-
+            }
+
             private void RefreshRightIconState(bool bol = false)
-            {
+            {
                 try
                 {
                     if (bol)
@@ -710,9 +716,9 @@
                 {
                     string error = e.Message;
                 }
-            }
-
-        }
+            }
+
+        }
         #endregion
     }
 }

--
Gitblit v1.8.0