黄学彪
2019-12-09 163777d8a2cb7cfa469f54a7042528870ebc10a3
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -1744,9 +1744,9 @@
        #region ◆ 自动化__________________________
        /// <summary>
        /// 自动化
        /// 自动化功能代码入口
        /// </summary>
        private async void ShowAutotion()
        private  void ShowAutotion()
        {
            functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
@@ -1760,7 +1760,7 @@
                Y = Application.GetRealHeight(30),
            };
            functionSceneAutoBodyView.AddChidren(bjFrameLayout);
            bjFrameLayout.SetCornerWithSameRadius(25, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
            bjFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft);
            var sigBtn = new Button
            {
                Width = Application.GetMinRealAverage(84),
@@ -1806,7 +1806,7 @@
            };
            functionSceneAutoBodyView.AddChidren(scenehorizontalScrol);
            var logicScrolView = new VerticalScrolViewLayout
            var logicScrolView = new VerticalRefreshLayout//VerticalScrolViewLayout
            {
                Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
@@ -1815,8 +1815,7 @@
                Y = scenehorizontalScrol.Bottom,
            };
            functionSceneAutoBodyView.AddChidren(logicScrolView);
            logicScrolView.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
            logicScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
            recommendswitchBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -1907,7 +1906,24 @@
                logicScrolView.Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight;
                Automationview(logicScrolView);
            };
            logicScrolView.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                Common.Logic.LogicList.Clear();
                Read(logicScrolView);
                //关闭刷新View;
                logicScrolView.EndHeaderRefreshing();
            };
            Read(logicScrolView);
        }
        /// <summary>
        /// 读取自动化列表数据;
        /// </summary>
        /// <param name="logicScrolView"></param>
        private async void Read(VerticalRefreshLayout logicScrolView)
        {
            CommonPage.Loading.Start();
            if (Common.Logic.LogicList.Count == 0)
            {
@@ -1932,12 +1948,11 @@
            CommonPage.Loading.Hide();
            
        }
        /// <summary>
        /// 自动化列表界面
        /// 加载自动化列表界面
        /// </summary>
        /// <param name="refresview">Refresview.</param>
        private async void Automationview(VerticalScrolViewLayout refresview)
        private async void Automationview(VerticalRefreshLayout refresview)
        {
            refresview.RemoveAll();
            foreach (var logic in Common.Logic.LogicList)
@@ -2066,7 +2081,7 @@
        }
        /// <summary>
        /// 显示图标的颜色
        /// 显示自动化输出功能模块图标的颜色
        /// </summary>
        /// <param name="logic"></param>
        /// <param name="logicRowlayout"></param>
@@ -2465,6 +2480,7 @@
                }
            }
        }
        #endregion
        #region ◆ 控制状态_________________________