From 6f16607efe766271c69a4f3f96fb928fe25f112c Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期五, 01 十一月 2019 16:22:13 +0800
Subject: [PATCH] 2019-11-01-2

---
 ZigbeeApp/Shared/Phone/Device/Category/Category.cs |  202 ++++++++++++++++++++++++++------------------------
 1 files changed, 106 insertions(+), 96 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index bc4aa84..127e178 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -829,6 +829,7 @@
             else if (automationBtn.IsSelected)
             {
                 ShowAutotion();
+
             }
         }
 
@@ -1862,7 +1863,6 @@
         {
 
             functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
-
             var bjFrameLayout = new FrameLayout
             {
                 Width = Application.GetRealWidth(1080 - 58),
@@ -2014,7 +2014,7 @@
                     Yheight = 0;
                 }
                 logicScrolView.Y = scenehorizontalScrol.Bottom + Yheight;
-                logicScrolView.Height = functionSceneBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight;
+                logicScrolView.Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight;
                 Automationview(logicScrolView);
             };
 
@@ -2040,6 +2040,7 @@
             //鑷姩鍖�
             Automationview(logicScrolView);
             CommonPage.Loading.Hide();
+            
         }
 
         /// <summary>
@@ -2051,32 +2052,26 @@
             refresview.RemoveAll();
             foreach (var logic in Common.Logic.LogicList)
             {
-                var bjRow = new RowLayout
-                {
-                    Width = Application.GetRealWidth(1080 - 58),
-                    Height = Application.GetRealHeight(220),
-                    LineColor = ZigbeeColor.Current.LogicBackgroundColor,
-                    BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
 
-                };
-                refresview.AddChidren(bjRow);
 
                 var logicRowlayout = new RowLayout
                 {
-                    Y = Application.GetRealHeight(220 - 190),
-                    Height = Application.GetRealHeight(190),
-                    Width = Application.GetRealWidth(1080 - 58 - 46),
-                    LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
-                    X = Application.GetRealWidth(46),
+                    Height = Application.GetRealHeight(190 + 30),
+                    Width = Application.GetRealWidth(1080),
+                    LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+                    BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
                 };
-                bjRow.AddChidren(logicRowlayout);
+                refresview.AddChidren(logicRowlayout);
+
+
 
                 var logicnameBtn = new Button
                 {
                     Height = Application.GetRealHeight(58),
                     Width = Application.GetRealWidth(350),
                     Text = logic.LogicName,
-                    X = Application.GetRealWidth(12),
+                    X = Application.GetRealWidth(12 + 46),
+                    Y = Application.GetRealHeight(30),
                     TextAlignment = TextAlignment.CenterLeft,
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 };
@@ -2089,8 +2084,8 @@
                     Height = Application.GetMinRealAverage(63),
                     UnSelectedImagePath = "ZigeeLogic/logicclose.png",
                     SelectedImagePath = "ZigeeLogic/logicopen.png",
-                    X = logicRowlayout.Width - Application.GetRealWidth(104 + 58),
-                    Y = Application.GetRealHeight(58 + 30 + 9),
+                    X = logicRowlayout.Width - Application.GetRealWidth(104 + 58 + 58),
+                    Y = Application.GetRealHeight(58 + 30 + 9 + 30),
                 };
                 logicRowlayout.AddChidren(logicswitchBtn);
 
@@ -2167,91 +2162,32 @@
                     alert.Show();
 
                 };
-
-            }
-
-
-        }
-
-        #region 鈼� 鎺у埗鐘舵�乢________________________
-
-        /// <summary>
-        /// 鏄剧ず璁惧鎺у埗鐘舵��
-        /// </summary>
-        /// <param name="command">Command.</param>
-        /// <param name="objValue">Object value.</param>
-        private void UpdateDeviceControllStatu(string command, object objValue)
-        {
-            if (command != "DeviceDefaultAck" || objValue == null)
-            {
-                return;
-            }
-            var tempDevice = (CommonDevice)objValue;
-            if (null == commonDeviceList.Find((obj) => obj.DeviceEpoint == tempDevice.DeviceEpoint && obj.DeviceAddr == tempDevice.DeviceAddr))
-            {
-                return;
-            }
-            //鏍囪宸茬粡鍙戦�佹帶鍒跺懡浠ゅ埌缃戝叧
-            sendedControlCommand = true;
-            //DeviceUI.ShowStatuTip(R.MyInternationalizationString.Success);
-        }
-
-        /// <summary>
-        /// 绉婚櫎鍏ㄩ儴鏇存柊鎺у埗璁惧鐨刟ction
-        /// </summary>
-        private void RemoveAllUpdateControlDeviceStatuAction()
-        {
-            foreach (var gateway in zbGatewayList)
-            {
-                //绉婚櫎action
-                if (gateway != null)
+                var line = new Button
                 {
-                    gateway.ReportAction -= UpdateDeviceControllStatu;
-                }
+                    Y = Application.GetRealHeight(215),
+                    Height = Application.GetRealHeight(5),
+                    Width = Application.GetRealWidth(1080 - 58),
+                    BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+                    X = Application.GetRealWidth(58),
+                };
+                logicRowlayout.AddChidren(line);
             }
-        }
 
+        }
         /// <summary>
-        /// 绉婚櫎鍗曚釜鎺у埗璁惧鐨勬洿鏂扮姸鎬乤ction
+        /// 鏄剧ず鍥炬爣鐨勯鑹�
         /// </summary>
