黄学彪
2020-03-23 21923381bdac04d1633b168c97accc81f0898d84
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -123,30 +123,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>
@@ -1955,11 +1932,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);
            }
        }
@@ -2014,6 +1991,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)
@@ -2022,20 +2003,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();
@@ -2046,18 +2032,6 @@
            }
        }
        /// <summary>
        /// GetExecScene
        /// </summary>
        /// <param name="scrolViewLayout"></param>
        private void GetExecScene(VerticalScrolViewLayout scrolViewLayout)
        {
            new System.Threading.Thread(() =>
            {
            })
            { IsBackground = true }.Start();
        }
        #endregion
        #region ◆ 自动化__________________________