WJC
2020-03-23 bba578c2f0acf2eca747edcb69426771e0cadd32
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -126,30 +126,7 @@
        #endregion
        #region ◆ 接口____________________________
        /// <summary>
        /// 该接口将弃用 改用DeviceInfoChange()
        /// </summary>
        /// <param name="common">Common.</param>
        public void Changed(CommonDevice common)
        {
        }
        /// <summary>
        /// Changeds the IL ogic status.
        /// </summary>
        /// <param name="logic">Logic.</param>
        public void ChangedILogicStatus(ZigBee.Device.Logic logic)
        {
        }
        /// <summary>
        /// Changeds the IS cene status.
        /// </summary>
        /// <param name="scene">Scene.</param>
        public void ChangedISceneStatus(Scene scene)
        {
        }
        /// <summary>
        /// 设备状态更新接口
        /// <para>type:如果为 DeviceInComingRespon:设备新上报</para>
@@ -1958,11 +1935,11 @@
                functionSceneBodyView.AddChidren(sceneScrolView);
                foreach (var scene in sceneList)
                {
                    var sceneView = new SceneCategoryView(0, 0);
                    var sceneView = new SceneCategoryView();
                    sceneScrolView.AddChidren(sceneView);
                    sceneView.Init(scene, room);
                    GetDelayScene(sceneScrolView);
                    sceneView.InitControl(scene, room);
                }
                GetDelayScene(sceneScrolView);
            }
        }
@@ -2017,6 +1994,10 @@
            for (int i = 0; scrolViewLayout != null && i < scrolViewLayout.ChildrenCount; i++)
            {
                var sceneView = scrolViewLayout.GetChildren(i) as SceneCategoryView;
                if (sceneView == null)
                {
                    continue;
                }
                foreach (var delayScenesListResponseInfo in delayList)
                {
                    if (delayScenesListResponseInfo.ScenesId == sceneView.scene.Id)
@@ -2025,20 +2006,25 @@
                        var remainTime = delayScenesListResponseInfo.RemainTime;
                        if (remainTime > 0)
                        {
                            //开启内部延时时间线程(旨在全部地方的同一场景时间同步)
                            HdlSceneLogic.Current.StartDelayTimeThread(sceneView.scene);
                            new System.Threading.Thread(() =>
                            {
                                while (remainTime-- > 0)
                                while (remainTime > 0 && this.Parent != null)
                                {
                                    System.Threading.Thread.Sleep(1000);
                                    Application.RunOnMainThread(() =>
                                    {
                                        sceneView.SetTimeText(CommonFormResouce.GetTimeString(remainTime));
                                    });
                                    remainTime--;
                                }
                                Application.RunOnMainThread(() =>
                                {
                                    sceneView.scene.RemainTime = 0;
                                    if (this.Parent != null)
                                    {
                                    sceneView.SetTimeImage();
                                    }
                                });
                            })
                            { IsBackground = true }.Start();
@@ -2049,18 +2035,6 @@
            }
        }
        /// <summary>
        /// GetExecScene
        /// </summary>
        /// <param name="scrolViewLayout"></param>
        private void GetExecScene(VerticalScrolViewLayout scrolViewLayout)
        {
            new System.Threading.Thread(() =>
            {
            })
            { IsBackground = true }.Start();
        }
        #endregion
        #region ◆ 自动化__________________________
@@ -2071,8 +2045,7 @@
        private void ShowAutotion()
        {
            // functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
            #region   ---推荐模板的组件
            //推荐模板背景控件
            var bjFrameLayout = new FrameLayout
            {
                Width = Application.GetRealWidth(1080 - 58),
@@ -2244,6 +2217,16 @@
                //关闭刷新View;
                logicScrolView.EndHeaderRefreshing();
            };
            logicScrolView.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                Common.Logic.LogicList.Clear();
                Read(logicScrolView, no);
                //关闭刷新View;
                logicScrolView.EndHeaderRefreshing();
            };
            Read(logicScrolView, no);
            Read(logicScrolView, no);
@@ -2448,7 +2431,6 @@
                            Logic.Send.DelLogic(logic.LogicId);
                        }
                    };
                    alert.Show();
                };
                var line = new Button