-        /// <param name="gateway">Gateway.</param>
-        private void RemoveUpdateControlDeviceStatuAction(ZbGateway gateway)
-        {
-            //绉婚櫎action
-            if (gateway != null)
-            {
-                gateway.ReportAction -= UpdateDeviceControllStatu;
-            }
-        }
-
-        /// <summary>
-        /// 娣诲姞闇�瑕佺洃鎺у洖璋冪姸鎬佺殑缃戝叧鍜岃澶�
-        /// </summary>
-        /// <param name="gatewayList">Gateway list.</param>
-        /// <param name="gateway">Gateway.</param>
-        /// <param name="deviceList">Device list.</param>
-        /// <param name="common">Common.</param>
-        private void AddZbGateway(List<ZbGateway> gatewayList, ZbGateway gateway, List<CommonDevice> deviceList, CommonDevice common)
-        {
-            if (null == gatewayList.Find((obj) => obj.getGatewayBaseInfo.gwID == gateway.getGatewayBaseInfo.gwID))
-            {
-                gatewayList.Add(gateway);
-            }
-            if (null == commonDeviceList.Find((obj) => obj.DeviceEpoint == common.DeviceEpoint && obj.DeviceAddr == common.DeviceAddr))
-            {
-                commonDeviceList.Add(common);
-            }
-        }
-
-        #endregion
-
+        /// <param name="logic"></param>
+        /// <param name="logicRowlayout"></param>
+        /// <param name="intvalue"></param>
         private void StatusColor(Common.Logic logic, RowLayout logicRowlayout, int intvalue)
         {
 
             var logictimeBtn = new Button
             {
                 Height = Application.GetRealHeight(58),
-                Width = logicRowlayout.Width - Application.GetRealWidth(58 + 12 + 350),
+                Width = logicRowlayout.Width - Application.GetRealWidth(58 + 12 + 350 + 58),
+                Y = Application.GetRealHeight(30),
                 X = Application.GetRealWidth(365),
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = ZigbeeColor.Current.LogicListWeekTextColor,
@@ -2542,8 +2478,8 @@
                 {
                     Width = Application.GetRealWidth(82),
                     Height = Application.GetRealHeight(82),
-                    X = Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i),
-                    Y = Application.GetRealHeight(58 + 30),
+                    X = Application.GetRealWidth(58) + Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i),
+                    Y = Application.GetRealHeight(58 + 30 + 30),
                     Radius = (uint)Application.GetRealHeight(41),
                     BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                 };
@@ -2561,7 +2497,7 @@
                 var connectIconBtn = new Button
                 {
                     Y = typebjBtn.Y + Application.GetRealHeight(35),
-                    X = Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i),
+                    X = Application.GetRealWidth(58) + Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i),
                     Width = Application.GetRealWidth(48),
                     Height = Application.GetRealHeight(15),
                     UnSelectedImagePath = "ZigeeLogic/connect.png",
@@ -2639,5 +2575,79 @@
             }
         }
         #endregion
+
+        #region 鈼� 鎺у埗鐘舵�乢________________________
+
+        /// <summary>
+        /// 鏄剧ず璁惧鎺у埗鐘舵��
+        /// </summary>
+        /// <param name="command">Command.</param>
+        /// <param name="objValue">Object value.</param>
+        private void UpdateDeviceControllStatu(string command, object objValue)
+        {
+            if (command != "DeviceDefaultAck" || objValue == null)
+            {
+                return;
+            }
+            var tempDevice = (CommonDevice)objValue;
+            if (null == commonDeviceList.Find((obj) => obj.DeviceEpoint == tempDevice.DeviceEpoint && obj.DeviceAddr == tempDevice.DeviceAddr))
+            {
+                return;
+            }
+            //鏍囪宸茬粡鍙戦�佹帶鍒跺懡浠ゅ埌缃戝叧
+            sendedControlCommand = true;
+            //DeviceUI.ShowStatuTip(R.MyInternationalizationString.Success);
+        }
+
+        /// <summary>
+        /// 绉婚櫎鍏ㄩ儴鏇存柊鎺у埗璁惧鐨刟ction
+        /// </summary>
+        private void RemoveAllUpdateControlDeviceStatuAction()
+        {
+            foreach (var gateway in zbGatewayList)
+            {
+                //绉婚櫎action
+                if (gateway != null)
+                {
+                    gateway.ReportAction -= UpdateDeviceControllStatu;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 绉婚櫎鍗曚釜鎺у埗璁惧鐨勬洿鏂扮姸鎬乤ction
+        /// </summary>
+        /// <param name="gateway">Gateway.</param>
+        private void RemoveUpdateControlDeviceStatuAction(ZbGateway gateway)
+        {
+            //绉婚櫎action
+            if (gateway != null)
+            {
+                gateway.ReportAction -= UpdateDeviceControllStatu;
+            }
+        }
+
+        /// <summary>
+        /// 娣诲姞闇�瑕佺洃鎺у洖璋冪姸鎬佺殑缃戝叧鍜岃澶�
+        /// </summary>
+        /// <param name="gatewayList">Gateway list.</param>
+        /// <param name="gateway">Gateway.</param>
+        /// <param name="deviceList">Device list.</param>
+        /// <param name="common">Common.</param>
+        private void AddZbGateway(List<ZbGateway> gatewayList, ZbGateway gateway, List<CommonDevice> deviceList, CommonDevice common)
+        {
+            if (null == gatewayList.Find((obj) => obj.getGatewayBaseInfo.gwID == gateway.getGatewayBaseInfo.gwID))
+            {
+                gatewayList.Add(gateway);
+            }
+            if (null == commonDeviceList.Find((obj) => obj.DeviceEpoint == common.DeviceEpoint && obj.DeviceAddr == common.DeviceAddr))
+            {
+                commonDeviceList.Add(common);
+            }
+        }
+
+        #endregion
+
+   
     }
 }

--
Gitblit v1.8.0